https://github.com/bokuweb/yaw
:crab: A wasm interpreter in Rust
https://github.com/bokuweb/yaw
Last synced: about 1 year ago
JSON representation
:crab: A wasm interpreter in Rust
- Host: GitHub
- URL: https://github.com/bokuweb/yaw
- Owner: bokuweb
- License: mit
- Created: 2020-01-26T15:19:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T05:57:45.000Z (over 2 years ago)
- Last Synced: 2025-03-28T17:01:44.814Z (over 1 year ago)
- Language: Rust
- Homepage:
- Size: 123 KB
- Stars: 52
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# yaw
[](https://github.com/bokuweb/yaw/actions)
## Installation
For now, please install from github.
```toml
[dependencies]
yaw = { git = "https://github.com/bokuweb/yaw.git" }
```
## Example
```rust
use yaw::*;
fn main() -> Result<(), error::YawError> {
let ins = instantiate(&include_bytes!("./add.wasm")[..], None)?;
let ret = ins.invoke("add", &[RuntimeValue::I32(1), RuntimeValue::I32(2)])?;
println!("1 + 2 = {:?}", ret);
Ok(())
}
```
### More examples
- [const](https://github.com/bokuweb/yaw/blob/master/examples/const.rs)
- [add](https://github.com/bokuweb/yaw/blob/master/examples/add/main.rs)
- [yaw-boy(gameboy emulator written in go)](https://github.com/bokuweb/yaw/tree/master/examples/yaw-boy)
## TODO
- [x] Run gameboy emulator
- [ ] Add validator
- [ ] Support WASI
- [ ] Run NES emulator
- [ ] Support no_std
- [ ] Support ARM core
## LICENSE
MIT