Skip to content

Commit

Permalink
Bring some of Wasmtime's documentation more up-to-date (#6994)
Browse files Browse the repository at this point in the history
* Remove tutorial/wasm-writing documentation

This commit removes the tutorial and "Writing WebAssembly" documentation
sections from Wasmtime's documentation. These sections are quite dated
at this point (they still recommend `cargo wasi`!) and haven't been
updated much since their inception, especially in the arena of
components. Today it seems best to leave this sort of documentation to
[other resources] which are more tailored towards documentation of
writing wasm.

[other resources]: https://component-model.bytecodealliance.org/

* Remove markdown example from docs

Like the previous commit this is quite dated and recommends
effectively-deprecated tooling and doesn't take into account components.

* Update our intro docs a bit

* Link security blog post from docs

* Fold docs of wasm proposals into tier docs

This was already a bit duplicated so consolidate into one location.
Additionally add some proposals that weren't previously documented and
move some around based on their implementation status.

* Document unsupported features

In an effort to head off questions about platform support I figure it
might be a good idea to start documenting what's not supported at this
time. This is intended to mirror the current state, not future, of
Wasmtime. In other words this should answer the question of "Does
Wasmtime support X?" as opposed to "Does Wasmtime want to support X?"
since we want to eventually support all of these features in the limit.

* Fold WASI docs into tier docs

Similar to the previous commit but for WASI proposals.
  • Loading branch information
alexcrichton committed Sep 12, 2023
1 parent 91fe736 commit aaa5dc0
Show file tree
Hide file tree
Showing 15 changed files with 100 additions and 647 deletions.
11 changes: 0 additions & 11 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
# Summary

- [Introduction](./introduction.md)
- [Tutorial](./tutorial.md)
- [Creating `hello-world.wasm`](./tutorial-create-hello-world.md)
- [Running `hello-world.wasm`](./tutorial-run-hello-world.md)
- [Examples](./examples.md)
- [Markdown Parser](./examples-markdown.md)
- [Debugging WebAssembly](./examples-debugging.md)
- [Profiling WebAssembly](./examples-profiling.md)
- [Profiling with Perf](./examples-profiling-perf.md)
Expand Down Expand Up @@ -42,17 +38,10 @@
- [CLI Options](./cli-options.md)
- [CLI Logging](./cli-logging.md)
- [Cache Configuration](./cli-cache.md)
- [Writing WebAssembly](./wasm.md)
- [Rust](./wasm-rust.md)
- [C/C++](./wasm-c.md)
- [AssemblyScript](./wasm-assemblyscript.md)
- [WebAssembly Text Format (`*.wat`)](./wasm-wat.md)
- [Stability](stability.md)
- [Release Process](./stability-release.md)
- [Tiers of support](./stability-tiers.md)
- [Platform Support](./stability-platform-support.md)
- [Wasm Proposals Support](./stability-wasm-proposals-support.md)
- [WASI Proposals Support](./stability-wasi-proposals-support.md)
- [Security](security.md)
- [Disclosure Policy](./security-disclosure.md)
- [Contributing](contributing.md)
Expand Down
65 changes: 0 additions & 65 deletions docs/examples-markdown.md

This file was deleted.

17 changes: 8 additions & 9 deletions docs/introduction.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
# Introduction

[Wasmtime][github] is a [Bytecode Alliance][BA] project that is a standalone
wasm-only optimizing runtime for [WebAssembly] and [WASI]. It runs WebAssembly
code [outside of the Web], and can be used both as a command-line utility or as
a library embedded in a larger application.
optimizing runtime for [WebAssembly], [the Component Model], and [WASI]. It runs
WebAssembly code [outside of the Web], and can be used both as a command-line
utility or as a library embedded in a larger application. Wasmtime strives to be
a highly configurable and embeddable runtime to run on any scale of application.

Wasmtime strives to be a highly configurable and embeddable runtime to run on
any scale of application. Many features are still under development so if you
have a question don't hesitate to [file an issue][issue].
This documentation is intended to serve a number of purposes and within you'll
find:

This guide is intended to serve a number of purposes and within you'll find:

* [How to create simple wasm modules](tutorial-create-hello-world.md)
* [How to use Wasmtime from a number of languages](lang.md)
* [How to install and use the `wasmtime` CLI](cli.md)
* Information about [stability](stability.md) and [security](security.md) in
Wasmtime.
* Documentation about [contributing](contributing.md) to Wasmtime.

