Skip to content

Standardize WASM build target to wasm32-unknown-unknown in CI and fix wasm32v1-none mismatch #449

@Jagadeeshftw

Description

@Jagadeeshftw

Description

The CI workflow at .github/workflows/contracts.yml currently uses an inconsistent WASM build target, mixing wasm32-unknown-unknown and wasm32v1-none in different job steps. Soroban SDK 23.4.1 requires wasm32-unknown-unknown for contract compilation, and using wasm32v1-none causes linker errors or silently produces incompatible binaries that fail on-network deployment. All CI build steps must be normalized to wasm32-unknown-unknown with the mismatch documented in the build guide.

Requirements and context

  • Audit all cargo build and stellar contract build invocations in .github/workflows/contracts.yml for target flags
  • Replace all occurrences of wasm32v1-none with wasm32-unknown-unknown
  • Update .cargo/config.toml if a default target override exists and is incorrect
  • Must be secure, tested, and documented
  • Should be efficient and easy to review

Suggested execution

Fork the repo and create a branch

git checkout -b feature/standardize-wasm-build-target

Implement changes

  • Update/Write contract: onchain/contracts/stello_pay_contract/src/lib.rs
  • Write comprehensive tests: onchain/contracts/stello_pay_contract/tests/build_target_tests.rs
  • Add documentation: docs/build-targets.md
  • Include NatSpec-style doc comments
  • Validate security assumptions

Test and commit

  • Run tests: cargo test -p stello_pay_contract
  • Cover edge cases
  • Include test output and security notes

Example commit message

feat: standardize WASM build target to wasm32-unknown-unknown across all CI jobs

Guidelines

  • Minimum 95 percent test coverage
  • Clear documentation
  • Timeframe: 96 hours

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programci-cdCI / toolingdocumentationDocs and NatSpecsmart-contractSoroban/Rust smart contract work

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions