Files
sausage/userland/qjs/source/examples/test_fib.js
T
surma d44f1d9677 Build separate native and WASI pipelines with shared multicall names
Checkpoint before integration and package validation.

Assisted-by: SurmAgent:unknown [read] [edit] [bash]
2026-11-12 09:36:27 +00:00

9 lines
244 B
JavaScript

/* example of JS module importing a C module */
import * as os from "qjs:os";
const isWin = os.platform === 'win32';
const { fib } = await import(`./fib.${isWin ? 'dll' : 'so'}`);
console.log("Hello World");
console.log("fib(10)=", fib(10));