Skip to content
Shapemetry

Io - Load

API reference — the Load doors of @huukhanhnguyen/io: readers, writers and their option / result types, all on this page.

import { loadIo, resolveIoWasm } from '@huukhanhnguyen/io'

Source: ./load. See all formats or the Guide.

API reference

Signatures are generated from the live package .d.ts - not hand-written.

loadIo

function

loadIo(): Record<string, any>

resolveIoWasm

function

Local-vs-published wasm policy for @huukhanhnguyen/io.

Browser (Vite/Rollup) resolves @huukhanhnguyen/io-wasm via the package browser export — no node:* import is allowed in this module's static graph, because a static node:url import is what broke the parashape production bundle (Rollup: fileURLToPath is not exported by __vite-browser-external).

Node prefers LOCAL crates/io/pkg when that artifact exists, via process.getBuiltinModule (no static node: specifier). Fresh clones and Vercel fall through to the published package.

NOTHING here is imported statically: a static @huukhanhnguyen/io-wasm import instantiates the wasm at module evaluation, and model's node methods import this package eagerly, so every model consumer would pay for io it never calls (measured 2026-08-15). The bundler gets its static specifier from load.browser.ts instead, via the browser field.

resolveIoWasm(forcePublished?: boolean): { kind: "LOCAL" | "PUBLISHED"; path: string; }

wasmSourceKind

function

wasmSourceKind(): "LOCAL" | "PUBLISHED"
Last updated: 📖 1 min readEdit on GitHub