Skip to content

Pin Rust toolchain to pre-1.82 for soroban-sdk 21 wasm compatibility - #35

Open
priscaenoch wants to merge 1 commit into
octraban:mainfrom
priscaenoch:drips/13
Open

priscaenoch wants to merge 1 commit into
octraban:mainfrom
priscaenoch:drips/13

Conversation

@priscaenoch

Copy link
Copy Markdown
Contributor

Summary

Pin Rust toolchain to pre-1.82 for soroban-sdk 21 wasm compatibility

What was solved

#13 — Pin the Rust toolchain with a rust-toolchain.toml

Add a root rust-toolchain.toml pinning the Rust channel (pre-1.82, e.g. 1.81.0) with targets = ["wasm32-unknown-unknown"] and components rustfmt/clippy, then reference the pinned toolchain in README build notes and the CI workflow so local and CI builds match and avoid the reference-types/multivalue wasm issue with soroban-sdk 21.

Addressed:

  • Changed: rust-toolchain.toml, rust-toolchain.toml, README.md, .github/workflows/ci.yml
  • Add new rust-toolchain.toml at repository root pinning the channel and declaring targets = ["wasm32-unknown-unknown"] and components rustfmt and clippy
  • Pin a channel below Rust 1.82 (e.g. 1.81.0) since 1.82+ emits reference-types/multivalue that soroban-sdk 21's VM rejects
  • Reference the pinned toolchain in README build notes

Changes

  • README.md (modify)
  • .github/workflows/ci.yml (modify)
  • rust-toolchain.toml (create)

Approach

  1. Create rust-toolchain.toml at repo root pinning channel = "1.81.0" with targets = ["wasm32-unknown-unknown"] and components = ["rustfmt", "clippy"]
  2. Update README.md build notes to mention the pinned toolchain (rustup auto-selects it) and keep the existing wasm-opt step wording intact
  3. Update .github/workflows/ci.yml to ensure the pinned toolchain is used (e.g. rustup show / rustup target add wasm32-unknown-unknown) without altering unrelated jobs
  4. Verify no other files, tests, snapshots, or workflows are modified

Issues

Closes #13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pin the Rust toolchain with a rust-toolchain.toml

1 participant