Skip to content

P0-S4a: Example component + integration and unit tests #86

@mconcat

Description

@mconcat

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions