knitting 0.1.54 → 0.1.55
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/README.md +3 -3
- package/knitting.d.ts +797 -5
- package/knitting.js +9780 -5
- package/map.md +9 -12
- package/package.json +14 -13
- package/shared-memory.d.ts +155 -0
- package/shared-memory.js +1342 -0
- package/unsafe.d.ts +71 -1
- package/unsafe.js +878 -1
- package/utils.d.ts +31 -1
- package/utils.js +116 -1
- package/process-shared-buffer.d.ts +0 -1
- package/process-shared-buffer.js +0 -1
- package/src/api.d.ts +0 -69
- package/src/api.js +0 -627
- package/src/common/envelope.d.ts +0 -17
- package/src/common/envelope.js +0 -22
- package/src/common/module-url.d.ts +0 -1
- package/src/common/module-url.js +0 -24
- package/src/common/node-compat.d.ts +0 -20
- package/src/common/node-compat.js +0 -24
- package/src/common/path-canonical.d.ts +0 -6
- package/src/common/path-canonical.js +0 -41
- package/src/common/runtime.d.ts +0 -15
- package/src/common/runtime.js +0 -91
- package/src/common/shared-buffer-region.d.ts +0 -11
- package/src/common/shared-buffer-region.js +0 -21
- package/src/common/shared-buffer-text.d.ts +0 -16
- package/src/common/shared-buffer-text.js +0 -65
- package/src/common/task-source.d.ts +0 -3
- package/src/common/task-source.js +0 -84
- package/src/common/task-symbol.d.ts +0 -1
- package/src/common/task-symbol.js +0 -1
- package/src/common/with-resolvers.d.ts +0 -9
- package/src/common/with-resolvers.js +0 -23
- package/src/common/worker-runtime.d.ts +0 -42
- package/src/common/worker-runtime.js +0 -61
- package/src/connections/buffer-reference-native.d.ts +0 -56
- package/src/connections/buffer-reference-native.js +0 -217
- package/src/connections/buffer-reference.d.ts +0 -78
- package/src/connections/buffer-reference.js +0 -461
- package/src/connections/bun.d.ts +0 -22
- package/src/connections/bun.js +0 -214
- package/src/connections/deno.d.ts +0 -22
- package/src/connections/deno.js +0 -205
- package/src/connections/file-descriptor.d.ts +0 -39
- package/src/connections/file-descriptor.js +0 -161
- package/src/connections/index.d.ts +0 -4
- package/src/connections/index.js +0 -4
- package/src/connections/node-addons.d.ts +0 -5
- package/src/connections/node-addons.js +0 -43
- package/src/connections/node-buffer-pointer.d.ts +0 -20
- package/src/connections/node-buffer-pointer.js +0 -16
- package/src/connections/node.d.ts +0 -30
- package/src/connections/node.js +0 -62
- package/src/connections/posix.d.ts +0 -32
- package/src/connections/posix.js +0 -77
- package/src/connections/process-shared-buffer.d.ts +0 -75
- package/src/connections/process-shared-buffer.js +0 -279
- package/src/connections/shared-array-buffer-payload.d.ts +0 -36
- package/src/connections/shared-array-buffer-payload.js +0 -235
- package/src/connections/types.d.ts +0 -50
- package/src/connections/types.js +0 -37
- package/src/connections/windows.d.ts +0 -28
- package/src/connections/windows.js +0 -224
- package/src/debug/env-diff.d.ts +0 -26
- package/src/debug/env-diff.js +0 -49
- package/src/debug/gate.d.ts +0 -18
- package/src/debug/gate.js +0 -69
- package/src/debug/handle.d.ts +0 -23
- package/src/debug/handle.js +0 -48
- package/src/error.d.ts +0 -13
- package/src/error.js +0 -49
- package/src/ipc/tools/ring-queue.d.ts +0 -33
- package/src/ipc/tools/ring-queue.js +0 -159
- package/src/ipc/transport/shared-memory.d.ts +0 -23
- package/src/ipc/transport/shared-memory.js +0 -35
- package/src/memory/byte-carpet.d.ts +0 -73
- package/src/memory/byte-carpet.js +0 -157
- package/src/memory/lock.d.ts +0 -201
- package/src/memory/lock.js +0 -739
- package/src/memory/payload-config.d.ts +0 -31
- package/src/memory/payload-config.js +0 -67
- package/src/memory/payloadCodec.d.ts +0 -46
- package/src/memory/payloadCodec.js +0 -1334
- package/src/memory/regionRegistry.d.ts +0 -17
- package/src/memory/regionRegistry.js +0 -285
- package/src/memory/shared-buffer-io.d.ts +0 -55
- package/src/memory/shared-buffer-io.js +0 -403
- package/src/permission/index.d.ts +0 -2
- package/src/permission/index.js +0 -2
- package/src/permission/protocol.d.ts +0 -166
- package/src/permission/protocol.js +0 -650
- package/src/runtime/balancer.d.ts +0 -19
- package/src/runtime/balancer.js +0 -149
- package/src/runtime/dispatcher.d.ts +0 -40
- package/src/runtime/dispatcher.js +0 -142
- package/src/runtime/inline-executor.d.ts +0 -10
- package/src/runtime/inline-executor.js +0 -282
- package/src/runtime/pool.d.ts +0 -39
- package/src/runtime/pool.js +0 -404
- package/src/runtime/process-worker.d.ts +0 -92
- package/src/runtime/process-worker.js +0 -673
- package/src/runtime/tx-queue.d.ts +0 -26
- package/src/runtime/tx-queue.js +0 -155
- package/src/shared/abortSignal.d.ts +0 -23
- package/src/shared/abortSignal.js +0 -134
- package/src/types.d.ts +0 -357
- package/src/types.js +0 -2
- package/src/utils/http.d.ts +0 -29
- package/src/utils/http.js +0 -100
- package/src/worker/bootstrap.d.ts +0 -5
- package/src/worker/bootstrap.js +0 -78
- package/src/worker/composable-runners.d.ts +0 -12
- package/src/worker/composable-runners.js +0 -97
- package/src/worker/loop.d.ts +0 -2
- package/src/worker/loop.js +0 -382
- package/src/worker/process-worker-bootstrap.d.ts +0 -8
- package/src/worker/process-worker-bootstrap.js +0 -160
- package/src/worker/rx-queue.d.ts +0 -25
- package/src/worker/rx-queue.js +0 -173
- package/src/worker/safety/index.d.ts +0 -4
- package/src/worker/safety/index.js +0 -4
- package/src/worker/safety/performance.d.ts +0 -1
- package/src/worker/safety/performance.js +0 -17
- package/src/worker/safety/process.d.ts +0 -2
- package/src/worker/safety/process.js +0 -79
- package/src/worker/safety/startup.d.ts +0 -16
- package/src/worker/safety/startup.js +0 -30
- package/src/worker/safety/worker-data.d.ts +0 -2
- package/src/worker/safety/worker-data.js +0 -36
- package/src/worker/task-loader.d.ts +0 -27
- package/src/worker/task-loader.js +0 -78
- package/src/worker/timers.d.ts +0 -18
- package/src/worker/timers.js +0 -116
package/README.md
CHANGED
|
@@ -667,7 +667,7 @@ copying the whole payload for every call.
|
|
|
667
667
|
import {
|
|
668
668
|
getDefaultProcessSharedBufferPrimitives,
|
|
669
669
|
ProcessSharedBuffer,
|
|
670
|
-
} from "knitting/
|
|
670
|
+
} from "knitting/shared-memory";
|
|
671
671
|
import { createPool, isMain, task } from "knitting";
|
|
672
672
|
|
|
673
673
|
export const readFirstCell = task<ProcessSharedBuffer, number>({
|
|
@@ -712,7 +712,7 @@ name; the other opens that same name.
|
|
|
712
712
|
import {
|
|
713
713
|
getDefaultProcessSharedBufferPrimitives,
|
|
714
714
|
ProcessSharedBuffer,
|
|
715
|
-
} from "knitting/
|
|
715
|
+
} from "knitting/shared-memory";
|
|
716
716
|
|
|
717
717
|
const name = "knitting-demo-channel";
|
|
718
718
|
const primitives = getDefaultProcessSharedBufferPrimitives();
|
|
@@ -761,7 +761,7 @@ import { createPool, isMain, task } from "knitting";
|
|
|
761
761
|
import {
|
|
762
762
|
getDefaultProcessSharedBufferPrimitives,
|
|
763
763
|
ProcessSharedBuffer,
|
|
764
|
-
} from "knitting/
|
|
764
|
+
} from "knitting/shared-memory";
|
|
765
765
|
|
|
766
766
|
export const readCounter = task<ProcessSharedBuffer, number>({
|
|
767
767
|
f: (shared) => Atomics.load(shared.view(Int32Array), 0),
|