Skip to content

Warn against wasm32-unknown-unknown on Rust 1.82+#2481

Open
leighmcculloch wants to merge 1 commit into
mainfrom
claude/sharp-hypatia-50om7e
Open

Warn against wasm32-unknown-unknown on Rust 1.82+#2481
leighmcculloch wants to merge 1 commit into
mainfrom
claude/sharp-hypatia-50om7e

Conversation

@leighmcculloch

@leighmcculloch leighmcculloch commented Jun 8, 2026

Copy link
Copy Markdown
Member

What

Add :::warning admonitions to the "Install the target" section of setup.mdx and the "Limited WebAssembly features" section of rust-dialect.mdx documenting that wasm32-unknown-unknown is not a supported build target for Soroban contracts on Rust 1.82 or newer, that it will produce a build error from the SDK's build script, and that wasm32v1-none (via stellar contract build) is the correct target.

Why

The SDK's build script has rejected wasm32-unknown-unknown builds on Rust 1.82+ since that target began enabling WebAssembly features (reference-types, multi-value) the Soroban runtime does not support, but the developer docs contained no mention of this constraint. Developers upgrading their Rust toolchain, including the Scout security tooling team who filed rs-soroban-sdk#1843 after a routine upgrade, had no way to discover the supported target from the docs before their builds broke. rs-soroban-sdk#1900 added the documentation to the crate itself; this PR mirrors it in the Stellar developer docs.

Copilot AI review requested due to automatic review settings June 8, 2026 22:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR primarily adds explicit documentation warnings about wasm32-unknown-unknown being unsupported for Soroban contracts on Rust 1.82+ (and points users to wasm32v1-none / stellar contract build). In addition, it introduces a new build-time generator for a Stellar CLI community plugins list and adjusts some CLI docs/build outputs.

Changes:

  • Added :::warning admonitions in two docs pages explaining why wasm32-unknown-unknown is rejected on Rust 1.82+ and what to use instead.
  • Added a new script to generate docs/tools/cli/plugins-list.mdx from GitHub “stellar-cli-plugin” topic search results, wired into yarn stellar-cli:build, and exposed via routes.txt.
  • Updated CLI plugin docs command examples and changed the generated Stellar CLI manual’s sidebar_position.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
scripts/stellar_cli.mjs Changes generated Stellar CLI manual frontmatter ordering (sidebar_position).
scripts/stellar_cli_plugins.mjs Adds GitHub-driven generator for a community plugins list (build-time).
routes.txt Adds the /docs/tools/cli/plugins-list route.
package.json Runs the new plugins-list generator as part of stellar-cli:build.
docs/tools/cli/plugins.mdx Updates plugin listing command examples to stellar plugin ls.
docs/tools/cli/plugins-list.mdx Adds a stub file to be overwritten by build-time generation.
docs/learn/fundamentals/contract-development/rust-dialect.mdx Adds a warning about Rust target compatibility and notes stellar contract build.
docs/build/smart-contracts/getting-started/setup.mdx Adds a warning admonition about the unsupported target on Rust 1.82+.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/stellar_cli_plugins.mjs
Comment thread scripts/stellar_cli_plugins.mjs
Comment thread scripts/stellar_cli_plugins.mjs
Comment thread package.json
@stellar-jenkins-ci

Copy link
Copy Markdown

rs-soroban-sdk PR #1900 formally documented that wasm32-unknown-unknown
is rejected by the SDK's build script on Rust 1.82+, because that
target enables WebAssembly features (reference-types, multi-value) the
Soroban runtime does not support. Mirrors that warning in the developer
docs so consumers learn about the constraint before their builds break.

- setup.mdx: add a :::warning admonition in the "Install the target"
  section pointing users to wasm32v1-none and stellar contract build
- rust-dialect.mdx: expand the "Limited WebAssembly features" section
  with an explicit warning about wasm32-unknown-unknown producing a
  build error on Rust 1.82+, and note that stellar contract build
  selects the correct target automatically

Closes context from stellar/rs-soroban-sdk#1900
@leighmcculloch leighmcculloch force-pushed the claude/sharp-hypatia-50om7e branch from 214fa15 to 3f90b82 Compare June 9, 2026 02:07
@stellar-jenkins-ci

Copy link
Copy Markdown

@leighmcculloch leighmcculloch changed the title docs: warn that wasm32-unknown-unknown is unsupported on Rust 1.82+ Warn against wasm32-unknown-unknown on Rust 1.82+ Jun 9, 2026
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.

3 participants