... and more! The source for this guide [lives on
GitHub](https://github.com/bytecodealliance/wasmtime/tree/main/docs) and
Expand All @@ -27,3 +25,4 @@ contributions are welcome!
[WASI]: https://wasi.dev
[outside of the Web]: https://webassembly.org/docs/non-web/
[issue]: https://github.com/bytecodealliance/wasmtime/issues/new
[the Component Model]: https://github.com/WebAssembly/component-model
4 changes: 3 additions & 1 deletion docs/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ One of WebAssembly (and Wasmtime's) main goals is to execute untrusted code in
a safe manner inside of a sandbox. WebAssembly is inherently sandboxed by design
(must import all functionality, etc). This document is intended to cover the
various sandboxing implementation strategies that Wasmtime has as they are
developed.
developed. This has also been documented in a [historical blog post] too.

[historical blog post]: https://bytecodealliance.org/articles/security-and-correctness-in-wasmtime

At this time Wasmtime implements what's necessary for the WebAssembly
specification, for example memory isolation between instances. Additionally the
Expand Down
97 changes: 89 additions & 8 deletions docs/stability-tiers.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,21 @@ For explanations of what each tier means see below.
| Target | `x86_64-unknown-linux-gnu` |
| WASI Proposal | `wasi_snapshot_preview1` |
| WASI Proposal | `wasi_unstable` |
| WebAssembly Proposal | `bulk-memory` |
| WebAssembly Proposal | `reference-types` |
| WebAssembly Proposal | `simd` |
| WebAssembly Proposal | [`mutable-globals`] |
| WebAssembly Proposal | [`sign-extension-ops`] |
| WebAssembly Proposal | [`nontrapping-float-to-int-conversion`] |
| WebAssembly Proposal | [`multi-value`] |
| WebAssembly Proposal | [`bulk-memory`] |
| WebAssembly Proposal | [`reference-types`] |
| WebAssembly Proposal | [`simd`] |

[`mutable-globals`]: https://github.com/WebAssembly/mutable-global/blob/master/proposals/mutable-global/Overview.md
[`sign-extension-ops`]: https://github.com/WebAssembly/spec/blob/master/proposals/sign-extension-ops/Overview.md
[`nontrapping-float-to-int-conversion`]: https://github.com/WebAssembly/spec/blob/master/proposals/nontrapping-float-to-int-conversion/Overview.md
[`multi-value`]: https://github.com/WebAssembly/spec/blob/master/proposals/multi-value/Overview.md
[`bulk-memory`]: https://github.com/WebAssembly/bulk-memory-operations/blob/master/proposals/bulk-memory-operations/Overview.md
[`reference-types`]: https://github.com/WebAssembly/reference-types/blob/master/proposals/reference-types/Overview.md
[`simd`]: https://github.com/WebAssembly/simd/blob/master/proposals/simd/SIMD.md

#### Tier 2

Expand All @@ -38,8 +50,31 @@ For explanations of what each tier means see below.
| Target | `aarch64-unknown-linux-gnu`| Continuous fuzzing |
| Target | `s390x-unknown-linux-gnu` | Continuous fuzzing |
| Target | `x86_64-pc-windows-gnu` | Clear owner of the target |
| WebAssembly Proposal | `memory64` | Unstable wasm proposal |
| WebAssembly Proposal | `multi-memory` | Unstable wasm proposal |
| WebAssembly Proposal | [`memory64`]] | Unstable wasm proposal |
| WebAssembly Proposal | [`multi-memory`] | Unstable wasm proposal |
| WebAssembly Proposal | [`threads`] | Unstable wasm proposal |
| WebAssembly Proposal | [`component-model`] | Unstable wasm proposal |
| WebAssembly Proposal | [`tail-call`] | Unstable wasm proposal, performance work |
| WebAssembly Proposal | [`relaxed-simd`] | Unstable wasm proposal |
| WebAssembly Proposal | [`function-references`] | Unstable wasm proposal |
| WASI Proposal | [`wasi-io`] | Unstable WASI proposal |
| WASI Proposal | [`wasi-clocks`] | Unstable WASI proposal |
| WASI Proposal | [`wasi-filesystem`] | Unstable WASI proposal |
| WASI Proposal | [`wasi-random`] | Unstable WASI proposal |
| WASI Proposal | [`wasi-poll`] | Unstable WASI proposal |

[`memory64`]: https://github.com/WebAssembly/memory64/blob/master/proposals/memory64/Overview.md
[`multi-memory`]: https://github.com/WebAssembly/multi-memory/blob/master/proposals/multi-memory/Overview.md
[`threads`]: https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md
[`component-model`]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/Explainer.md
[`tail-call`]: https://github.com/WebAssembly/tail-call/blob/main/proposals/tail-call/Overview.md
[`relaxed-simd`]: https://github.com/WebAssembly/relaxed-simd/blob/main/proposals/relaxed-simd/Overview.md
[`function-references`]: https://github.com/WebAssembly/function-references/blob/main/proposals/function-references/Overview.md
[`wasi-clocks`]: https://github.com/WebAssembly/wasi-clocks
[`wasi-filesystem`]: https://github.com/WebAssembly/wasi-filesystem
[`wasi-io`]: https://github.com/WebAssembly/wasi-io
[`wasi-random`]: https://github.com/WebAssembly/wasi-random
[`wasi-poll`]: https://github.com/WebAssembly/wasi-poll

#### Tier 3

Expand All @@ -48,12 +83,18 @@ For explanations of what each tier means see below.
| Target | `aarch64-apple-darwin` | CI testing |
| Target | `aarch64-pc-windows-msvc` | CI testing, unwinding, full-time maintainer |
| Target | `riscv64gc-unknown-linux-gnu` | full-time maintainer |
| WASI Proposal | `wasi-nn` | More expansive CI testing |
| WebAssembly Proposal | `threads` | Complete implementation |
| WebAssembly Proposal | `component-model` | Complete implementation |
| WASI Proposal | [`wasi-nn`] | More expansive CI testing |
| WASI Proposal | [`wasi-threads`] | More CI, unstable proposal |
| WASI Proposal | [`wasi-sockets`] | Complete implementation |
| WASI Proposal | [`wasi-http`] | Complete implementation |
| *misc* | Non-Wasmtime Cranelift usage [^1] | CI testing, full-time maintainer |
| *misc* | DWARF debugging [^2] | CI testing, full-time maintainer, improved quality |

[`wasi-sockets`]: https://github.com/WebAssembly/wasi-sockets
[`wasi-nn`]: https://github.com/WebAssembly/wasi-nn
[`wasi-threads`]: https://github.com/WebAssembly/wasi-threads
[`wasi-http`]: https://github.com/WebAssembly/wasi-http

[^1]: This is intended to encompass features that Cranelift supports as a
general-purpose code generator such as integer value types other than `i32` and
`i64`, non-Wasmtime calling conventions, code model settings, relocation
Expand All @@ -67,6 +108,46 @@ support is currently best-effort. Additionally there are known shortcomings
and bugs. At this time there's no developer time to improve the situation here
as well.

#### Unsupported features and platforms

While this is not an exhaustive list, Wasmtime does not currently have support
for the following features. Note that this is intended to document Wasmtime's
current state and does not mean Wasmtime does not want to ever support these
features; rather design discussion and PRs are welcome for many of the below
features to figure out how best to implement them and at least move them to Tier
3 above.

* Target: ARM 32-bit
* Target: WebAssembly (compiling Wasmtime to WebAssembly itself)
* Target: [FreeBSD](https://github.com/bytecodealliance/wasmtime/issues/5499)
* Target: [NetBSD/OpenBSD](https://github.com/bytecodealliance/wasmtime/issues/6962)
* Target: [i686 (32-bit Intel targets)](https://github.com/bytecodealliance/wasmtime/issues/1980)
* Target: Android
* Target: MIPS
* Target: SPARC
* Target: PowerPC
* Target: RISC-V 32-bit
* [WebAssembly proposal: `branch-hinting`](https://github.com/WebAssembly/branch-hinting)
* [WebAssembly proposal: `exception-handling`](https://github.com/WebAssembly/exception-handling)
* [WebAssembly proposal: `extended-const`](https://github.com/WebAssembly/extended-const)
* [WebAssembly proposal: `flexible-vectors`](https://github.com/WebAssembly/flexible-vectors)
* [WebAssembly proposal: `gc`](https://github.com/WebAssembly/gc)
* [WebAssembly proposal: `memory-control`](https://github.com/WebAssembly/memory-control)
* [WebAssembly proposal: `stack-switching`](https://github.com/WebAssembly/stack-switching)
* [WASI proposal: `proxy-wasm`](https://github.com/proxy-wasm/spec)
* [WASI proposal: `wasi-blob-store`](https://github.com/WebAssembly/wasi-blob-store)
* [WASI proposal: `wasi-crypto`](https://github.com/WebAssembly/wasi-crypto)
* [WASI proposal: `wasi-data`](https://github.com/WebAssembly/wasi-data)
* [WASI proposal: `wasi-distributed-lock-service`](https://github.com/WebAssembly/wasi-distributed-lock-service)
* [WASI proposal: `wasi-grpc`](https://github.com/WebAssembly/wasi-grpc)
* [WASI proposal: `wasi-kv-store`](https://github.com/WebAssembly/wasi-kv-store)
* [WASI proposal: `wasi-message-queue`](https://github.com/WebAssembly/wasi-message-queue)
* [WASI proposal: `wasi-parallel`](https://github.com/WebAssembly/wasi-parallel)
* [WASI proposal: `wasi-pubsub`](https://github.com/WebAssembly/wasi-pubsub)
* [WASI proposal: `wasi-runtime-config`](https://github.com/WebAssembly/wasi-runtime-config)
* [WASI proposal: `wasi-sql`](https://github.com/WebAssembly/wasi-sql)
* [WASI proposal: `wasi-url`](https://github.com/WebAssembly/wasi-url)

## Tier Details

Wasmtime's precise definitions of tiers are not guaranteed to be constant over
Expand Down
60 changes: 0 additions & 60 deletions docs/stability-wasi-proposals-support.md

This file was deleted.

Loading

0 comments on commit aaa5dc0

Please sign in to comment.