Compare commits

..

1 Commits

Author SHA1 Message Date
Cyrill Leutwiler a57352f9c4 release resolc 0.4.0
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
2025-10-06 08:51:39 +02:00
21 changed files with 948 additions and 951 deletions
+231 -7
View File
@@ -1,5 +1,4 @@
name: Nightly Release name: Nightly Release
on: on:
schedule: schedule:
# Run every day at 01:00 UTC # Run every day at 01:00 UTC
@@ -11,8 +10,10 @@ concurrency:
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
RUST_MUSL_CROSS_IMAGE: messense/rust-musl-cross@sha256:c0154e992adb791c3b848dd008939d19862549204f8cb26f5ca7a00f629e6067
jobs: jobs:
# check if there were commits yesterday
check_commits: check_commits:
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
@@ -21,7 +22,7 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0 # Fetch full history to check previous commits
ref: "main" ref: "main"
- name: Check for commits from yesterday - name: Check for commits from yesterday
@@ -46,12 +47,229 @@ jobs:
fi fi
build: build:
# github actions matrix jobs don't support multiple outputs
# ugly workaround from https://github.com/orgs/community/discussions/17245#discussioncomment-11222880
if: ${{ needs.check_commits.outputs.has_commits == 'true' }} if: ${{ needs.check_commits.outputs.has_commits == 'true' }}
outputs:
resolc-x86_64-unknown-linux-musl_url: ${{ steps.set-output.outputs.resolc-x86_64-unknown-linux-musl_url }}
resolc-x86_64-unknown-linux-musl_sha: ${{ steps.set-output.outputs.resolc-x86_64-unknown-linux-musl_sha }}
resolc-aarch64-apple-darwin_url: ${{ steps.set-output.outputs.resolc-aarch64-apple-darwin_url }}
resolc-aarch64-apple-darwin_sha: ${{ steps.set-output.outputs.resolc-aarch64-apple-darwin_sha }}
resolc-x86_64-apple-darwin_url: ${{ steps.set-output.outputs.resolc-x86_64-apple-darwin_url }}
resolc-x86_64-apple-darwin_sha: ${{ steps.set-output.outputs.resolc-x86_64-apple-darwin_sha }}
resolc-x86_64-pc-windows-msvc_url: ${{ steps.set-output.outputs.resolc-x86_64-pc-windows-msvc_url }}
resolc-x86_64-pc-windows-msvc_sha: ${{ steps.set-output.outputs.resolc-x86_64-pc-windows-msvc_sha }}
strategy:
matrix:
target:
[
x86_64-unknown-linux-musl,
aarch64-apple-darwin,
x86_64-apple-darwin,
x86_64-pc-windows-msvc,
]
include:
- target: x86_64-unknown-linux-musl
type: musl
runner: ubuntu-24.04
- target: aarch64-apple-darwin
type: native
runner: macos-14
- target: x86_64-apple-darwin
type: native
runner: macos-13
- target: x86_64-pc-windows-msvc
type: native
runner: windows-2022
runs-on: ${{ matrix.runner }}
needs: [check_commits] needs: [check_commits]
uses: ./.github/workflows/reusable-build.yml steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with: with:
is_release: false # without this it will override our rust flags
retention_days: 40 rustflags: ""
cache-key: ${{ matrix.target }}
- name: Download LLVM
uses: ./.github/actions/get-llvm
with:
target: ${{ matrix.target }}
- name: Build
if: ${{ matrix.type == 'native' }}
shell: bash
run: |
export LLVM_SYS_181_PREFIX=$PWD/llvm-${{ matrix.target }}
make install-bin
mv target/release/resolc resolc-${{ matrix.target }} || mv target/release/resolc.exe resolc-${{ matrix.target }}.exe
- name: Build
if: ${{ matrix.type == 'musl' }}
run: |
docker run -v $PWD:/opt/revive $RUST_MUSL_CROSS_IMAGE /bin/bash -c "
cd /opt/revive
chown -R root:root .
apt update && apt upgrade -y && apt install -y pkg-config
export LLVM_SYS_181_PREFIX=/opt/revive/llvm-${{ matrix.target }}
make install-bin
mv target/${{ matrix.target }}/release/resolc resolc-${{ matrix.target }}
"
sudo chown -R $(id -u):$(id -g) .
- name: Install Solc
uses: ./.github/actions/get-solc
- name: Basic Sanity Check
shell: bash
run: |
result=$(./resolc-${{ matrix.target }} --bin crates/integration/contracts/flipper.sol)
echo $result
if [[ $result == *'50564d'* ]]; then exit 0; else exit 1; fi
- name: Upload artifacts (nightly)
uses: actions/upload-artifact@v4
id: artifact-upload-step
with:
name: resolc-${{ matrix.target }}
path: resolc-${{ matrix.target }}*
retention-days: 40
- name: Set output variables (nightly)
id: set-output
shell: bash
run: |
echo "Artifact URL is ${{ steps.artifact-upload-step.outputs.artifact-url }}"
echo "Artifact SHA is ${{ steps.artifact-upload-step.outputs.artifact-digest }}"
echo "resolc-${{ matrix.target }}_url=${{ steps.artifact-upload-step.outputs.artifact-url }}"
echo "resolc-${{ matrix.target }}_url=${{ steps.artifact-upload-step.outputs.artifact-url }}" >> "$GITHUB_OUTPUT"
echo "resolc-${{ matrix.target }}_sha=${{ steps.artifact-upload-step.outputs.artifact-digest }}"
echo "resolc-${{ matrix.target }}_sha=${{ steps.artifact-upload-step.outputs.artifact-digest }}" >> "$GITHUB_OUTPUT"
build-wasm:
runs-on: ubuntu-24.04
needs: [check_commits]
if: ${{ needs.check_commits.outputs.has_commits == 'true' }}
outputs:
resolc-web.js_url: ${{ steps.set-output.outputs.resolc_web_js_url }}
resolc-web.js_sha: ${{ steps.set-output.outputs.resolc_web_js_sha }}
env:
RELEASE_RESOLC_WASM_URI: https://github.com/paritytech/revive/releases/download/${{ github.ref_name }}/resolc.wasm
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: wasm32-unknown-emscripten
# without this it will override our rust flags
rustflags: ""
- name: Download Host LLVM
uses: ./.github/actions/get-llvm
with:
target: x86_64-unknown-linux-gnu
- name: Download Wasm LLVM
uses: ./.github/actions/get-llvm
with:
target: wasm32-unknown-emscripten
- name: Download EMSDK
uses: ./.github/actions/get-emsdk
- name: Build
run: |
export LLVM_SYS_181_PREFIX=$PWD/llvm-x86_64-unknown-linux-gnu
export REVIVE_LLVM_TARGET_PREFIX=$PWD/llvm-wasm32-unknown-emscripten
source emsdk/emsdk_env.sh
make install-wasm
chmod -x ./target/wasm32-unknown-emscripten/release/resolc.wasm
- name: Set Up Node.js
uses: actions/setup-node@v3
with:
node-version: "20"
- name: Basic Sanity Check
run: |
mkdir -p solc
curl -sSLo solc/soljson.js https://github.com/ethereum/solidity/releases/download/v0.8.30/soljson.js
node -e "
const soljson = require('solc/soljson');
const createRevive = require('./target/wasm32-unknown-emscripten/release/resolc.js');
const compiler = createRevive();
compiler.soljson = soljson;
const standardJsonInput =
{
language: 'Solidity',
sources: {
'MyContract.sol': {
content: 'pragma solidity ^0.8.0; contract MyContract { function greet() public pure returns (string memory) { return \'Hello\'; } }',
},
},
settings: { optimizer: { enabled: false } }
};
compiler.writeToStdin(JSON.stringify(standardJsonInput));
compiler.callMain(['--standard-json']);
// Collect output
const stdout = compiler.readFromStdout();
const stderr = compiler.readFromStderr();
if (stderr) { console.error(stderr); process.exit(1); }
let out = JSON.parse(stdout);
let bytecode = out.contracts['MyContract.sol']['MyContract'].evm.bytecode.object
console.log(bytecode);
if(!bytecode.startsWith('50564d')) { process.exit(1); }
"
- name: Compress Artifact
run: |
mkdir -p resolc-wasm32-unknown-emscripten
mv ./target/wasm32-unknown-emscripten/release/resolc.js ./resolc-wasm32-unknown-emscripten/
mv ./target/wasm32-unknown-emscripten/release/resolc.wasm ./resolc-wasm32-unknown-emscripten/
mv ./target/wasm32-unknown-emscripten/release/resolc_web.js ./resolc-wasm32-unknown-emscripten/
# There is no way to upload several files as several artifacts with a single upload-artifact step
# It's needed to have resolc_web.js separately for night builds for resolc-bin repo
# https://github.com/actions/upload-artifact/issues/331
- name: Upload artifact resolc.js (nightly)
uses: actions/upload-artifact@v4
with:
name: resolc.js
path: resolc-wasm32-unknown-emscripten/resolc.js
retention-days: 40
- name: Upload artifacts resolc.wasm (nightly)
uses: actions/upload-artifact@v4
with:
name: resolc.wasm
path: resolc-wasm32-unknown-emscripten/resolc.wasm
retention-days: 40
- name: Upload artifacts resolc_web.js (nightly)
uses: actions/upload-artifact@v4
id: artifact-upload-step
with:
name: resolc_web.js
path: resolc-wasm32-unknown-emscripten/resolc_web.js
retention-days: 40
- name: Set output variables
id: set-output
env:
TARGET: resolc_web_js
run: |
echo "Artifact URL is ${{ steps.artifact-upload-step.outputs.artifact-url }}"
echo "Artifact SHA is ${{ steps.artifact-upload-step.outputs.artifact-digest }}"
echo "${TARGET}_url=${{ steps.artifact-upload-step.outputs.artifact-url }}"
echo "${TARGET}_url=${{ steps.artifact-upload-step.outputs.artifact-url }}" >> "$GITHUB_OUTPUT"
echo "${TARGET}_sha=${{ steps.artifact-upload-step.outputs.artifact-digest }}""
echo "${TARGET}_sha=${{ steps.artifact-upload-step.outputs.artifact-digest }}"" >> "$GITHUB_OUTPUT"
create-macos-fat-binary: create-macos-fat-binary:
if: ${{ needs.check_commits.outputs.has_commits == 'true' }} if: ${{ needs.check_commits.outputs.has_commits == 'true' }}
@@ -85,14 +303,18 @@ jobs:
env: env:
TARGET: resolc-universal-apple-darwin TARGET: resolc-universal-apple-darwin
run: | run: |
echo "Artifact URL is ${{ steps.artifact-upload-step.outputs.artifact-url }}"
echo "Artifact SHA is ${{ steps.artifact-upload-step.outputs.artifact-digest }}"
echo "${TARGET}_url=${{ steps.artifact-upload-step.outputs.artifact-url }}"
echo "${TARGET}_url=${{ steps.artifact-upload-step.outputs.artifact-url }}" >> "$GITHUB_OUTPUT" echo "${TARGET}_url=${{ steps.artifact-upload-step.outputs.artifact-url }}" >> "$GITHUB_OUTPUT"
echo "${TARGET}_sha=${{ steps.artifact-upload-step.outputs.artifact-digest }}" >> "$GITHUB_OUTPUT" echo "${TARGET}_sha=${{ steps.artifact-upload-step.outputs.artifact-digest }}""
echo "${TARGET}_sha=${{ steps.artifact-upload-step.outputs.artifact-digest }}"" >> "$GITHUB_OUTPUT"
generate-nightly-json: generate-nightly-json:
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
if: ${{ needs.check_commits.outputs.has_commits == 'true' }} if: ${{ needs.check_commits.outputs.has_commits == 'true' }}
environment: tags environment: tags
needs: [build, create-macos-fat-binary, check_commits] needs: [build-wasm, build, create-macos-fat-binary, check_commits]
steps: steps:
- name: Checkout revive - name: Checkout revive
uses: actions/checkout@v4 uses: actions/checkout@v4
@@ -130,6 +352,8 @@ jobs:
echo '[' > data.json echo '[' > data.json
echo '${{ toJSON(needs.build.outputs) }}' >> data.json echo '${{ toJSON(needs.build.outputs) }}' >> data.json
echo ',' >> data.json echo ',' >> data.json
echo '${{ toJSON(needs.build-wasm.outputs) }}' >> data.json
echo ',' >> data.json
echo '${{ toJSON(needs.create-macos-fat-binary.outputs) }}' >> data.json echo '${{ toJSON(needs.create-macos-fat-binary.outputs) }}' >> data.json
echo ']' >> data.json echo ']' >> data.json
chmod +x bins/resolc-x86_64-unknown-linux-musl chmod +x bins/resolc-x86_64-unknown-linux-musl
+176 -12
View File
@@ -1,5 +1,4 @@
name: Build & Release name: Build & Release
on: on:
push: push:
branches: ["main"] branches: ["main"]
@@ -15,6 +14,8 @@ concurrency:
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
# if changed, dont forget to update the env var in release-nightly.yml
RUST_MUSL_CROSS_IMAGE: messense/rust-musl-cross@sha256:c0154e992adb791c3b848dd008939d19862549204f8cb26f5ca7a00f629e6067
jobs: jobs:
check-version-changed: check-version-changed:
@@ -28,28 +29,33 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
# Check that tag and version in Cargo.toml match
- name: Check versions - name: Check versions
id: versions id: versions
run: | run: |
if [[ $CURRENT_TAG == 'main' ]]; then if [[ $CURRENT_TAG == 'main' ]];
echo "::notice::Tag $CURRENT_TAG is not a release tag, skipping the check in the main branch" then
echo "::notice::Tag $CURRENT_TAG is not a release tag, skipping the check in the main branch";
exit 0 exit 0
fi fi
if [[ $CURRENT_TAG != "v"* ]]; then if [[ $CURRENT_TAG != "v"* ]];
echo "::notice::Tag $CURRENT_TAG is not a release tag, skipping the check in a PR" then
echo "::notice::Tag $CURRENT_TAG is not a release tag, skipping the check in a PR";
exit 0 exit 0
fi fi
export PKG_VER=v$(cat crates/resolc/Cargo.toml | grep -A 5 package] | grep version | cut -d '=' -f 2 | tr -d '"' | tr -d " ") export PKG_VER=v$(cat crates/resolc/Cargo.toml | grep -A 5 package] | grep version | cut -d '=' -f 2 | tr -d '"' | tr -d " ")
echo "Current tag $CURRENT_TAG" echo "Current tag $CURRENT_TAG"
echo "Package version $PKG_VER" echo "Package version $PKG_VER"
#
if [[ $CURRENT_TAG != $PKG_VER ]]; then if [[ $CURRENT_TAG != $PKG_VER ]];
echo "::error::Tag $CURRENT_TAG doesn't match package version $PKG_VER in Cargo.toml, please fix" then
echo "::error::Tag $CURRENT_TAG doesn't match package version $PKG_VER in Cargo.toml, please fix";
exit 1 exit 1
fi fi
# Generating release notes early, in order to avoid checkout at the last step
export RELEASE_NOTES="$(sed '/^## '${CURRENT_TAG}'/,/^## v/!d' CHANGELOG.md | sed -e '1d' -e '$d')" export RELEASE_NOTES="$(sed '/^## '${CURRENT_TAG}'/,/^## v/!d' CHANGELOG.md | sed -e '1d' -e '$d')"
echo "Release notes:" echo "Release notes:"
@@ -60,15 +66,173 @@ jobs:
echo 'EOF' >> $GITHUB_OUTPUT echo 'EOF' >> $GITHUB_OUTPUT
build: build:
strategy:
matrix:
target:
[
x86_64-unknown-linux-musl,
aarch64-apple-darwin,
x86_64-apple-darwin,
x86_64-pc-windows-msvc,
]
include:
- target: x86_64-unknown-linux-musl
type: musl
runner: ubuntu-24.04
- target: aarch64-apple-darwin
type: native
runner: macos-14
- target: x86_64-apple-darwin
type: native
runner: macos-13
- target: x86_64-pc-windows-msvc
type: native
runner: windows-2022
runs-on: ${{ matrix.runner }}
needs: [check-version-changed] needs: [check-version-changed]
uses: ./.github/workflows/reusable-build.yml steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with: with:
is_release: true # without this it will override our rust flags
retention_days: 1 rustflags: ""
cache-key: ${{ matrix.target }}
- name: Download LLVM
uses: ./.github/actions/get-llvm
with:
target: ${{ matrix.target }}
- name: Build
if: ${{ matrix.type == 'native' }}
shell: bash
run: |
export LLVM_SYS_181_PREFIX=$PWD/llvm-${{ matrix.target }}
make install-bin
mv target/release/resolc resolc-${{ matrix.target }} || mv target/release/resolc.exe resolc-${{ matrix.target }}.exe
- name: Build
if: ${{ matrix.type == 'musl' }}
run: |
docker run -v $PWD:/opt/revive $RUST_MUSL_CROSS_IMAGE /bin/bash -c "
cd /opt/revive
chown -R root:root .
apt update && apt upgrade -y && apt install -y pkg-config
export LLVM_SYS_181_PREFIX=/opt/revive/llvm-${{ matrix.target }}
make install-bin
mv target/${{ matrix.target }}/release/resolc resolc-${{ matrix.target }}
"
sudo chown -R $(id -u):$(id -g) .
- name: Install Solc
uses: ./.github/actions/get-solc
- name: Basic Sanity Check
shell: bash
run: |
result=$(./resolc-${{ matrix.target }} --bin crates/integration/contracts/flipper.sol)
echo $result
if [[ $result == *'50564d'* ]]; then exit 0; else exit 1; fi
- uses: actions/upload-artifact@v4
with:
name: resolc-${{ matrix.target }}
path: resolc-${{ matrix.target }}*
retention-days: 1
build-wasm:
runs-on: ubuntu-24.04
needs: [check-version-changed]
env:
RELEASE_RESOLC_WASM_URI: https://github.com/paritytech/revive/releases/download/${{ github.ref_name }}/resolc.wasm
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: wasm32-unknown-emscripten
# without this it will override our rust flags
rustflags: ""
- name: Download Host LLVM
uses: ./.github/actions/get-llvm
with:
target: x86_64-unknown-linux-gnu
- name: Download Wasm LLVM
uses: ./.github/actions/get-llvm
with:
target: wasm32-unknown-emscripten
- name: Download EMSDK
uses: ./.github/actions/get-emsdk
- name: Build
run: |
export LLVM_SYS_181_PREFIX=$PWD/llvm-x86_64-unknown-linux-gnu
export REVIVE_LLVM_TARGET_PREFIX=$PWD/llvm-wasm32-unknown-emscripten
source emsdk/emsdk_env.sh
make install-wasm
chmod -x ./target/wasm32-unknown-emscripten/release/resolc.wasm
- name: Set Up Node.js
uses: actions/setup-node@v3
with:
node-version: "20"
- name: Basic Sanity Check
run: |
mkdir -p solc
curl -sSLo solc/soljson.js https://github.com/ethereum/solidity/releases/download/v0.8.30/soljson.js
node -e "
const soljson = require('solc/soljson');
const createRevive = require('./target/wasm32-unknown-emscripten/release/resolc.js');
const compiler = createRevive();
compiler.soljson = soljson;
const standardJsonInput =
{
language: 'Solidity',
sources: {
'MyContract.sol': {
content: 'pragma solidity ^0.8.0; contract MyContract { function greet() public pure returns (string memory) { return \'Hello\'; } }',
},
},
settings: { optimizer: { enabled: false } }
};
compiler.writeToStdin(JSON.stringify(standardJsonInput));
compiler.callMain(['--standard-json']);
// Collect output
const stdout = compiler.readFromStdout();
const stderr = compiler.readFromStderr();
if (stderr) { console.error(stderr); process.exit(1); }
let out = JSON.parse(stdout);
let bytecode = out.contracts['MyContract.sol']['MyContract'].evm.bytecode.object
console.log(bytecode);
if(!bytecode.startsWith('50564d')) { process.exit(1); }
"
- name: Compress Artifact
run: |
mkdir -p resolc-wasm32-unknown-emscripten
mv ./target/wasm32-unknown-emscripten/release/resolc.js ./resolc-wasm32-unknown-emscripten/
mv ./target/wasm32-unknown-emscripten/release/resolc.wasm ./resolc-wasm32-unknown-emscripten/
mv ./target/wasm32-unknown-emscripten/release/resolc_web.js ./resolc-wasm32-unknown-emscripten/
- uses: actions/upload-artifact@v4
with:
name: resolc-wasm32-unknown-emscripten
path: resolc-wasm32-unknown-emscripten/*
retention-days: 1
create-release: create-release:
if: startsWith(github.ref_name, 'v') if: startsWith(github.ref_name, 'v')
needs: [check-version-changed, build] needs: [check-version-changed, build-wasm]
runs-on: macos-14 runs-on: macos-14
environment: tags environment: tags
steps: steps:
-262
View File
@@ -1,262 +0,0 @@
name: Reusable Build
on:
workflow_call:
inputs:
is_release:
description: "Whether this is a release build"
required: true
type: boolean
retention_days:
description: "Artifact retention days"
required: false
type: number
default: 1
outputs:
resolc-x86_64-unknown-linux-musl_url:
value: ${{ jobs.build.outputs.resolc-x86_64-unknown-linux-musl_url }}
resolc-x86_64-unknown-linux-musl_sha:
value: ${{ jobs.build.outputs.resolc-x86_64-unknown-linux-musl_sha }}
resolc-aarch64-apple-darwin_url:
value: ${{ jobs.build.outputs.resolc-aarch64-apple-darwin_url }}
resolc-aarch64-apple-darwin_sha:
value: ${{ jobs.build.outputs.resolc-aarch64-apple-darwin_sha }}
resolc-x86_64-apple-darwin_url:
value: ${{ jobs.build.outputs.resolc-x86_64-apple-darwin_url }}
resolc-x86_64-apple-darwin_sha:
value: ${{ jobs.build.outputs.resolc-x86_64-apple-darwin_sha }}
resolc-x86_64-pc-windows-msvc_url:
value: ${{ jobs.build.outputs.resolc-x86_64-pc-windows-msvc_url }}
resolc-x86_64-pc-windows-msvc_sha:
value: ${{ jobs.build.outputs.resolc-x86_64-pc-windows-msvc_sha }}
resolc-web_js_url:
value: ${{ jobs.build-wasm.outputs.resolc_web_js_url }}
resolc-web_js_sha:
value: ${{ jobs.build-wasm.outputs.resolc_web_js_sha }}
env:
CARGO_TERM_COLOR: always
RUST_MUSL_CROSS_IMAGE: messense/rust-musl-cross@sha256:c0154e992adb791c3b848dd008939d19862549204f8cb26f5ca7a00f629e6067
jobs:
build:
# github actions matrix jobs don't support multiple outputs
# ugly workaround from https://github.com/orgs/community/discussions/17245#discussioncomment-11222880
outputs:
resolc-x86_64-unknown-linux-musl_url: ${{ steps.set-output.outputs.resolc-x86_64-unknown-linux-musl_url }}
resolc-x86_64-unknown-linux-musl_sha: ${{ steps.set-output.outputs.resolc-x86_64-unknown-linux-musl_sha }}
resolc-aarch64-apple-darwin_url: ${{ steps.set-output.outputs.resolc-aarch64-apple-darwin_url }}
resolc-aarch64-apple-darwin_sha: ${{ steps.set-output.outputs.resolc-aarch64-apple-darwin_sha }}
resolc-x86_64-apple-darwin_url: ${{ steps.set-output.outputs.resolc-x86_64-apple-darwin_url }}
resolc-x86_64-apple-darwin_sha: ${{ steps.set-output.outputs.resolc-x86_64-apple-darwin_sha }}
resolc-x86_64-pc-windows-msvc_url: ${{ steps.set-output.outputs.resolc-x86_64-pc-windows-msvc_url }}
resolc-x86_64-pc-windows-msvc_sha: ${{ steps.set-output.outputs.resolc-x86_64-pc-windows-msvc_sha }}
strategy:
matrix:
target:
[
x86_64-unknown-linux-musl,
aarch64-apple-darwin,
x86_64-apple-darwin,
x86_64-pc-windows-msvc,
]
include:
- target: x86_64-unknown-linux-musl
type: musl
runner: ubuntu-24.04
- target: aarch64-apple-darwin
type: native
runner: macos-14
- target: x86_64-apple-darwin
type: native
runner: macos-13
- target: x86_64-pc-windows-msvc
type: native
runner: windows-2022
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ""
cache-key: ${{ matrix.target }}
- name: Download LLVM
uses: ./.github/actions/get-llvm
with:
target: ${{ matrix.target }}
- name: Build (Native)
if: ${{ matrix.type == 'native' }}
shell: bash
run: |
export LLVM_SYS_181_PREFIX=$PWD/llvm-${{ matrix.target }}
make install-bin
mv target/release/resolc resolc-${{ matrix.target }} || mv target/release/resolc.exe resolc-${{ matrix.target }}.exe
- name: Build (MUSL)
if: ${{ matrix.type == 'musl' }}
run: |
docker run -v $PWD:/opt/revive $RUST_MUSL_CROSS_IMAGE /bin/bash -c "
cd /opt/revive
chown -R root:root .
apt update && apt upgrade -y && apt install -y pkg-config
export LLVM_SYS_181_PREFIX=/opt/revive/llvm-${{ matrix.target }}
make install-bin
mv target/${{ matrix.target }}/release/resolc resolc-${{ matrix.target }}
"
sudo chown -R $(id -u):$(id -g) .
- name: Install Solc
uses: ./.github/actions/get-solc
- name: Basic Sanity Check
shell: bash
run: |
result=$(./resolc-${{ matrix.target }} --bin crates/integration/contracts/flipper.sol)
echo $result
if [[ $result == *'50564d'* ]]; then exit 0; else exit 1; fi
- uses: actions/upload-artifact@v4
id: artifact-upload-step
with:
name: resolc-${{ matrix.target }}
path: resolc-${{ matrix.target }}*
retention-days: ${{ inputs.retention_days }}
- name: Set output variables
if: ${{ !inputs.is_release }}
id: set-output
shell: bash
run: |
echo "resolc-${{ matrix.target }}_url=${{ steps.artifact-upload-step.outputs.artifact-url }}" >> "$GITHUB_OUTPUT"
echo "resolc-${{ matrix.target }}_sha=${{ steps.artifact-upload-step.outputs.artifact-digest }}" >> "$GITHUB_OUTPUT"
build-wasm:
runs-on: ubuntu-24.04
outputs:
resolc_web_js_url: ${{ steps.set-output.outputs.resolc_web_js_url }}
resolc_web_js_sha: ${{ steps.set-output.outputs.resolc_web_js_sha }}
env:
RELEASE_RESOLC_WASM_URI: https://github.com/paritytech/revive/releases/download/${{ github.ref_name }}/resolc.wasm
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: wasm32-unknown-emscripten
rustflags: ""
- name: Download Host LLVM
uses: ./.github/actions/get-llvm
with:
target: x86_64-unknown-linux-gnu
- name: Download Wasm LLVM
uses: ./.github/actions/get-llvm
with:
target: wasm32-unknown-emscripten
- name: Download EMSDK
uses: ./.github/actions/get-emsdk
- name: Build
run: |
export LLVM_SYS_181_PREFIX=$PWD/llvm-x86_64-unknown-linux-gnu
export REVIVE_LLVM_TARGET_PREFIX=$PWD/llvm-wasm32-unknown-emscripten
source emsdk/emsdk_env.sh
make install-wasm
chmod -x ./target/wasm32-unknown-emscripten/release/resolc.wasm
- name: Set Up Node.js
uses: actions/setup-node@v3
with:
node-version: "20"
- name: Basic Sanity Check
run: |
mkdir -p solc
curl -sSLo solc/soljson.js https://github.com/ethereum/solidity/releases/download/v0.8.30/soljson.js
node -e "
const soljson = require('solc/soljson');
const createRevive = require('./target/wasm32-unknown-emscripten/release/resolc.js');
const compiler = createRevive();
compiler.soljson = soljson;
const standardJsonInput =
{
language: 'Solidity',
sources: {
'MyContract.sol': {
content: 'pragma solidity ^0.8.0; contract MyContract { function greet() public pure returns (string memory) { return \'Hello\'; } }',
},
},
settings: { optimizer: { enabled: false } }
};
compiler.writeToStdin(JSON.stringify(standardJsonInput));
compiler.callMain(['--standard-json']);
const stdout = compiler.readFromStdout();
const stderr = compiler.readFromStderr();
if (stderr) { console.error(stderr); process.exit(1); }
let out = JSON.parse(stdout);
let bytecode = out.contracts['MyContract.sol']['MyContract'].evm.bytecode.object
console.log(bytecode);
if(!bytecode.startsWith('50564d')) { process.exit(1); }
"
- name: Compress Artifact
run: |
mkdir -p resolc-wasm32-unknown-emscripten
mv ./target/wasm32-unknown-emscripten/release/resolc.js ./resolc-wasm32-unknown-emscripten/
mv ./target/wasm32-unknown-emscripten/release/resolc.wasm ./resolc-wasm32-unknown-emscripten/
mv ./target/wasm32-unknown-emscripten/release/resolc_web.js ./resolc-wasm32-unknown-emscripten/
- name: Upload artifacts (Release)
if: ${{ inputs.is_release }}
uses: actions/upload-artifact@v4
with:
name: resolc-wasm32-unknown-emscripten
path: resolc-wasm32-unknown-emscripten/*
retention-days: ${{ inputs.retention_days }}
# There is no way to upload several files as several artifacts with a single upload-artifact step
# It's needed to have resolc_web.js separately for night builds for resolc-bin repo
# https://github.com/actions/upload-artifact/issues/331
- name: Upload artifact resolc.js (Nightly)
if: ${{ !inputs.is_release }}
uses: actions/upload-artifact@v4
with:
name: resolc.js
path: resolc-wasm32-unknown-emscripten/resolc.js
retention-days: ${{ inputs.retention_days }}
- name: Upload artifacts resolc.wasm (Nightly)
if: ${{ !inputs.is_release }}
uses: actions/upload-artifact@v4
with:
name: resolc.wasm
path: resolc-wasm32-unknown-emscripten/resolc.wasm
retention-days: ${{ inputs.retention_days }}
- name: Upload artifacts resolc_web.js (Nightly)
if: ${{ !inputs.is_release }}
uses: actions/upload-artifact@v4
id: artifact-upload-step
with:
name: resolc_web.js
path: resolc-wasm32-unknown-emscripten/resolc_web.js
retention-days: ${{ inputs.retention_days }}
- name: Set output variables
if: ${{ !inputs.is_release }}
id: set-output
env:
TARGET: resolc_web_js
run: |
echo "${TARGET}_url=${{ steps.artifact-upload-step.outputs.artifact-url }}" >> "$GITHUB_OUTPUT"
echo "${TARGET}_sha=${{ steps.artifact-upload-step.outputs.artifact-digest }}" >> "$GITHUB_OUTPUT"
-10
View File
@@ -6,16 +6,6 @@ This is a development pre-release.
Supported `polkadot-sdk` rev: `2503.0.1` Supported `polkadot-sdk` rev: `2503.0.1`
## v0.4.1
This is a development pre-release.
Supported `polkadot-sdk` rev: `2503.0.1`
### Changed
- The `ast` output is no longer pruned in standard JSON mode (required for foundry).
- Support `standard_json.output_selection` to also look at per file settings.
## v0.4.0 ## v0.4.0
This is a development pre-release. This is a development pre-release.
Generated
+430 -532
View File
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -19,17 +19,17 @@ resolc = { version = "0.4.0", path = "crates/resolc", default-features = false }
revive-benchmarks = { version = "0.1.0", path = "crates/benchmarks" } revive-benchmarks = { version = "0.1.0", path = "crates/benchmarks" }
revive-build-utils = { version = "0.2.0", path = "crates/build-utils" } revive-build-utils = { version = "0.2.0", path = "crates/build-utils" }
revive-builtins = { version = "0.1.0", path = "crates/builtins" } revive-builtins = { version = "0.1.0", path = "crates/builtins" }
revive-common = { version = "0.2.1", path = "crates/common" } revive-common = { version = "0.2.0", path = "crates/common" }
revive-differential = { version = "0.2.0", path = "crates/differential" } revive-differential = { version = "0.2.0", path = "crates/differential" }
revive-explorer = { version = "0.1.0", path = "crates/explore" } revive-explorer = { version = "0.1.0", path = "crates/explore" }
revive-integration = { version = "0.2.0", path = "crates/integration" } revive-integration = { version = "0.2.0", path = "crates/integration" }
revive-linker = { version = "0.2.0", path = "crates/linker" } revive-linker = { version = "0.2.0", path = "crates/linker" }
revive-llvm-context = { version = "0.4.1", path = "crates/llvm-context" } revive-llvm-context = { version = "0.4.0", path = "crates/llvm-context" }
revive-runner = { version = "0.2.0", path = "crates/runner" } revive-runner = { version = "0.2.0", path = "crates/runner" }
revive-runtime-api = { version = "0.3.0", path = "crates/runtime-api" } revive-runtime-api = { version = "0.3.0", path = "crates/runtime-api" }
revive-solc-json-interface = { version = "0.4.0", path = "crates/solc-json-interface", default-features = false } revive-solc-json-interface = { version = "0.3.0", path = "crates/solc-json-interface", default-features = false }
revive-stdlib = { version = "0.2.0", path = "crates/stdlib" } revive-stdlib = { version = "0.2.0", path = "crates/stdlib" }
revive-yul = { version = "0.3.1", path = "crates/yul" } revive-yul = { version = "0.3.0", path = "crates/yul" }
hex = "0.4.3" hex = "0.4.3"
cc = "1.2" cc = "1.2"
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "revive-common" name = "revive-common"
version = "0.2.1" version = "0.2.0"
license.workspace = true license.workspace = true
edition.workspace = true edition.workspace = true
repository.workspace = true repository.workspace = true
+2 -2
View File
@@ -30,8 +30,8 @@ impl FromStr for ObjectFormat {
"PVM" => Ok(Self::PVM), "PVM" => Ok(Self::PVM),
_ => anyhow::bail!( _ => anyhow::bail!(
"Unknown object format: {value}. Supported formats: {}, {}", "Unknown object format: {value}. Supported formats: {}, {}",
Self::ELF, Self::ELF.to_string(),
Self::PVM, Self::PVM.to_string()
), ),
} }
} }
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "revive-llvm-context" name = "revive-llvm-context"
version = "0.4.1" version = "0.4.0"
license.workspace = true license.workspace = true
edition.workspace = true edition.workspace = true
repository.workspace = true repository.workspace = true
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "resolc" name = "resolc"
version = "0.4.1" version = "0.4.0"
license.workspace = true license.workspace = true
edition.workspace = true edition.workspace = true
repository.workspace = true repository.workspace = true
+2 -2
View File
@@ -88,7 +88,7 @@ impl Compiler for SolcCompiler {
anyhow::bail!( anyhow::bail!(
"{} error: {}", "{} error: {}",
self.executable, self.executable,
String::from_utf8_lossy(output.stderr.as_slice()) String::from_utf8_lossy(output.stderr.as_slice()).to_string()
); );
} }
@@ -187,7 +187,7 @@ impl Compiler for SolcCompiler {
anyhow::bail!( anyhow::bail!(
"{} error: {}", "{} error: {}",
self.executable, self.executable,
String::from_utf8_lossy(output.stderr.as_slice()) String::from_utf8_lossy(output.stderr.as_slice()).to_string()
); );
} }
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "revive-solc-json-interface" name = "revive-solc-json-interface"
version = "0.4.0" version = "0.3.0"
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true
edition.workspace = true edition.workspace = true
@@ -47,3 +47,24 @@ pub enum Flag {
#[serde(rename = "ir")] #[serde(rename = "ir")]
Ir, Ir,
} }
//impl std::fmt::Display for Flag {
// fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
// match self {
// Self::ABI => write!(f, "abi"),
// Self::Metadata => write!(f, "metadata"),
// Self::Devdoc => write!(f, "devdoc"),
// Self::Userdoc => write!(f, "userdoc"),
// Self::MethodIdentifiers => write!(f, "evm.methodIdentifiers"),
// Self::StorageLayout => write!(f, "storageLayout"),
// Self::AST => write!(f, "ast"),
// Self::Yul => write!(f, "irOptimized"),
// Self::EVM => write!(f, "evm"),
// Self::EVMLA => write!(f, "evm.legacyAssembly"),
// Self::EVMBC => write!(f, "evm.bytecode"),
// Self::EVMDBC => write!(f, "evm.deployedBytecode"),
// Self::Assembly => write!(f, "evm.assembly"),
// Self::Ir => write!(f, "ir"),
// }
// }
//}
@@ -40,6 +40,17 @@ impl File {
per_contract, per_contract,
} }
} }
/// Creates the selection required for production compilation (excludes EVM bytecode).
pub fn new_required() -> Self {
Self {
per_file: HashSet::from_iter([SelectionFlag::AST]),
per_contract: HashSet::from_iter([
SelectionFlag::MethodIdentifiers,
SelectionFlag::Metadata,
SelectionFlag::Yul,
]),
}
}
/// Creates the selection required for test compilation (includes EVM bytecode). /// Creates the selection required for test compilation (includes EVM bytecode).
pub fn new_required_for_tests() -> Self { pub fn new_required_for_tests() -> Self {
@@ -55,6 +66,16 @@ impl File {
} }
} }
/// Extends the user's output selection with flag required by our compilation process.
pub fn extend_with_required(&mut self) -> &mut Self {
let required = Self::new_required();
self.per_file.extend(required.per_file);
self.per_contract.extend(required.per_contract);
self
}
/// Extends the output selection with another one. /// Extends the output selection with another one.
pub fn extend(&mut self, other: Self) -> &mut Self { pub fn extend(&mut self, other: Self) -> &mut Self {
self.per_file.extend(other.per_file); self.per_file.extend(other.per_file);
@@ -10,63 +10,15 @@ use serde::Serialize;
use self::file::flag::Flag; use self::file::flag::Flag;
use self::file::File as FileSelection; use self::file::File as FileSelection;
/// The `solc --standard-json` per-file output selection.
#[derive(Clone, Debug, Serialize, Deserialize, Default, PartialEq)]
pub struct PerFileSelection {
/// Individual file selection configuration, required for foundry.
#[serde(skip_serializing_if = "BTreeMap::is_empty", flatten)]
pub files: BTreeMap<String, FileSelection>,
}
impl PerFileSelection {
/// Extends the output selection with another one.
pub fn extend(&mut self, other: Self) {
for (entry, file) in other.files {
self.files
.entry(entry)
.and_modify(|v| {
v.extend(file.clone());
})
.or_insert(file);
}
}
/// Returns flags that are going to be automatically added by the compiler,
/// but were not explicitly requested by the user.
///
/// Afterwards, the flags are used to prune JSON output before returning it.
pub fn selection_to_prune(&self) -> Self {
let files = self
.files
.iter()
.map(|(k, v)| (k.to_owned(), v.selection_to_prune()))
.collect();
Self { files }
}
/// Returns whether `path` contains the `flag` or `None` if there is no selection for `path`.
pub fn contains(&self, path: &String, flag: &Flag) -> Option<bool> {
if let Some(file) = self.files.get(path) {
return Some(file.contains(flag));
};
None
}
/// Returns whether this is the empty per file selection.
pub fn is_empty(&self) -> bool {
self.files.is_empty()
}
}
/// The `solc --standard-json` output selection. /// The `solc --standard-json` output selection.
#[derive(Clone, Debug, Serialize, Deserialize, Default, PartialEq)] #[derive(Clone, Debug, Serialize, Deserialize, Default, PartialEq)]
pub struct Selection { pub struct Selection {
/// Only the 'all' wildcard is available for robustness reasons. /// Only the 'all' wildcard is available for robustness reasons.
#[serde(default, rename = "*", skip_serializing_if = "FileSelection::is_empty")] #[serde(default, rename = "*", skip_serializing_if = "FileSelection::is_empty")]
/// Individual file selection configuration, required for foundry. all: FileSelection,
pub all: FileSelection,
#[serde(skip_serializing_if = "PerFileSelection::is_empty", flatten)] #[serde(skip_serializing_if = "BTreeMap::is_empty", flatten)]
files: PerFileSelection, pub files: BTreeMap<String, FileSelection>,
} }
impl Selection { impl Selection {
@@ -80,19 +32,17 @@ impl Selection {
/// Creates the selection required by our compilation process. /// Creates the selection required by our compilation process.
pub fn new_required() -> Self { pub fn new_required() -> Self {
Self::new(vec![ Self {
Flag::AST, all: FileSelection::new_required(),
Flag::MethodIdentifiers, files: BTreeMap::new(),
Flag::Metadata, }
Flag::Yul,
])
} }
/// Creates the selection required for test compilation (includes EVM bytecode). /// Creates the selection required for test compilation (includes EVM bytecode).
pub fn new_required_for_tests() -> Self { pub fn new_required_for_tests() -> Self {
Self { Self {
all: FileSelection::new_required_for_tests(), all: FileSelection::new_required_for_tests(),
files: Default::default(), files: BTreeMap::new(),
} }
} }
@@ -104,7 +54,6 @@ impl Selection {
/// Extends the output selection with another one. /// Extends the output selection with another one.
pub fn extend(&mut self, other: Self) -> &mut Self { pub fn extend(&mut self, other: Self) -> &mut Self {
self.all.extend(other.all); self.all.extend(other.all);
self.files.extend(other.files);
self self
} }
@@ -115,14 +64,12 @@ impl Selection {
pub fn selection_to_prune(&self) -> Self { pub fn selection_to_prune(&self) -> Self {
Self { Self {
all: self.all.selection_to_prune(), all: self.all.selection_to_prune(),
files: self.files.selection_to_prune(), files: Default::default(),
} }
} }
/// Whether the flag is requested. /// Whether the flag is requested.
pub fn contains(&self, path: &String, flag: &Flag) -> bool { pub fn contains(&self, flag: &Flag) -> bool {
self.files self.all.contains(flag)
.contains(path, flag)
.unwrap_or(self.all.contains(flag))
} }
} }
@@ -2,9 +2,7 @@
pub mod evm; pub mod evm;
#[cfg(feature = "resolc")]
use std::collections::BTreeMap; use std::collections::BTreeMap;
#[cfg(feature = "resolc")]
use std::collections::BTreeSet; use std::collections::BTreeSet;
use serde::Deserialize; use serde::Deserialize;
@@ -47,24 +45,19 @@ pub struct Contract {
#[serde(default, skip_serializing_if = "Option::is_none")] #[serde(default, skip_serializing_if = "Option::is_none")]
pub hash: Option<String>, pub hash: Option<String>,
/// Unlinked factory dependencies. /// Unlinked factory dependencies.
#[cfg(feature = "resolc")]
#[serde(default, skip_deserializing)] #[serde(default, skip_deserializing)]
pub factory_dependencies_unlinked: BTreeSet<String>, pub factory_dependencies_unlinked: BTreeSet<String>,
/// The contract factory dependencies. /// The contract factory dependencies.
#[cfg(feature = "resolc")]
#[serde(default, skip_deserializing)] #[serde(default, skip_deserializing)]
pub factory_dependencies: BTreeMap<String, String>, pub factory_dependencies: BTreeMap<String, String>,
/// Missing linkable libraries. /// Missing linkable libraries.
#[cfg(feature = "resolc")]
#[serde(default, skip_deserializing)] #[serde(default, skip_deserializing)]
pub missing_libraries: BTreeSet<String>, pub missing_libraries: BTreeSet<String>,
/// Binary object format. /// Binary object format.
#[cfg(feature = "resolc")] #[serde(default, skip_deserializing)]
#[serde(default, skip_deserializing, skip_serializing_if = "Option::is_none")]
pub object_format: Option<revive_common::ObjectFormat>, pub object_format: Option<revive_common::ObjectFormat>,
} }
#[cfg(feature = "resolc")]
impl Contract { impl Contract {
/// Checks if all fields are unset or empty. /// Checks if all fields are unset or empty.
pub fn is_empty(&self) -> bool { pub fn is_empty(&self) -> bool {
@@ -12,7 +12,7 @@ use crate::standard_json::output::error::error_handler::ErrorHandler;
use crate::SolcStandardJsonInputSettingsSelection; use crate::SolcStandardJsonInputSettingsSelection;
#[cfg(feature = "resolc")] #[cfg(feature = "resolc")]
use crate::SolcStandardJsonInputSource; use crate::SolcStandardJsonInputSource;
#[cfg(all(feature = "parallel", feature = "resolc"))] #[cfg(feature = "parallel")]
use rayon::iter::{IntoParallelRefIterator, ParallelIterator}; use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
use self::contract::Contract; use self::contract::Contract;
@@ -56,22 +56,14 @@ impl Output {
messages: &mut Vec<SolcStandardJsonOutputError>, messages: &mut Vec<SolcStandardJsonOutputError>,
) -> Self { ) -> Self {
let sources = sources let sources = sources
.iter() .keys()
.enumerate() .enumerate()
.map(|(index, (path, source))| { .map(|(index, path)| (path.to_owned(), Source::new(index)))
(
path.to_owned(),
Source {
id: index,
ast: source.content().map(|x| serde_json::to_value(x).unwrap()),
},
)
})
.collect::<BTreeMap<String, Source>>(); .collect::<BTreeMap<String, Source>>();
Self { Self {
contracts: BTreeMap::new(), contracts: BTreeMap::new(),
sources: sources.clone(), sources,
errors: std::mem::take(messages), errors: std::mem::take(messages),
version: None, version: None,
@@ -100,30 +92,39 @@ impl Output {
mut self, mut self,
selection_to_prune: SolcStandardJsonInputSettingsSelection, selection_to_prune: SolcStandardJsonInputSettingsSelection,
) -> ! { ) -> ! {
for (path, contracts) in self.contracts.iter_mut() { let sources = self.sources.values_mut().collect::<Vec<&mut Source>>();
for contract in contracts.values_mut() { for source in sources.into_iter() {
if selection_to_prune.contains( if selection_to_prune
path, .contains(&crate::SolcStandardJsonInputSettingsSelectionFileFlag::AST)
&crate::SolcStandardJsonInputSettingsSelectionFileFlag::Metadata, {
) { source.ast = None;
}
}
let contracts = self
.contracts
.values_mut()
.flat_map(|contracts| contracts.values_mut())
.collect::<Vec<&mut Contract>>();
for contract in contracts.into_iter() {
if selection_to_prune
.contains(&crate::SolcStandardJsonInputSettingsSelectionFileFlag::Metadata)
{
contract.metadata = serde_json::Value::Null; contract.metadata = serde_json::Value::Null;
} }
if selection_to_prune.contains( if selection_to_prune
path, .contains(&crate::SolcStandardJsonInputSettingsSelectionFileFlag::Yul)
&crate::SolcStandardJsonInputSettingsSelectionFileFlag::Yul, {
) {
contract.ir_optimized = String::new(); contract.ir_optimized = String::new();
} }
if let Some(ref mut evm) = contract.evm { if let Some(ref mut evm) = contract.evm {
if selection_to_prune.contains( if selection_to_prune.contains(
path,
&crate::SolcStandardJsonInputSettingsSelectionFileFlag::MethodIdentifiers, &crate::SolcStandardJsonInputSettingsSelectionFileFlag::MethodIdentifiers,
) { ) {
evm.method_identifiers.clear(); evm.method_identifiers.clear();
} }
} }
} }
}
self.contracts.retain(|_, contracts| { self.contracts.retain(|_, contracts| {
contracts.retain(|_, contract| !contract.is_empty()); contracts.retain(|_, contract| !contract.is_empty());
+1 -1
View File
@@ -1,7 +1,7 @@
[package] [package]
name = "revive-yul" name = "revive-yul"
description = "The revive YUL parser library." description = "The revive YUL parser library."
version = "0.3.1" version = "0.3.0"
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true
edition.workspace = true edition.workspace = true
@@ -115,7 +115,7 @@ impl Expression {
anyhow::anyhow!( anyhow::anyhow!(
"{} Invalid literal `{}`: {}", "{} Invalid literal `{}`: {}",
literal.location, literal.location,
literal.inner, literal.inner.to_string(),
error error
) )
}) })
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "@parity/resolc", "name": "@parity/resolc",
"license": "Apache-2.0", "license": "Apache-2.0",
"version": "0.4.1", "version": "0.4.0",
"author": "Parity <admin@parity.io> (https://parity.io)", "author": "Parity <admin@parity.io> (https://parity.io)",
"module": "index.ts", "module": "index.ts",
"types": "./dist/index.d.ts", "types": "./dist/index.d.ts",
+1 -1
View File
@@ -31,7 +31,7 @@
}, },
"js/resolc": { "js/resolc": {
"name": "@parity/resolc", "name": "@parity/resolc",
"version": "0.4.1", "version": "0.4.0",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"@types/node": "^22.9.0", "@types/node": "^22.9.0",