You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
engine: no way to supply GET DIRECT data files without a filesystem #598
A browser or wasm caller cannot import a Vensim model that uses GET DIRECT DATA, GET DIRECT CONSTANTS, GET DIRECT LOOKUPS, or GET DIRECT SUBSCRIPT.
The engine reads the referenced CSV or Excel files at import through a DataProvider, and the only real provider reads from the filesystem.
In wasm the import uses the null provider and fails with external data file '...' referenced but no DataProvider configured.
A caller should be able to hand the engine the file contents directly.
Why it matters
Any model with external data fails to import through @simlin/engine's Project.openVensim in the browser, and the same is true for the native tools that open models without a data directory: pysimlin, simlin-serve, and the MCP server.
Only simlin-cli and simlin_project_open_vensim_with_data pass a directory today.
Real example: the metasd COVID model (#555).
Fix
Add an in-memory DataProvider holding a map from file name to bytes.
The CSV and Excel parsers currently open files by path, so they need to be split into a read step and a parse step first.
Expose the provider through one small libsimlin call (for example an open variant that takes name/bytes pairs) and the @simlin/engine open API.
That keeps the FFI surface small and lets the browser pass files the user uploads with the model.
Alternative: a host callback provider. More flexible, but callbacks across the wasm and C boundaries are harder to get right.
The native tools that already have a path (pysimlin, simlin-serve, MCP) can use the filesystem provider rooted at the model's directory; that part is cheap and could go first.
Pointers
src/simlin-engine/src/data_provider/: the DataProvider trait and filesystem provider
changed the title [-]WASM/libsimlin: data-supply API for GET DIRECT external data (browser/WASM callers)[/-][+]engine: no way to supply GET DIRECT data files without a filesystem[/+]on Oct 12, 2026
Activity
[-]WASM/libsimlin: data-supply API for GET DIRECT external data (browser/WASM callers)[/-][+]engine: no way to supply GET DIRECT data files without a filesystem[/+]