Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flavio/wasmtime-memory-demo
A small program used to debug wasmtime memory usage
https://github.com/flavio/wasmtime-memory-demo
Last synced: about 1 month ago
JSON representation
A small program used to debug wasmtime memory usage
- Host: GitHub
- URL: https://github.com/flavio/wasmtime-memory-demo
- Owner: flavio
- License: apache-2.0
- Created: 2023-09-20T16:01:01.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-20T16:02:01.000Z (over 1 year ago)
- Last Synced: 2024-10-16T06:56:19.655Z (2 months ago)
- Language: Rust
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A trivial codebase that can be used to inspect the memory usage of wasmtime.
# Requirements
A recent version of rust, the `wasm32-unknown-unknown` target.
When using `rustup`, this can be achieved by doing:
```console
rustup target add wasm32-unknown-unknown
```# Building
First of all, the guest code should be built:
```console
cd guest
make build
```This will produce a `guest.wasm` file under the `guest` directory.
# Usage
Move do the `wasmtime-memory` directory and execute:
```console
cargo run --release
```The program will produce this output:
```console
The wasm module said: 42
Taking 1h power nap
```Now you can look into the memory areas assigned to the process:
```console
sudo pmap $(pgrep wasmtime)
```