-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Update Rust toolchain to 1.93.1 and add wasm32-linera-chain target #5646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: testnet_conway
Are you sure you want to change the base?
Changes from all commits
b493822
2966f15
56d0563
1248371
82fc27d
61524a5
02c2b1e
0969f84
bc743e4
500d1b6
dc7d8f4
a34257b
f2e515c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,11 @@ | ||
| [target.aarch64-unknown-linux-gnu] | ||
| linker = "aarch64-linux-gnu-gcc" | ||
|
|
||
| [env] | ||
| # Makes `--target wasm32-linera-chain` resolve to linera-service/wasm32-linera-chain.json | ||
| # anywhere in the repo. | ||
| RUST_TARGET_PATH = { value = "linera-service", relative = true } | ||
|
|
||
| [build] | ||
| # We allow redundant explicit links because `cargo rdme` doesn't know how to resolve implicit intra-crate links. | ||
| rustdocflags = ["-Arustdoc::redundant_explicit_links"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,6 +66,9 @@ jobs: | |
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
| - name: Install nightly toolchain for wasm builds | ||
| run: | | ||
| rustup toolchain install $(sed -n 's/^channel = "\(.*\)"/\1/p' toolchains/nightly/rust-toolchain.toml) --component rust-src | ||
| - name: Install Protoc | ||
| uses: arduino/setup-protoc@v3 | ||
| with: | ||
|
|
@@ -233,6 +236,9 @@ jobs: | |
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
| - name: Install nightly toolchain for wasm builds | ||
| run: | | ||
| rustup toolchain install $(sed -n 's/^channel = "\(.*\)"/\1/p' toolchains/nightly/rust-toolchain.toml) --component rust-src | ||
| - name: Install Protoc | ||
| uses: arduino/setup-protoc@v3 | ||
| with: | ||
|
|
@@ -279,6 +285,11 @@ jobs: | |
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
| with: | ||
| override: false | ||
| - name: Install nightly toolchain for wasm builds | ||
| run: | | ||
| rustup toolchain install $(sed -n 's/^channel = "\(.*\)"/\1/p' toolchains/nightly/rust-toolchain.toml) --component rust-src | ||
| - name: Install Protoc | ||
| uses: arduino/setup-protoc@v3 | ||
| with: | ||
|
|
@@ -303,6 +314,11 @@ jobs: | |
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
| with: | ||
| override: false | ||
| - name: Install nightly toolchain for wasm builds | ||
| run: | | ||
| rustup toolchain install $(sed -n 's/^channel = "\(.*\)"/\1/p' toolchains/nightly/rust-toolchain.toml) --component rust-src | ||
| - uses: foundry-rs/foundry-toolchain@v1.4.0 | ||
| - name: Ensure Solc Directory Exists | ||
| run: mkdir -p /home/runner/.solc | ||
|
|
@@ -365,14 +381,18 @@ jobs: | |
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
| - name: Install nightly toolchain for wasm builds | ||
| run: | | ||
| rustup toolchain install $(sed -n 's/^channel = "\(.*\)"/\1/p' toolchains/nightly/rust-toolchain.toml) --component rust-src | ||
| - name: Install Protoc | ||
| uses: arduino/setup-protoc@v3 | ||
| with: | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Build example applications | ||
| run: | | ||
| unset RUSTUP_TOOLCHAIN RUSTFLAGS | ||
| cd examples | ||
| cargo build --locked --release --target wasm32-unknown-unknown | ||
| cargo build --locked --release --target wasm32-linera-chain | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can (and should) put this in
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IIRC, the issue was that
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think its RUSTFLAGS specifically are a bit fiddly. But the |
||
| - name: Run the storage-service instance | ||
| run: | | ||
| cargo run --release -p linera-storage-service -- memory --endpoint $LINERA_STORAGE_SERVICE & | ||
|
|
@@ -556,7 +576,7 @@ jobs: | |
| needs: changed-files | ||
| if: needs.changed-files.outputs.should-run == 'true' | ||
| runs-on: linera-io-self-hosted-ci | ||
| timeout-minutes: 20 | ||
| timeout-minutes: 40 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| [env] | ||
| # Makes `--target wasm32-linera-chain` resolve to linera-service/wasm32-linera-chain.json | ||
| RUST_TARGET_PATH = { value = "../linera-service", relative = true } | ||
|
|
||
| [build] | ||
| # Required for rustc to accept the custom wasm32-linera-chain target spec. | ||
| rustflags = ["-Zunstable-options"] | ||
|
|
||
| [unstable] | ||
| build-std = ["std", "panic_abort"] | ||
| json-target-spec = true |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't love parsing TOML with
sed😅 We do this generally by linking the toolchain torust-toolchain.toml.I wonder if it's time to always use a nightly toolchain. We can still be compatible with stable Rust by forbidding
#![feature]flags in the core code — @ma2bd for interest.