Skip to content

INT-03 S5: native wasi:filesystem (open/read/write/close) — unblocks INT-06 #485

@hyperpolymath

Description

@hyperpolymath

ADR-015 canonical S5 (per .machine_readable/6a2/META.a2ml): bring up wasi:filesystem primitives — path_open / fd_read / fd_write (non-stdout) / fd_close. INT-03 substrate (#180) is otherwise shipped; this slice is what unblocks INT-06 (server-side runtime profile, ledger-only today, blocked-by INT-03).

Pattern is settled from S4a/S4b/S6b: declare imports in lib/wasi_runtime.ml, on-demand canonical-order indexing via optional_wasi + ctx.wasi_func_indices, Effect_sites pre-scan, surface builtins on the File capability with Effect File (reserved). Component path bridges to wasi:filesystem/types via the preview1→preview2 command/reactor adapter (already provisioned by S2 / S3 / S6a). Path encoding goes through the byte-IR (I32Load8U/I32Store8, shipped #339) the same way env_at/arg_at do.

Gates: hermetic test under tests/componentize/ that round-trips a small file through wasmtime run with a --dir preopen; combo regression that filesystem + clock + env + sock_shutdown imports stay canonically ordered.

Ledger: INT-03 (S1, substrate) follow-up. Refs #180.

Metadata

Metadata

Assignees

No one assigned

    Labels

    majorMajor issue — significant scope, broader impact than a feature/bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions