filesystem example (#2236)

This commit is contained in:
Joshua Warner
2020-09-29 11:20:14 -07:00
committed by GitHub
parent 715be68101
commit eb650f6fe0
20 changed files with 224 additions and 13 deletions

View File

@@ -0,0 +1,21 @@
# WASI
You can also [browse this source code online][code] and clone the wasmtime
repository to run the example locally.
[code]: https://github.com/bytecodealliance/wasmtime/blob/main/examples/wasi/main.rs
This example shows off how to run a wasi binary with a memory filesystem.
## Wasm Source code
```rust,ignore
{{#include ../examples/wasi-fs/wasm/wasi-fs.rs}}
```
## `wasi-fs.rs`
```rust,ignore
{{#include ../examples/wasi-fs/main.rs}}
```