Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,10 @@ jobs:
with:
toolchain: stable
components: clippy
# Run inside the checkout so the `rust-toolchain` override decides which
# toolchain gets the targets.
- run: rustup target add wasm32-unknown-unknown wasm32-wasip1
- run: cargo check
- run: cargo build -p app
- run: cargo build -p wasm --release --target wasm32-unknown-unknown
- run: cargo build -p wasi --release --target wasm32-wasip1
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ The terminal is put into raw mode while the emulator runs, so every keystroke in
## WASI

```sh
$ cargo build -p wasi --target wasm32-wasi --release
$ wasmtime ./target/wasm32-wasi/release/wasi.wasm
$ cargo build -p wasi --target wasm32-wasip1 --release
$ wasmtime ./target/wasm32-wasip1/release/wasi.wasm
```

## Wasm
Expand Down
Binary file modified wasm/out.wasm
Binary file not shown.
3 changes: 3 additions & 0 deletions wasm/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
use core::bus::RAM_START;

// Rust 1.82 stopped turning undefined symbols into `env` imports implicitly,
// so the module has to be named for the host functions worker.js provides.
#[link(wasm_import_module = "env")]
extern "C" {
fn elapsed_us() -> usize;
fn tx(s: u32);
Expand Down