@spikard/wasm 0.4.0 → 0.6.0

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 CHANGED
@@ -528,12 +528,32 @@ post("/users", { bodySchema: UserSchema })(async function createUser(req) {
528
528
 
529
529
  ## Performance
530
530
 
531
+ ### Benchmark Results
532
+
533
+ Latest comparative run (2025-12-20, commit `25e4fdf`, Linux x86_64, AMD EPYC 7763 2c/4t, 50 concurrency, 10s, oha). Full artifacts: `snapshots/benchmarks/20397054933`.
534
+
535
+ | Binding | Avg RPS (all workloads) | Avg latency (ms) |
536
+ | --- | --- | --- |
537
+ | spikard-rust | 55,755 | 1.00 |
538
+ | spikard-node | 24,283 | 2.22 |
539
+ | spikard-php | 20,176 | 2.66 |
540
+ | spikard-python | 11,902 | 4.41 |
541
+ | **spikard-wasm** | **10,658** | **5.70** |
542
+ | spikard-ruby | 8,271 | 6.50 |
543
+
544
+ WASM bindings deliver solid edge runtime performance—ideal for serverless platforms (Cloudflare Workers, Vercel Edge, Deno Deploy) where startup time and memory efficiency matter more than absolute throughput. Trade-offs vs Node.js bindings:
545
+ - **Advantages:** Portable across all runtimes, smaller bundle size, cold start friendly
546
+ - **Trade-offs:** ~2.3x lower RPS on traditional servers vs native napi-rs bindings
547
+
548
+ ### Runtime Characteristics
549
+
531
550
  WASM bindings provide:
532
- - **WebAssembly compilation** for near-native performance
551
+ - **WebAssembly compilation** for near-native performance in edge runtimes
533
552
  - **Zero-copy data structures** where supported by runtime
534
553
  - **Shared memory optimization** for large payloads
535
554
  - **Streaming support** for efficient data transfer
536
555
  - **Tree-shakable ESM** for minimal bundle sizes
556
+ - **Multi-runtime support:** Cloudflare Workers, Deno Deploy, Vercel Edge, browsers, Node.js
537
557
 
538
558
  ### Bundle Size Optimization
539
559
 
@@ -528,12 +528,32 @@ post("/users", { bodySchema: UserSchema })(async function createUser(req) {
528
528
 
529
529
  ## Performance
530
530
 
531
+ ### Benchmark Results
532
+
533
+ Latest comparative run (2025-12-20, commit `25e4fdf`, Linux x86_64, AMD EPYC 7763 2c/4t, 50 concurrency, 10s, oha). Full artifacts: `snapshots/benchmarks/20397054933`.
534
+
535
+ | Binding | Avg RPS (all workloads) | Avg latency (ms) |
536
+ | --- | --- | --- |
537
+ | spikard-rust | 55,755 | 1.00 |
538
+ | spikard-node | 24,283 | 2.22 |
539
+ | spikard-php | 20,176 | 2.66 |
540
+ | spikard-python | 11,902 | 4.41 |
541
+ | **spikard-wasm** | **10,658** | **5.70** |
542
+ | spikard-ruby | 8,271 | 6.50 |
543
+
544
+ WASM bindings deliver solid edge runtime performance—ideal for serverless platforms (Cloudflare Workers, Vercel Edge, Deno Deploy) where startup time and memory efficiency matter more than absolute throughput. Trade-offs vs Node.js bindings:
545
+ - **Advantages:** Portable across all runtimes, smaller bundle size, cold start friendly
546
+ - **Trade-offs:** ~2.3x lower RPS on traditional servers vs native napi-rs bindings
547
+
548
+ ### Runtime Characteristics
549
+
531
550
  WASM bindings provide:
532
- - **WebAssembly compilation** for near-native performance
551
+ - **WebAssembly compilation** for near-native performance in edge runtimes
533
552
  - **Zero-copy data structures** where supported by runtime
534
553
  - **Shared memory optimization** for large payloads
535
554
  - **Streaming support** for efficient data transfer
536
555
  - **Tree-shakable ESM** for minimal bundle sizes
556
+ - **Multi-runtime support:** Cloudflare Workers, Deno Deploy, Vercel Edge, browsers, Node.js
537
557
 
538
558
  ### Bundle Size Optimization
539
559
 
@@ -5,7 +5,7 @@
5
5
  "Na'aman Hirschfeld <nhirschfeld@gmail.com>"
6
6
  ],
7
7
  "description": "WebAssembly bindings for Spikard HTTP framework via wasm-bindgen",
8
- "version": "0.4.0",
8
+ "version": "0.6.0",
9
9
  "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",
@@ -232,16 +232,16 @@ if (!('encodeInto' in cachedTextEncoder)) {
232
232
 
233
233
  let WASM_VECTOR_LEN = 0;
234
234
 
235
- function __wasm_bindgen_func_elem_404(arg0, arg1) {
236
- wasm.__wasm_bindgen_func_elem_404(arg0, arg1);
235
+ function __wasm_bindgen_func_elem_641(arg0, arg1, arg2) {
236
+ wasm.__wasm_bindgen_func_elem_641(arg0, arg1, addHeapObject(arg2));
237
237
  }
238
238
 
239
- function __wasm_bindgen_func_elem_637(arg0, arg1, arg2) {
240
- wasm.__wasm_bindgen_func_elem_637(arg0, arg1, addHeapObject(arg2));
239
+ function __wasm_bindgen_func_elem_405(arg0, arg1) {
240
+ wasm.__wasm_bindgen_func_elem_405(arg0, arg1);
241
241
  }
242
242
 
243
- function __wasm_bindgen_func_elem_4179(arg0, arg1, arg2, arg3) {
244
- wasm.__wasm_bindgen_func_elem_4179(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
243
+ function __wasm_bindgen_func_elem_4291(arg0, arg1, arg2, arg3) {
244
+ wasm.__wasm_bindgen_func_elem_4291(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
245
245
  }
246
246
 
247
247
  const TestClientFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -400,6 +400,11 @@ export function __wbg_Error_52673b7de5a0ca89(arg0, arg1) {
400
400
  return addHeapObject(ret);
401
401
  };
402
402
 
403
+ export function __wbg_Number_2d1dcfcf4ec51736(arg0) {
404
+ const ret = Number(getObject(arg0));
405
+ return ret;
406
+ };
407
+
403
408
  export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) {
404
409
  const ret = String(getObject(arg1));
405
410
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
@@ -670,6 +675,11 @@ export function __wbg_keys_f5c6002ff150fc6c(arg0) {
670
675
  return addHeapObject(ret);
671
676
  };
672
677
 
678
+ export function __wbg_length_1f83b8e5895c84aa(arg0) {
679
+ const ret = getObject(arg0).length;
680
+ return ret;
681
+ };
682
+
673
683
  export function __wbg_length_22ac23eaec9d8053(arg0) {
674
684
  const ret = getObject(arg0).length;
675
685
  return ret;
@@ -717,7 +727,7 @@ export function __wbg_new_ff12d2b041fb48f1(arg0, arg1) {
717
727
  const a = state0.a;
718
728
  state0.a = 0;
719
729
  try {
720
- return __wasm_bindgen_func_elem_4179(a, state0.b, arg0, arg1);
730
+ return __wasm_bindgen_func_elem_4291(a, state0.b, arg0, arg1);
721
731
  } finally {
722
732
  state0.a = a;
723
733
  }
@@ -861,7 +871,7 @@ export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
861
871
 
862
872
  export function __wbindgen_cast_35aab93a0b8c860f(arg0, arg1) {
863
873
  // Cast intrinsic for `Closure(Closure { dtor_idx: 14, function: Function { arguments: [], shim_idx: 15, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
864
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_403, __wasm_bindgen_func_elem_404);
874
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_404, __wasm_bindgen_func_elem_405);
865
875
  return addHeapObject(ret);
866
876
  };
867
877
 
@@ -873,7 +883,7 @@ export function __wbindgen_cast_4625c577ab2ec9ee(arg0) {
873
883
 
874
884
  export function __wbindgen_cast_75edd3f875320618(arg0, arg1) {
875
885
  // Cast intrinsic for `Closure(Closure { dtor_idx: 120, function: Function { arguments: [Externref], shim_idx: 121, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
876
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_636, __wasm_bindgen_func_elem_637);
886
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_640, __wasm_bindgen_func_elem_641);
877
887
  return addHeapObject(ret);
878
888
  };
879
889
 
Binary file
@@ -13,11 +13,11 @@ export const testclient_post: (a: number, b: number, c: number, d: number) => nu
13
13
  export const testclient_put: (a: number, b: number, c: number, d: number) => number;
14
14
  export const testclient_trace: (a: number, b: number, c: number, d: number) => number;
15
15
  export const init: () => void;
16
+ export const __wasm_bindgen_func_elem_641: (a: number, b: number, c: number) => void;
17
+ export const __wasm_bindgen_func_elem_640: (a: number, b: number) => void;
18
+ export const __wasm_bindgen_func_elem_405: (a: number, b: number) => void;
16
19
  export const __wasm_bindgen_func_elem_404: (a: number, b: number) => void;
17
- export const __wasm_bindgen_func_elem_403: (a: number, b: number) => void;
18
- export const __wasm_bindgen_func_elem_637: (a: number, b: number, c: number) => void;
19
- export const __wasm_bindgen_func_elem_636: (a: number, b: number) => void;
20
- export const __wasm_bindgen_func_elem_4179: (a: number, b: number, c: number, d: number) => void;
20
+ export const __wasm_bindgen_func_elem_4291: (a: number, b: number, c: number, d: number) => void;
21
21
  export const __wbindgen_export: (a: number, b: number) => number;
22
22
  export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
23
23
  export const __wbindgen_export3: (a: number) => void;
@@ -528,12 +528,32 @@ post("/users", { bodySchema: UserSchema })(async function createUser(req) {
528
528
 
529
529
  ## Performance
530
530
 
531
+ ### Benchmark Results
532
+
533
+ Latest comparative run (2025-12-20, commit `25e4fdf`, Linux x86_64, AMD EPYC 7763 2c/4t, 50 concurrency, 10s, oha). Full artifacts: `snapshots/benchmarks/20397054933`.
534
+
535
+ | Binding | Avg RPS (all workloads) | Avg latency (ms) |
536
+ | --- | --- | --- |
537
+ | spikard-rust | 55,755 | 1.00 |
538
+ | spikard-node | 24,283 | 2.22 |
539
+ | spikard-php | 20,176 | 2.66 |
540
+ | spikard-python | 11,902 | 4.41 |
541
+ | **spikard-wasm** | **10,658** | **5.70** |
542
+ | spikard-ruby | 8,271 | 6.50 |
543
+
544
+ WASM bindings deliver solid edge runtime performance—ideal for serverless platforms (Cloudflare Workers, Vercel Edge, Deno Deploy) where startup time and memory efficiency matter more than absolute throughput. Trade-offs vs Node.js bindings:
545
+ - **Advantages:** Portable across all runtimes, smaller bundle size, cold start friendly
546
+ - **Trade-offs:** ~2.3x lower RPS on traditional servers vs native napi-rs bindings
547
+
548
+ ### Runtime Characteristics
549
+
531
550
  WASM bindings provide:
532
- - **WebAssembly compilation** for near-native performance
551
+ - **WebAssembly compilation** for near-native performance in edge runtimes
533
552
  - **Zero-copy data structures** where supported by runtime
534
553
  - **Shared memory optimization** for large payloads
535
554
  - **Streaming support** for efficient data transfer
536
555
  - **Tree-shakable ESM** for minimal bundle sizes
556
+ - **Multi-runtime support:** Cloudflare Workers, Deno Deploy, Vercel Edge, browsers, Node.js
537
557
 
538
558
  ### Bundle Size Optimization
539
559
 
@@ -4,7 +4,7 @@
4
4
  "Na'aman Hirschfeld <nhirschfeld@gmail.com>"
5
5
  ],
6
6
  "description": "WebAssembly bindings for Spikard HTTP framework via wasm-bindgen",
7
- "version": "0.4.0",
7
+ "version": "0.6.0",
8
8
  "license": "MIT",
9
9
  "repository": {
10
10
  "type": "git",
@@ -223,16 +223,16 @@ if (!('encodeInto' in cachedTextEncoder)) {
223
223
 
224
224
  let WASM_VECTOR_LEN = 0;
225
225
 
226
- function __wasm_bindgen_func_elem_637(arg0, arg1, arg2) {
227
- wasm.__wasm_bindgen_func_elem_637(arg0, arg1, addHeapObject(arg2));
226
+ function __wasm_bindgen_func_elem_641(arg0, arg1, arg2) {
227
+ wasm.__wasm_bindgen_func_elem_641(arg0, arg1, addHeapObject(arg2));
228
228
  }
229
229
 
230
- function __wasm_bindgen_func_elem_404(arg0, arg1) {
231
- wasm.__wasm_bindgen_func_elem_404(arg0, arg1);
230
+ function __wasm_bindgen_func_elem_405(arg0, arg1) {
231
+ wasm.__wasm_bindgen_func_elem_405(arg0, arg1);
232
232
  }
233
233
 
234
- function __wasm_bindgen_func_elem_4179(arg0, arg1, arg2, arg3) {
235
- wasm.__wasm_bindgen_func_elem_4179(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
234
+ function __wasm_bindgen_func_elem_4291(arg0, arg1, arg2, arg3) {
235
+ wasm.__wasm_bindgen_func_elem_4291(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
236
236
  }
237
237
 
238
238
  const TestClientFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -393,6 +393,11 @@ exports.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) {
393
393
  return addHeapObject(ret);
394
394
  };
395
395
 
396
+ exports.__wbg_Number_2d1dcfcf4ec51736 = function(arg0) {
397
+ const ret = Number(getObject(arg0));
398
+ return ret;
399
+ };
400
+
396
401
  exports.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
397
402
  const ret = String(getObject(arg1));
398
403
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
@@ -663,6 +668,11 @@ exports.__wbg_keys_f5c6002ff150fc6c = function(arg0) {
663
668
  return addHeapObject(ret);
664
669
  };
665
670
 
671
+ exports.__wbg_length_1f83b8e5895c84aa = function(arg0) {
672
+ const ret = getObject(arg0).length;
673
+ return ret;
674
+ };
675
+
666
676
  exports.__wbg_length_22ac23eaec9d8053 = function(arg0) {
667
677
  const ret = getObject(arg0).length;
668
678
  return ret;
@@ -710,7 +720,7 @@ exports.__wbg_new_ff12d2b041fb48f1 = function(arg0, arg1) {
710
720
  const a = state0.a;
711
721
  state0.a = 0;
712
722
  try {
713
- return __wasm_bindgen_func_elem_4179(a, state0.b, arg0, arg1);
723
+ return __wasm_bindgen_func_elem_4291(a, state0.b, arg0, arg1);
714
724
  } finally {
715
725
  state0.a = a;
716
726
  }
@@ -854,7 +864,7 @@ exports.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
854
864
 
855
865
  exports.__wbindgen_cast_35aab93a0b8c860f = function(arg0, arg1) {
856
866
  // Cast intrinsic for `Closure(Closure { dtor_idx: 14, function: Function { arguments: [], shim_idx: 15, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
857
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_403, __wasm_bindgen_func_elem_404);
867
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_404, __wasm_bindgen_func_elem_405);
858
868
  return addHeapObject(ret);
859
869
  };
860
870
 
@@ -866,7 +876,7 @@ exports.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
866
876
 
867
877
  exports.__wbindgen_cast_75edd3f875320618 = function(arg0, arg1) {
868
878
  // Cast intrinsic for `Closure(Closure { dtor_idx: 120, function: Function { arguments: [Externref], shim_idx: 121, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
869
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_636, __wasm_bindgen_func_elem_637);
879
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_640, __wasm_bindgen_func_elem_641);
870
880
  return addHeapObject(ret);
871
881
  };
872
882
 
Binary file
@@ -13,11 +13,11 @@ export const testclient_post: (a: number, b: number, c: number, d: number) => nu
13
13
  export const testclient_put: (a: number, b: number, c: number, d: number) => number;
14
14
  export const testclient_trace: (a: number, b: number, c: number, d: number) => number;
15
15
  export const init: () => void;
16
- export const __wasm_bindgen_func_elem_637: (a: number, b: number, c: number) => void;
17
- export const __wasm_bindgen_func_elem_636: (a: number, b: number) => void;
16
+ export const __wasm_bindgen_func_elem_641: (a: number, b: number, c: number) => void;
17
+ export const __wasm_bindgen_func_elem_640: (a: number, b: number) => void;
18
+ export const __wasm_bindgen_func_elem_405: (a: number, b: number) => void;
18
19
  export const __wasm_bindgen_func_elem_404: (a: number, b: number) => void;
19
- export const __wasm_bindgen_func_elem_403: (a: number, b: number) => void;
20
- export const __wasm_bindgen_func_elem_4179: (a: number, b: number, c: number, d: number) => void;
20
+ export const __wasm_bindgen_func_elem_4291: (a: number, b: number, c: number, d: number) => void;
21
21
  export const __wbindgen_export: (a: number, b: number) => number;
22
22
  export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
23
23
  export const __wbindgen_export3: (a: number) => void;
@@ -528,12 +528,32 @@ post("/users", { bodySchema: UserSchema })(async function createUser(req) {
528
528
 
529
529
  ## Performance
530
530
 
531
+ ### Benchmark Results
532
+
533
+ Latest comparative run (2025-12-20, commit `25e4fdf`, Linux x86_64, AMD EPYC 7763 2c/4t, 50 concurrency, 10s, oha). Full artifacts: `snapshots/benchmarks/20397054933`.
534
+
535
+ | Binding | Avg RPS (all workloads) | Avg latency (ms) |
536
+ | --- | --- | --- |
537
+ | spikard-rust | 55,755 | 1.00 |
538
+ | spikard-node | 24,283 | 2.22 |
539
+ | spikard-php | 20,176 | 2.66 |
540
+ | spikard-python | 11,902 | 4.41 |
541
+ | **spikard-wasm** | **10,658** | **5.70** |
542
+ | spikard-ruby | 8,271 | 6.50 |
543
+
544
+ WASM bindings deliver solid edge runtime performance—ideal for serverless platforms (Cloudflare Workers, Vercel Edge, Deno Deploy) where startup time and memory efficiency matter more than absolute throughput. Trade-offs vs Node.js bindings:
545
+ - **Advantages:** Portable across all runtimes, smaller bundle size, cold start friendly
546
+ - **Trade-offs:** ~2.3x lower RPS on traditional servers vs native napi-rs bindings
547
+
548
+ ### Runtime Characteristics
549
+
531
550
  WASM bindings provide:
532
- - **WebAssembly compilation** for near-native performance
551
+ - **WebAssembly compilation** for near-native performance in edge runtimes
533
552
  - **Zero-copy data structures** where supported by runtime
534
553
  - **Shared memory optimization** for large payloads
535
554
  - **Streaming support** for efficient data transfer
536
555
  - **Tree-shakable ESM** for minimal bundle sizes
556
+ - **Multi-runtime support:** Cloudflare Workers, Deno Deploy, Vercel Edge, browsers, Node.js
537
557
 
538
558
  ### Bundle Size Optimization
539
559
 
@@ -5,7 +5,7 @@
5
5
  "Na'aman Hirschfeld <nhirschfeld@gmail.com>"
6
6
  ],
7
7
  "description": "WebAssembly bindings for Spikard HTTP framework via wasm-bindgen",
8
- "version": "0.4.0",
8
+ "version": "0.6.0",
9
9
  "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",
@@ -43,11 +43,11 @@ export interface InitOutput {
43
43
  readonly testclient_put: (a: number, b: number, c: number, d: number) => number;
44
44
  readonly testclient_trace: (a: number, b: number, c: number, d: number) => number;
45
45
  readonly init: () => void;
46
+ readonly __wasm_bindgen_func_elem_405: (a: number, b: number) => void;
46
47
  readonly __wasm_bindgen_func_elem_404: (a: number, b: number) => void;
47
- readonly __wasm_bindgen_func_elem_403: (a: number, b: number) => void;
48
- readonly __wasm_bindgen_func_elem_637: (a: number, b: number, c: number) => void;
49
- readonly __wasm_bindgen_func_elem_636: (a: number, b: number) => void;
50
- readonly __wasm_bindgen_func_elem_4179: (a: number, b: number, c: number, d: number) => void;
48
+ readonly __wasm_bindgen_func_elem_641: (a: number, b: number, c: number) => void;
49
+ readonly __wasm_bindgen_func_elem_640: (a: number, b: number) => void;
50
+ readonly __wasm_bindgen_func_elem_4291: (a: number, b: number, c: number, d: number) => void;
51
51
  readonly __wbindgen_export: (a: number, b: number) => number;
52
52
  readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
53
53
  readonly __wbindgen_export3: (a: number) => void;
@@ -229,16 +229,16 @@ if (!('encodeInto' in cachedTextEncoder)) {
229
229
 
230
230
  let WASM_VECTOR_LEN = 0;
231
231
 
232
- function __wasm_bindgen_func_elem_404(arg0, arg1) {
233
- wasm.__wasm_bindgen_func_elem_404(arg0, arg1);
232
+ function __wasm_bindgen_func_elem_405(arg0, arg1) {
233
+ wasm.__wasm_bindgen_func_elem_405(arg0, arg1);
234
234
  }
235
235
 
236
- function __wasm_bindgen_func_elem_637(arg0, arg1, arg2) {
237
- wasm.__wasm_bindgen_func_elem_637(arg0, arg1, addHeapObject(arg2));
236
+ function __wasm_bindgen_func_elem_641(arg0, arg1, arg2) {
237
+ wasm.__wasm_bindgen_func_elem_641(arg0, arg1, addHeapObject(arg2));
238
238
  }
239
239
 
240
- function __wasm_bindgen_func_elem_4179(arg0, arg1, arg2, arg3) {
241
- wasm.__wasm_bindgen_func_elem_4179(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
240
+ function __wasm_bindgen_func_elem_4291(arg0, arg1, arg2, arg3) {
241
+ wasm.__wasm_bindgen_func_elem_4291(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
242
242
  }
243
243
 
244
244
  const TestClientFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -431,6 +431,10 @@ function __wbg_get_imports() {
431
431
  const ret = Error(getStringFromWasm0(arg0, arg1));
432
432
  return addHeapObject(ret);
433
433
  };
434
+ imports.wbg.__wbg_Number_2d1dcfcf4ec51736 = function(arg0) {
435
+ const ret = Number(getObject(arg0));
436
+ return ret;
437
+ };
434
438
  imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
435
439
  const ret = String(getObject(arg1));
436
440
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
@@ -658,6 +662,10 @@ function __wbg_get_imports() {
658
662
  const ret = Object.keys(getObject(arg0));
659
663
  return addHeapObject(ret);
660
664
  };
665
+ imports.wbg.__wbg_length_1f83b8e5895c84aa = function(arg0) {
666
+ const ret = getObject(arg0).length;
667
+ return ret;
668
+ };
661
669
  imports.wbg.__wbg_length_22ac23eaec9d8053 = function(arg0) {
662
670
  const ret = getObject(arg0).length;
663
671
  return ret;
@@ -697,7 +705,7 @@ function __wbg_get_imports() {
697
705
  const a = state0.a;
698
706
  state0.a = 0;
699
707
  try {
700
- return __wasm_bindgen_func_elem_4179(a, state0.b, arg0, arg1);
708
+ return __wasm_bindgen_func_elem_4291(a, state0.b, arg0, arg1);
701
709
  } finally {
702
710
  state0.a = a;
703
711
  }
@@ -814,7 +822,7 @@ function __wbg_get_imports() {
814
822
  };
815
823
  imports.wbg.__wbindgen_cast_35aab93a0b8c860f = function(arg0, arg1) {
816
824
  // Cast intrinsic for `Closure(Closure { dtor_idx: 14, function: Function { arguments: [], shim_idx: 15, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
817
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_403, __wasm_bindgen_func_elem_404);
825
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_404, __wasm_bindgen_func_elem_405);
818
826
  return addHeapObject(ret);
819
827
  };
820
828
  imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
@@ -824,7 +832,7 @@ function __wbg_get_imports() {
824
832
  };
825
833
  imports.wbg.__wbindgen_cast_75edd3f875320618 = function(arg0, arg1) {
826
834
  // Cast intrinsic for `Closure(Closure { dtor_idx: 120, function: Function { arguments: [Externref], shim_idx: 121, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
827
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_636, __wasm_bindgen_func_elem_637);
835
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_640, __wasm_bindgen_func_elem_641);
828
836
  return addHeapObject(ret);
829
837
  };
830
838
  imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
Binary file
@@ -13,11 +13,11 @@ export const testclient_post: (a: number, b: number, c: number, d: number) => nu
13
13
  export const testclient_put: (a: number, b: number, c: number, d: number) => number;
14
14
  export const testclient_trace: (a: number, b: number, c: number, d: number) => number;
15
15
  export const init: () => void;
16
+ export const __wasm_bindgen_func_elem_405: (a: number, b: number) => void;
16
17
  export const __wasm_bindgen_func_elem_404: (a: number, b: number) => void;
17
- export const __wasm_bindgen_func_elem_403: (a: number, b: number) => void;
18
- export const __wasm_bindgen_func_elem_637: (a: number, b: number, c: number) => void;
19
- export const __wasm_bindgen_func_elem_636: (a: number, b: number) => void;
20
- export const __wasm_bindgen_func_elem_4179: (a: number, b: number, c: number, d: number) => void;
18
+ export const __wasm_bindgen_func_elem_641: (a: number, b: number, c: number) => void;
19
+ export const __wasm_bindgen_func_elem_640: (a: number, b: number) => void;
20
+ export const __wasm_bindgen_func_elem_4291: (a: number, b: number, c: number, d: number) => void;
21
21
  export const __wbindgen_export: (a: number, b: number) => number;
22
22
  export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
23
23
  export const __wbindgen_export3: (a: number) => void;
package/package.json CHANGED
@@ -1,70 +1,70 @@
1
1
  {
2
- "name": "@spikard/wasm",
3
- "version": "0.4.0",
4
- "description": "WebAssembly bindings for spikard - High-performance HTTP framework",
5
- "main": "dist-bundler/spikard_wasm.js",
6
- "types": "dist-bundler/spikard_wasm.d.ts",
7
- "exports": {
8
- ".": {
9
- "import": "./dist-bundler/spikard_wasm.js",
10
- "types": "./dist-bundler/spikard_wasm.d.ts",
11
- "default": "./dist-bundler/spikard_wasm.js"
12
- },
13
- "./dist-node": {
14
- "import": "./dist-node/spikard_wasm.js",
15
- "require": "./dist-node/spikard_wasm.js",
16
- "types": "./dist-node/spikard_wasm.d.ts"
17
- },
18
- "./dist-node/*": "./dist-node/*",
19
- "./dist-web": {
20
- "import": "./dist-web/spikard_wasm.js",
21
- "types": "./dist-web/spikard_wasm.d.ts"
22
- },
23
- "./dist-web/*": "./dist-web/*"
24
- },
25
- "license": "MIT",
26
- "keywords": [
27
- "wasm",
28
- "webassembly",
29
- "http",
30
- "framework",
31
- "rust",
32
- "performance",
33
- "web",
34
- "api"
35
- ],
36
- "author": {
37
- "name": "Na'aman Hirschfeld",
38
- "email": "nhirschfeld@gmail.com"
39
- },
40
- "repository": {
41
- "type": "git",
42
- "url": "https://github.com/Goldziher/spikard"
43
- },
44
- "homepage": "https://github.com/Goldziher/spikard",
45
- "bugs": {
46
- "url": "https://github.com/Goldziher/spikard/issues"
47
- },
48
- "files": [
49
- "README.md",
50
- "dist-bundler",
51
- "dist-node",
52
- "dist-web"
53
- ],
54
- "scripts": {
55
- "build": "pnpm run build:bundler",
56
- "build:bundler": "PATH=\"$HOME/.cargo/bin:$PATH\" pnpm exec wasm-pack build --target bundler --out-dir dist-bundler --release",
57
- "build:web": "PATH=\"$HOME/.cargo/bin:$PATH\" pnpm exec wasm-pack build --target web --out-dir dist-web --release",
58
- "build:node": "PATH=\"$HOME/.cargo/bin:$PATH\" pnpm exec wasm-pack build --target nodejs --out-dir dist-node --release",
59
- "build:all": "pnpm run build:bundler && pnpm run build:node && pnpm run build:web",
60
- "test": "PATH=\"$HOME/.cargo/bin:$PATH\" pnpm exec wasm-pack build --target web && PATH=\"$HOME/.cargo/bin:$PATH\" pnpm exec wasm-pack test --node",
61
- "clean": "rm -rf dist-bundler dist-node dist-web node_modules"
62
- },
63
- "devDependencies": {
64
- "wasm-pack": "^0.13.1"
65
- },
66
- "publishConfig": {
67
- "registry": "https://registry.npmjs.org/",
68
- "access": "public"
69
- }
2
+ "name": "@spikard/wasm",
3
+ "version": "0.6.0",
4
+ "description": "WebAssembly bindings for spikard - High-performance HTTP framework",
5
+ "main": "dist-bundler/spikard_wasm.js",
6
+ "types": "dist-bundler/spikard_wasm.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./dist-bundler/spikard_wasm.js",
10
+ "types": "./dist-bundler/spikard_wasm.d.ts",
11
+ "default": "./dist-bundler/spikard_wasm.js"
12
+ },
13
+ "./dist-node": {
14
+ "import": "./dist-node/spikard_wasm.js",
15
+ "require": "./dist-node/spikard_wasm.js",
16
+ "types": "./dist-node/spikard_wasm.d.ts"
17
+ },
18
+ "./dist-node/*": "./dist-node/*",
19
+ "./dist-web": {
20
+ "import": "./dist-web/spikard_wasm.js",
21
+ "types": "./dist-web/spikard_wasm.d.ts"
22
+ },
23
+ "./dist-web/*": "./dist-web/*"
24
+ },
25
+ "license": "MIT",
26
+ "keywords": [
27
+ "wasm",
28
+ "webassembly",
29
+ "http",
30
+ "framework",
31
+ "rust",
32
+ "performance",
33
+ "web",
34
+ "api"
35
+ ],
36
+ "author": {
37
+ "name": "Na'aman Hirschfeld",
38
+ "email": "nhirschfeld@gmail.com"
39
+ },
40
+ "repository": {
41
+ "type": "git",
42
+ "url": "https://github.com/Goldziher/spikard"
43
+ },
44
+ "homepage": "https://github.com/Goldziher/spikard",
45
+ "bugs": {
46
+ "url": "https://github.com/Goldziher/spikard/issues"
47
+ },
48
+ "files": [
49
+ "README.md",
50
+ "dist-bundler",
51
+ "dist-node",
52
+ "dist-web"
53
+ ],
54
+ "scripts": {
55
+ "build": "pnpm run build:bundler",
56
+ "build:bundler": "PATH=\"$HOME/.cargo/bin:$PATH\" pnpm exec wasm-pack build --target bundler --out-dir dist-bundler --release",
57
+ "build:web": "PATH=\"$HOME/.cargo/bin:$PATH\" pnpm exec wasm-pack build --target web --out-dir dist-web --release",
58
+ "build:node": "PATH=\"$HOME/.cargo/bin:$PATH\" pnpm exec wasm-pack build --target nodejs --out-dir dist-node --release",
59
+ "build:all": "pnpm run build:bundler && pnpm run build:node && pnpm run build:web",
60
+ "test": "PATH=\"$HOME/.cargo/bin:$PATH\" pnpm exec wasm-pack build --target web && PATH=\"$HOME/.cargo/bin:$PATH\" pnpm exec wasm-pack test --node",
61
+ "clean": "rm -rf dist-bundler dist-node dist-web node_modules"
62
+ },
63
+ "devDependencies": {
64
+ "wasm-pack": "^0.13.1"
65
+ },
66
+ "publishConfig": {
67
+ "registry": "https://registry.npmjs.org/",
68
+ "access": "public"
69
+ }
70
70
  }