Thank you for contributing to TinyWasm. For small fixes, you can open a pull request directly. For larger changes, including new features and public API changes, open an issue first to discuss the approach.
Pull requests should target the next branch. If you submit a pull request from a fork, allow maintainers to edit the branch.
All contributors must follow the Code of Conduct.
You may use AI tools to help develop a contribution, but:
- Write issue and pull request descriptions yourself. Do not submit AI-generated issue or pull request text.
- Understand and review all code that you submit. You are responsible for its behavior and quality.
- Keep the change focused on the issue. Do not include unrelated generated changes or refactors.
Common commands:
cargo fmt --all -- --check
cargo clippy --workspace
cargo test --workspace
cargo run --example basic
cargo bench --bench tinywasmWebAssembly test commands:
cargo test-wasm-1
cargo test-wasm-2
cargo test-wasm-3
cargo test-wasm-custom
cargo test-wast crates/tinywasm/tests/wasm-custom/table-basics.wastSet RUST_LOG=debug when running cargo test-wast to see executor debug logs.
The rust example requires the wasm32-unknown-unknown target, the rust-src component, Binaryen, and WABT:
./examples/rust/build.sh
cargo run --example rust -- helloYou can use samply for profiling:
cargo install --locked samply
samply record -- cargo run --profile samply --example rust -- tinywasmKeep changes focused and external dependencies to a minimum. Update public documentation, the README, and the unreleased changelog when applicable.
Use Conventional Commits when practical. Pull requests are squash-merged, so the pull request title is more important than individual commit messages.
Unless you explicitly state otherwise, contributions are licensed under the repository's MIT and Apache-2.0 licenses.