Skip to content

feat: merge wasi-test-runner as 'outlayer test' subcommand - #1

Merged
zavodil merged 3 commits into
out-layer:mainfrom
Kampouse:main
May 25, 2026
Merged

zavodil merged 3 commits into
out-layer:mainfrom
Kampouse:main

Conversation

@Kampouse

Copy link
Copy Markdown
  • Add 'test-runner' feature flag (wasmtime/wasi deps optional)
  • 'outlayer test' validates WASM modules for OutLayer compatibility
  • Supports WASI P1 and P2 components
  • Optional NEAR RPC proxy (--rpc) for testing host functions
  • Fuel metering, memory limits, JSON validation
  • Default build unchanged: cargo install outlayer-cli
  • With test runner: cargo install outlayer-cli --features test-runner

Source: fastnear/near-outlayer wasi-examples/wasi-test-runner

asil added 2 commits May 25, 2026 09:37
…ated)

- Add 'test-runner' feature flag (wasmtime/wasi deps optional)
- 'outlayer test' validates WASM modules for OutLayer compatibility
- Supports WASI P1 and P2 components
- Optional NEAR RPC proxy (--rpc) for testing host functions
- Fuel metering, memory limits, JSON validation
- Default build unchanged: cargo install outlayer-cli
- With test runner: cargo install outlayer-cli --features test-runner

Source: fastnear/near-outlayer wasi-examples/wasi-test-runner
@zavodil

zavodil commented May 25, 2026

Copy link
Copy Markdown
Collaborator

Cool, this import may be useful and feature-gating is the right call. Few things:

  1. RPC default — switched it to rpc.testnet.fastnear.com. Already pushed upstream, just re-sync.
  2. Drop src/commands/test/wit/world.wit — dup of root wit/world.wit, bindgen only reads the root one.
  3. blocking leaks into default build. Move it behind the feature:
    test-runner = ["wasmtime", "wasmtime-wasi", "wasmtime-wasi-http", "reqwest/blocking"]
    and drop blocking from the main reqwest line.

1. RPC default URL → rpc.testnet.fastnear.com
2. Remove duplicate wit/ from src/commands/test/ (bindgen uses root wit/)
3. Move reqwest/blocking behind test-runner feature flag
@zavodil
zavodil merged commit 168a02e into out-layer:main May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants