Commit 316db97
test(sdk): add WASM TDF encrypt integration tests with proc_exit fix
Add 11 integration tests that compile the WASM module, load it in
wazero, and exercise tdf_encrypt end-to-end: round-trip decrypt,
manifest field validation, policy binding, segment/root integrity,
UUID format, attributes, empty plaintext, deterministic sizes, and
error paths.
Fix Go 1.25 wasip1 proc_exit(0) closing the module by using wazero's
FunctionExporter to provide real WASI with a custom proc_exit that
panics (non-sys.ExitError) instead of closing. Fix GC-safety in
malloc by keeping allocations reachable, and copy data in
ptrToString/ptrToBytes instead of using raw unsafe references.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent e819e09 commit 316db97
3 files changed
Lines changed: 700 additions & 2 deletions
0 commit comments