P0-S4a: Example component + integration and unit tests
Background
P0 must culminate in an end-to-end example: a WASI component writing/reading via our VFS with persistence to the Merkle-backed store.
Goal
Provide a minimal WASI component and add integration and unit tests that demonstrate persisted write-then-read and accurate file sizes.
Design
- WASI example: write
"hello" to /home/contract/data.txt, then read and assert content.
- Integration test: run the component twice; assert state root changes deterministically and data persists across runs.
- Unit tests: stream read/write/append/EOF/size, and keep existing fs ops tests green.
Constraints
- No direct preview2 read/write syscalls; use streams.
Acceptance Criteria
- Example runs successfully under wasmtime with our host linker.
- Tests green in CI; state root diff observable in logs.
References
P0-S4a: Example component + integration and unit tests
Background
P0 must culminate in an end-to-end example: a WASI component writing/reading via our VFS with persistence to the Merkle-backed store.
Goal
Provide a minimal WASI component and add integration and unit tests that demonstrate persisted write-then-read and accurate file sizes.
Design
"hello"to/home/contract/data.txt, then read and assert content.Constraints
Acceptance Criteria
References