|
14 | 14 |
|
15 | 15 | - **Tiny**: TinyWasm is designed to be as small as possible without significantly compromising performance or functionality (< 4000 LLOC).
|
16 | 16 | - **Portable**: TinyWasm runs on any platform that Rust can target, including `no_std`, with minimal external dependencies.
|
17 |
| -- **Safe**: No unsafe code is used in the runtime (`rkyv` which uses unsafe code can be used for serialization, but it is optional). |
| 17 | +- **Safe**: No unsafe code is used in the runtime (`rkyv` which uses unsafe code can be used for serialization, but is optional). |
18 | 18 |
|
19 | 19 | ## Status
|
20 | 20 |
|
21 |
| -As of version `0.3.0`, TinyWasm successfully passes all the WebAssembly 1.0 tests in the [WebAssembly Test Suite](https://github.com/WebAssembly/testsuite). Work on the 2.0 tests is ongoing. This enables TinyWasm to run most WebAssembly programs, including executing TinyWasm itself compiled to WebAssembly (see [examples/wasm-rust.rs](./examples/wasm-rust.rs)). The results of the testsuites are available [here](https://github.com/explodingcamera/tinywasm/tree/main/crates/tinywasm/tests/generated). |
22 |
| - |
23 |
| -The API is still unstable and may change at any time, so you probably don't want to use it in production _yet_. TinyWasm isn't primarily designed for high performance; it focuses more on simplicity, size, and portability. Benchmarks are currently being reworked and will be available again soon. |
24 |
| - |
25 |
| -**Future Development**: The first major version will focus on improving the API and adding support for [WASI](https://wasi.dev/). While doing so, I also want to further simplify and reduce the codebase's size and improve the parser's performance. |
| 21 | +TinyWasm passes all WebAssembly MVP tests from the [WebAssembly core testsuite](https://github.com/WebAssembly/testsuite) and is able to run most WebAssembly programs. Additionally, the current 2.0 Draft is mostly supported, with the exception of Fixed-Width SIMD and Memory64/Multiple Memories. See the [Supported Proposals](#supported-proposals) section for more information. |
26 | 22 |
|
27 | 23 | ## Supported Proposals
|
28 | 24 |
|
29 |
| -| Proposal | Implementation Status | Version | |
30 |
| -| -------------------------------------------------------------------------------------------------------------------------- | --------------------- | ------- | |
31 |
| -| [**Mutable Globals**](https://github.com/WebAssembly/mutable-global/blob/master/proposals/mutable-global/Overview.md) | Fully implemented | 0.2.0 | |
32 |
| -| [**Multi-value**](https://github.com/WebAssembly/spec/blob/master/proposals/multi-value/Overview.md) | Fully implemented | 0.2.0 | |
33 |
| -| [**Sign-extension operators**](https://github.com/WebAssembly/spec/blob/master/proposals/sign-extension-ops/Overview.md) | Fully implemented | 0.2.0 | |
34 |
| -| [**Bulk Memory Operations**](https://github.com/WebAssembly/spec/blob/master/proposals/bulk-memory-operations/Overview.md) | Fully implemented | 0.4.0 | |
35 |
| -| [**Reference Types**](https://github.com/WebAssembly/reference-types/blob/master/proposals/reference-types/Overview.md) | Partially implemented | N/A | |
36 |
| -| [**Multiple Memories**](https://github.com/WebAssembly/multi-memory/blob/master/proposals/multi-memory/Overview.md) | Partially implemented | N/A | |
37 |
| -| [**Memory64**](https://github.com/WebAssembly/memory64/blob/master/proposals/memory64/Overview.md) | Partially implemented | N/A | |
| 25 | +**Legend**\ |
| 26 | +🌑 -- not available\ |
| 27 | +🚧 -- in development / partialy supported\ |
| 28 | +🟢 -- fully supported |
| 29 | + |
| 30 | +| Proposal | Status | TinyWasm Version | |
| 31 | +| -------------------------------------------------------------------------------------------------------------------------- | ------ | ---------------- | |
| 32 | +| [**Mutable Globals**](https://github.com/WebAssembly/mutable-global/blob/master/proposals/mutable-global/Overview.md) | 🟢 | 0.2.0 | |
| 33 | +| [**Non-trapping float-to-int Conversion**](https://github.com/WebAssembly/nontrapping-float-to-int-conversions) | 🟢 | 0.2.0 | |
| 34 | +| [**Sign-extension operators**](https://github.com/WebAssembly/sign-extension-ops) | 🟢 | 0.2.0 | |
| 35 | +| [**Multi-value**](https://github.com/WebAssembly/spec/blob/master/proposals/multi-value/Overview.md) | 🟢 | 0.2.0 | |
| 36 | +| [**Bulk Memory Operations**](https://github.com/WebAssembly/spec/blob/master/proposals/bulk-memory-operations/Overview.md) | 🟢 | 0.4.0 | |
| 37 | +| [**Reference Types**](https://github.com/WebAssembly/reference-types/blob/master/proposals/reference-types/Overview.md) | 🟢 | 0.7.0 | |
| 38 | +| [**Multiple Memories**](https://github.com/WebAssembly/multi-memory/blob/master/proposals/multi-memory/Overview.md) | 🟢 | 0.8.0 | |
| 39 | +| [**Memory64**](https://github.com/WebAssembly/memory64/blob/master/proposals/memory64/Overview.md) | 🚧 | N/A | |
| 40 | +| [**Fixed-Width SIMD**](https://github.com/webassembly/simd) | 🌑 | N/A | |
38 | 41 |
|
39 | 42 | ## Usage
|
40 | 43 |
|
41 |
| -TinyWasm can be used through the `tinywasm-cli` CLI tool or as a library in your Rust project. Documentation can be found [here](https://docs.rs/tinywasm). |
42 |
| - |
43 |
| -### Library |
44 |
| - |
45 |
| -```sh |
46 |
| -$ cargo add tinywasm |
47 |
| -``` |
48 |
| - |
49 |
| -### CLI |
50 |
| - |
51 |
| -The CLI is mainly available for testing purposes, but can also be used to run WebAssembly programs. |
| 44 | +See the [examples](./examples) directory and [documentation](https://docs.rs/tinywasm) for more information on how to use TinyWasm. |
| 45 | +For testing purposes, you can also use the `tinywasm-cli` tool: |
52 | 46 |
|
53 | 47 | ```sh
|
54 | 48 | $ cargo install tinywasm-cli
|
@@ -78,7 +72,7 @@ Big thanks to the authors of the following projects, which have inspired and inf
|
78 | 72 | - [wazero](https://wazero.io/) - a zero-dependency WebAssembly interpreter written in go
|
79 | 73 | - [wain](https://github.com/rhysd/wain) - a zero-dependency WebAssembly interpreter written in Rust
|
80 | 74 |
|
81 |
| -I encourage you to check these projects out if you're looking for a more mature and feature-complete WebAssembly interpreter. |
| 75 | +I encourage you to check these projects out if you're looking for more mature and feature-complete WebAssembly Runtimes. |
82 | 76 |
|
83 | 77 | ## License
|
84 | 78 |
|
|
0 commit comments