Skip to content

Soroban rs support in WASI#1

Merged
merkle-maren merged 4 commits intomainfrom
soroban-rs
Apr 13, 2026
Merged

Soroban rs support in WASI#1
merkle-maren merged 4 commits intomainfrom
soroban-rs

Conversation

@merkle-maren
Copy link
Copy Markdown
Member

@merkle-maren merkle-maren commented Mar 19, 2026

Closes #6

soroban-rs running inside wasip2 containers. It took a chain of forks, but it works.

To test:

./client/wasi/build.sh
./client/wasi/run.sh account

Requires env vars for the RPC endpoint and account name.

Example:

$ ./run.sh account
RPC URL: https://mainnet.stellar.validationcloud.io/v1/***REDACTED***
Account: GBQQANXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

=== Account Info ===
Account ID:GBQQANXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Sequence:   264582668472025089

=== Native XLM Balance ===
Balance: 4.1499900 XLM (41499900 stroops)
Balance (via ledger entry): 4.1499900 XLM (41499900 stroops)

Depends on this stack of unmerged PRs:

Build command:

RUSTFLAGS="--cfg tokio_unstable" cargo +nightly build --target wasm32-wasip2 --release

Requires unstable tokio and nightly Rust.

Not ready to ship. The blocker is the tokio PR — once that merges and stabilizes, the rest of this stack has a real path forward. This PR is proof the architecture works.

@merkle-maren
Copy link
Copy Markdown
Member Author

Note: socket2 v0.6.3 includes rust-lang/socket2#639 eg. see https://github.com/rust-lang/socket2/blob/v0.6.3/src/sys/unix.rs

We can change the dependency there to "0.6.3" and remove the patch.

One step closer.

@merkle-maren
Copy link
Copy Markdown
Member Author

mio 1.2.0 was just released including that patch. Now, work is progressing on the tokio pr

@merkle-maren
Copy link
Copy Markdown
Member Author

tokio PR merged and released in v1.51.0 tokio-rs/tokio#7933

Copy link
Copy Markdown
Member

@voice-of-miyagi voice-of-miyagi left a comment

Choose a reason for hiding this comment

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

I confirm it works. A good verification. 👍

@merkle-maren merkle-maren merged commit b068b2c into main Apr 13, 2026
@merkle-maren merkle-maren deleted the soroban-rs branch April 13, 2026 08:47
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.

Test Soroban Clients

2 participants