You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 3, 2025. It is now read-only.
> To improve the development experience, a number of custom commands and aliases have been added to the `.cargo/config.toml` file. These can be run using `cargo <command>`.
3
+
Thank you for considering contributing to this project! This document outlines the process for contributing to this project. For small changes or bug fixes, feel free to open a pull request directly. For larger changes, please open an issue first to discuss the proposed changes. Also, please ensure that you open up your pull request against the `next` branch and [allow maintainers of the project to edit your code](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork).
4
4
5
-
-**`cargo test-wasm-1`**\
6
-
Run the WebAssembly MVP (1.0) test suite. Be sure to cloned this repo with `--recursive` or initialize the submodules with `git submodule update --init --recursive`
5
+
## 1. Clone the Repository
7
6
8
-
-**`cargo test-wasm-2`**\
9
-
Run the full WebAssembly test suite (2.0)
7
+
Ensure you clone this repository with the `--recursive` flag to include the submodules:
10
8
11
-
-**`cargo test-wast <path>`**\
12
-
Run a single WAST test file. e.g. `cargo test-wast ./examples/wast/i32.wast`. Useful for debugging failing test-cases.
If you have already cloned the repository, you can initialize the submodules with:
14
+
15
+
```bash
16
+
git submodule update --init --recursive
17
+
```
18
+
19
+
This is required to run the WebAssembly test suite.
20
+
21
+
## 2. Set up the Development Environment
22
+
23
+
This project mostly uses a pretty standard Rust setup. Some common tasks:
24
+
25
+
```bash
26
+
# Run a specific benchmark (run without arguments to see available benchmarks)
27
+
$ cargo bench --bench {bench_name}
28
+
29
+
# Run all tests
30
+
$ cargo test
31
+
32
+
# Run only the WebAssembly MVP (1.0) test suite
33
+
$ cargo test-wasm-1
34
+
35
+
# Run only the full WebAssembly test suite (2.0)
36
+
$ cargo test-wasm-2
37
+
38
+
# Run a specific test (run without arguments to see available tests)
39
+
$ cargo test --test {test_name}
40
+
41
+
# Run a single WAST test file
42
+
$ cargo test-wast {path}
43
+
44
+
# Run a specific example (run without arguments to see available examples)
45
+
# The wasm test files required to run the `wasm-rust` examples are not
46
+
# included in the main repository.
47
+
# To build these, you will need to run `./examples/rust/build.sh`.
48
+
$ cargo run --example {example_name}
49
+
```
50
+
51
+
### Profiling
52
+
53
+
Either [samply](https://github.com/mstange/samply/) or [cargo-flamegraph](https://github.com/flamegraph-rs/flamegraph) are recommended for profiling.
54
+
55
+
Example usage:
56
+
57
+
```bash
58
+
cargo install --locked samply
59
+
cargo samply --example wasm-rust -- selfhosted
60
+
```
61
+
62
+
# Commits
63
+
64
+
This project uses [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for commit messages. For pull requests, the commit messages will be squashed so you don't need to worry about this too much. However, it is still recommended to follow this convention for consistency.
65
+
66
+
# Branches
67
+
68
+
-`main`: The main branch. This branch is used for the latest stable release.
69
+
-`next`: The next branch. Development happens here.
0 commit comments