mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-16 05:00:59 +08:00
- CLI: the core verb becomes `scriptc build --lib --profile <p.json>` (no positional; profile names the entry); artifact renames to <name>.lib.a with .lib.ll/.lib.c/.lib.ir.json siblings - SC4xxx diagnostic text and hints say library, never core; trap-message strings likewise (LIBRARY RC AUDIT, library reset registry, library inbound bytes) - internals: compileLibrary/compileLibArchive, IrModule.lib + IrLibSection/IrLibExport, moduleLibAsyncSurface, libRoots, loadLibraryProfile/LibraryProfile under src/library/, frontend/lib-exports.ts, emitLibEntries/emitLibDefs - runtime: scr_core.c -> scr_library.c with scr_library_* symbols and the SCR_LIB macro (scr_lib_* was taken by the stdlib unit); scr_lib_session_cleanup - tests: tests/library-mode/ fixtures (entries lib.ts), library-*.test.ts harness files
19 lines
546 B
JSON
19 lines
546 B
JSON
{
|
|
"profile_format": 1,
|
|
"name": "conformance-traps",
|
|
"entry": "lib.ts",
|
|
"emission": "llvm",
|
|
"abi": {
|
|
"prefix": "kp_",
|
|
"init_symbol": "kp_init",
|
|
"sink_register_symbol": "kp_set_panic_sink",
|
|
"collect_symbol": null,
|
|
"result_reset_symbol": null
|
|
},
|
|
"exports": [
|
|
{ "export": "boom", "symbol": "kp_boom", "params": ["f64"], "returns": "f64" },
|
|
{ "export": "fail", "symbol": "kp_fail", "params": ["string"], "returns": "f64" },
|
|
{ "export": "ok", "symbol": "kp_ok", "params": ["f64"], "returns": "f64" }
|
|
]
|
|
}
|