Jun 2025 (v0.6.1)
Mochi v0.6.1 adds file I/O for datasets, a minimal foreign function interface and optional DuckDB execution for queries.
Load and Save
Use load to read CSV or JSONL data into a typed list and save to export results. Paths are optional for piping via standard input and output.
let people = load "people.csv" as Person
let adults = from p in people where p.age >= 18 select p
save adults to "adults.jsonl" with { format: "jsonl" }
Foreign Function Interface
The new runtime/ffi package exposes Go, TypeScript and Python runtimes. Programs declare extern fun and extern object bindings which resolve to registered host implementations.
DuckDB Query Engine
Dataset queries can execute through DuckDB for larger data sets. Builds without CGO fall back to the in-memory engine.
Other Changes
--wasm-toolchainflag selects the Go or TinyGo compiler- Improved type inference across compilers
- Fixed DuckDB optional build and updated golden tests