toilscript 0.1.39 → 0.1.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.generated.d.ts +30 -12
- package/dist/cli.js +4 -4
- package/dist/cli.js.map +3 -3
- package/dist/importmap.json +2 -2
- package/dist/toilscript.generated.d.ts +30 -12
- package/dist/toilscript.js +32 -39
- package/dist/toilscript.js.map +3 -3
- package/dist/web.js +3 -3
- package/package.json +1 -1
- package/std/assembly/toilscript.d.ts +6 -1
package/dist/importmap.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"imports": {
|
|
3
|
-
"toilscript": "https://cdn.jsdelivr.net/npm/toilscript@0.1.
|
|
4
|
-
"toilscript/cli": "https://cdn.jsdelivr.net/npm/toilscript@0.1.
|
|
3
|
+
"toilscript": "https://cdn.jsdelivr.net/npm/toilscript@0.1.42/dist/toilscript.js",
|
|
4
|
+
"toilscript/cli": "https://cdn.jsdelivr.net/npm/toilscript@0.1.42/dist/cli.js",
|
|
5
5
|
"binaryen": "https://cdn.jsdelivr.net/npm/binaryen@130.0.0-nightly.20260609/index.js",
|
|
6
6
|
"long": "https://cdn.jsdelivr.net/npm/long@5.3.2/index.js"
|
|
7
7
|
}
|
|
@@ -3184,6 +3184,25 @@ declare module "types:toilscript/src/parser" {
|
|
|
3184
3184
|
* shape; gating already rejects a hook outside a `@stream`.
|
|
3185
3185
|
*/
|
|
3186
3186
|
private injectStreamHandler;
|
|
3187
|
+
/** True if `node` is a non-nullable named type whose identifier is exactly `name`
|
|
3188
|
+
* (e.g. a `StreamPacket` parameter or a `StreamOutbound` return on a raw @message). */
|
|
3189
|
+
private isNamedType;
|
|
3190
|
+
/**
|
|
3191
|
+
* The injected stream ring runtime (spec 05 sections 5-6; byte layouts in 10), emitted once per
|
|
3192
|
+
* program under the `stream_dispatch` export gate. Provides two fixed 128 KiB rings in linear
|
|
3193
|
+
* memory (ingress host->guest, egress guest->host), each a 32-byte `RingControl` + frame region,
|
|
3194
|
+
* exported via `stream_ring_offset/capacity` + `stream_egress_offset/capacity` (the host reads
|
|
3195
|
+
* these at box build, stamps both RingControls, and owns the ingress write_cursor / egress
|
|
3196
|
+
* read_cursor; the guest owns the ingress read_cursor / egress write_cursor - SPSC on the one
|
|
3197
|
+
* resident-box thread). `StreamPacket` drains ONE ingress `RingFrame` (raw @message arg);
|
|
3198
|
+
* `StreamOutbound.reply` stages ONE DATA_RELIABLE frame into the egress ring (bounds-checked ->
|
|
3199
|
+
* `0x0205`); `__encode` lowers to the packed i64 (0 for accept/empty/reply; `-(0x10000 + 0x02xx)`
|
|
3200
|
+
* for a reject, normalized to `0x0208`). The `.d.ts` declares these for the editor only (not
|
|
3201
|
+
* compile-loaded); these injected `@global` classes are the real impls, like `AuthUser`.
|
|
3202
|
+
* RingControl(32B): u32 magic|u16 version|u16 flags|u32 capacity|u32 write|u32 read|u32 dropped|2xu32.
|
|
3203
|
+
* RingFrame(12B): u8 version|u8 type|u16 flags|u32 length|u32 msg_seq|payload.
|
|
3204
|
+
*/
|
|
3205
|
+
private streamRuntimeSource;
|
|
3187
3206
|
/** True if a function signature takes no parameters and returns `void` (the
|
|
3188
3207
|
* required `@scheduled` handler shape, spec 03 section 3.5). A missing or
|
|
3189
3208
|
* non-`void`-named return type, or any parameter, is false. */
|
|
@@ -4458,8 +4477,8 @@ declare module "types:toilscript/src/dbcatalog" {
|
|
|
4458
4477
|
* toildb's `SchemaDescriptor::layout_hash` (the runtime side): the algorithm,
|
|
4459
4478
|
* the `seen` add/remove, and the declaration-order traversal are pinned in lock
|
|
4460
4479
|
* step. A FLAT type (no field whose type is in `typeMap`) hashes to the SAME
|
|
4461
|
-
* value as the
|
|
4462
|
-
*
|
|
4480
|
+
* value as the flat hash; an absent `typeMap` (undefined) is treated as a flat
|
|
4481
|
+
* descriptor.
|
|
4463
4482
|
*
|
|
4464
4483
|
* `typeMap` MUST contain the SAME set of `@data` types as the runtime's
|
|
4465
4484
|
* `toildb.types` registry (collection value types + their nested types, EXCLUDING
|
|
@@ -4587,22 +4606,21 @@ declare module "types:toilscript/src/dbcatalog" {
|
|
|
4587
4606
|
* u32 data_coherence_hash
|
|
4588
4607
|
* u32 pair_coherence_hash
|
|
4589
4608
|
*
|
|
4590
|
-
* `targetMode` "cold" -> 1; "hot" or null (
|
|
4591
|
-
* hot per Part 5) -> 0. The two coherence hashes use the SAME `layoutHash` /
|
|
4609
|
+
* `targetMode` "cold" -> 1; "hot" or null (default request artifact, treated
|
|
4610
|
+
* as hot per Part 5) -> 0. The two coherence hashes use the SAME `layoutHash` /
|
|
4592
4611
|
* `recursionTypeMap` machinery as the toildb catalog, so a hot pass and a cold
|
|
4593
4612
|
* pass over the same sources compute identical `data_coherence_hash` and
|
|
4594
4613
|
* `pair_coherence_hash` independently (doc 02 AN-4). `build_id` is empty and
|
|
4595
4614
|
* `abi_version` is 1 in this increment (the toiljs build-identity plumbing and
|
|
4596
4615
|
* the export-name fingerprint component land with the codegen increment).
|
|
4597
4616
|
*
|
|
4598
|
-
* Returns `null` (no section) for a bare AssemblyScript module compiled
|
|
4599
|
-
*
|
|
4617
|
+
* Returns `null` (no section) for a bare AssemblyScript module compiled with
|
|
4618
|
+
* `targetMode == null` that declares NO Toil surface at all
|
|
4600
4619
|
* (`@rest`/`@stream`/`@daemon`/`@scheduled`/`@database`/`@data`), so an ordinary
|
|
4601
4620
|
* AS compile stays byte-identical (the same gating philosophy as the existing
|
|
4602
4621
|
* `toildb.catalog`, which is absent without `@database`). Part 5 / doc 02 AN-2
|
|
4603
|
-
* requires the section in every TOIL artifact
|
|
4604
|
-
*
|
|
4605
|
-
* toil artifact. An explicit `--targetMode hot|cold` always emits the section.
|
|
4622
|
+
* requires the section in every TOIL artifact; a non-toil module is not a toil
|
|
4623
|
+
* artifact. An explicit `--targetMode hot|cold` always emits the section.
|
|
4606
4624
|
*/
|
|
4607
4625
|
export function buildToilSurface(program: Program, targetMode: string | null): Uint8Array | null;
|
|
4608
4626
|
}
|
|
@@ -5051,8 +5069,8 @@ declare module "types:toilscript/src/compiler" {
|
|
|
5051
5069
|
constructor();
|
|
5052
5070
|
/** WebAssembly target. Defaults to {@link Target.Wasm32}. */
|
|
5053
5071
|
target: Target;
|
|
5054
|
-
/** Toil compile surface mode. null =
|
|
5055
|
-
*
|
|
5072
|
+
/** Toil compile surface mode. null = default request artifact. "hot" = request + stream surface.
|
|
5073
|
+
* "cold" = daemon surface. */
|
|
5056
5074
|
targetMode: string | null;
|
|
5057
5075
|
/** Runtime type. Defaults to Incremental GC. */
|
|
5058
5076
|
runtime: Runtime;
|
|
@@ -9964,7 +9982,7 @@ declare module "types:toilscript/src/index-wasm" {
|
|
|
9964
9982
|
export function setExportStart(options: Options, exportStart: string | null): void;
|
|
9965
9983
|
/** Sets the `noUnsafe` option. */
|
|
9966
9984
|
export function setNoUnsafe(options: Options, noUnsafe: boolean): void;
|
|
9967
|
-
/** Sets the `targetMode` option ("hot", "cold", or null for
|
|
9985
|
+
/** Sets the `targetMode` option ("hot", "cold", or null for the default request artifact). */
|
|
9968
9986
|
export function setTargetMode(options: Options, targetMode: string | null): void;
|
|
9969
9987
|
/** Sets the `lowMemoryLimit` option. */
|
|
9970
9988
|
export function setLowMemoryLimit(options: Options, lowMemoryLimit: number): void;
|