Skip to content

Conversation

alexcrichton
Copy link
Contributor

This is a follow-up from mlua-rs/lua-src-rs#13 which verifies/tests that mlua/lua all work when compiled for a WASI target. While this doesn't have formal documentation yet it also codifies in CI configuration how to build for WASI and get tests passing (notably C compiler configuration and some misc Rust flags).

This moves some dev-dependencies that don't compile for wasm32-wasip2 to a different section of the manifest. This additionally annotates panicking tests with #[cfg(not(panic = "abort"))] to skip those tests on WASI.

This does not test either the send or async feature at this time. Testing send requires threads which WASI does not yet support, and testing async requires more support in Tokio which is not currently there yet.

Closes #366

This is a follow-up from mlua-rs/lua-src-rs#13 which verifies/tests that
mlua/lua all work when compiled for a WASI target. While this doesn't
have formal documentation yet it also codifies in CI configuration how
to build for WASI and get tests passing (notably C compiler
configuration and some misc Rust flags).

This moves some `dev-dependencies` that don't compile for
`wasm32-wasip2` to a different section of the manifest. This
additionally annotates panicking tests with `#[cfg(not(panic =
"abort"))]` to skip those tests on WASI.

This does not test either the `send` or `async` feature at this time.
Testing `send` requires threads which WASI does not yet support, and
testing `async` requires more support in Tokio which is not currently
there yet.
@khvzak khvzak merged commit 6e353d6 into mlua-rs:main Oct 4, 2025
138 of 139 checks passed
@khvzak
Copy link
Member

khvzak commented Oct 4, 2025

Thank you

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.

Added wasm32-wasi support

2 participants