mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-23 06:10:02 +08:00
* Expand static three.js workflows and host integration * Preserve JavaScript class state in static three.js workflows * Preserve inferred JavaScript behavior across static workflows * Preserve inferred callables and native compatibility boundaries * Retain annotated JavaScript factory exports and bootstrap-safe call spreads * Preserve Buffer and child callback identities in static packages * Clarify JavaScript symbol spread support
5 lines
1.1 KiB
JavaScript
5 lines
1.1 KiB
JavaScript
import { dirname } from "node:path"; import { fileURLToPath } from "node:url";
|
|
process.env.SCRIPTC_RUNTIME_PACK_ROOT = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
process.env.SCRIPTC_RUNTIME_PACK_CONFIG = JSON.stringify({ platform: "wasi", extraRuntimeSources: ["scr_abort.c"], runtimeDefines: ["_GNU_SOURCE", "_WASI_EMULATED_SIGNAL", "_WASI_EMULATED_PROCESS_CLOCKS"], omitRuntimeSources: ["scr_child.c"], omitOptionalSources: ["scr_loop_kqueue.c", "scr_loop_epoll.c", "scr_loop_wsapoll.c", "scr_net.c", "scr_http.c", "scr_http2.c", "scr_dgram.c", "scr_watch.c", "scr_tls_ca.c", "scr_tls.c", "scr_fetch.c", "scr_net_island.c"], omitArchives: ["mbedtls"], compiler: "zig", compilerArgs: ["cc"], archiver: "zig", archiverArgs: ["ar"], target: { name: "wasm32-wasi", llvm_triple: "wasm32-unknown-wasi", architecture: "wasm32", object_format: "wasm", minimum_os: "WASI Preview 1" }, targetArgs: ["-target", "wasm32-wasi"], compileFlags: [], systemLibraries: [{ name: "wasi-emulated-signal", predicate: true }, { name: "wasi-emulated-process-clocks", predicate: true }] });
|
|
await import("../../runtime-pack-common/scripts/build.mjs");
|