mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-22 05:59:31 +08:00
- Enforce oxlint and oxfmt for owned JavaScript and TypeScript with independent CI checks. - Preserve compiler import boundaries and protected fixtures while cleaning up lint findings. - Standardize source formatting and validate import, fixture, and embedded-source protections.
43 lines
1.2 KiB
JavaScript
43 lines
1.2 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");
|