@kent-tokyo/chematic 1.0.15 → 1.0.17

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
@@ -51,6 +51,19 @@ npm install @kent-tokyo/chematic
51
51
 
52
52
  ## Usage
53
53
 
54
+ The generated handle declarations include `Symbol.dispose` for explicit
55
+ resource release. TypeScript consumers should include `ESNext.Disposable` in
56
+ their `tsconfig.json` `lib` list (in addition to their normal browser or Node
57
+ libraries):
58
+
59
+ ```json
60
+ {
61
+ "compilerOptions": {
62
+ "lib": ["ES2022", "DOM", "ESNext.Disposable"]
63
+ }
64
+ }
65
+ ```
66
+
54
67
  ```js
55
68
  import init, {
56
69
  parse_smiles,
@@ -224,9 +237,12 @@ const groups = JSON.parse(v3000_sgroups_json(v3000Block));
224
237
  This is a syntax-level API; it does not claim polymer expansion, Markush
225
238
  interpretation, or cross-engine semantic compatibility.
226
239
 
227
- ## Bundle Size
240
+ ## Bundle size
228
241
 
229
- The optimized v1.0.12 artifact was measured at **3.93 MB raw / 1.43 MB gzip**. Bundle size depends on features and toolchain; see [`benchmarks/2026-09-11-official-rdkit-js-v1.0.12.md`](../../benchmarks/2026-09-11-official-rdkit-js-v1.0.12.md) for exact tools, digest, and reproduction steps.
242
+ The published v1.0.15 npm WASM asset is **4,005,280 bytes raw / 1,460,499
243
+ bytes gzip**. Bundle size depends on features and toolchain; see the
244
+ [published-package scorecard](../../benchmarks/2026-09-16-official-rdkit-js-isolated-browser-v1.0.15.md)
245
+ for package versions, digests, tools, and reproduction steps.
230
246
 
231
247
  PNG rasterization (`tiny_skia`) is excluded from the WASM build — use SVG output instead. All SVG depiction APIs remain fully available.
232
248
 
@@ -2797,6 +2797,16 @@ export function validate_nmr_spectrum_json(json: string): string;
2797
2797
  */
2798
2798
  export function virtual_screen_ecfp4_json(query_smi: string, db_smiles_json: string, k: number): string;
2799
2799
 
2800
+ /**
2801
+ * Current WebAssembly linear-memory allocation in bytes.
2802
+ *
2803
+ * This is an allocation boundary, not a resident-set or live-object estimate:
2804
+ * freed Rust allocations may remain in the linear-memory reservation. It exists
2805
+ * so browser benchmark harnesses can report that dimension explicitly instead
2806
+ * of inferring it from JavaScript heap snapshots.
2807
+ */
2808
+ export function wasm_linear_memory_bytes(): number;
2809
+
2800
2810
  /**
2801
2811
  * Compute WHIM descriptors (Weighted Holistic Invariant Molecular) from 3D coordinates.
2802
2812
  * Returns JSON array of 22 values: 11 unit-weight descriptors followed by 11 mass-weight
@@ -3275,6 +3285,7 @@ export interface InitOutput {
3275
3285
  readonly v3000_sgroups_json: (a: number, b: number) => [number, number, number, number];
3276
3286
  readonly validate_nmr_spectrum_json: (a: number, b: number) => [number, number];
3277
3287
  readonly virtual_screen_ecfp4_json: (a: number, b: number, c: number, d: number, e: number) => [number, number];
3288
+ readonly wasm_linear_memory_bytes: () => number;
3278
3289
  readonly whim_descriptors_json: (a: number) => [number, number];
3279
3290
  readonly whim_getaway_combined_json: (a: number) => [number, number];
3280
3291
  readonly write_cube_json: (a: number, b: number) => [number, number, number, number];
package/chematic_wasm.js CHANGED
@@ -7397,6 +7397,20 @@ export function virtual_screen_ecfp4_json(query_smi, db_smiles_json, k) {
7397
7397
  }
7398
7398
  }
7399
7399
 
7400
+ /**
7401
+ * Current WebAssembly linear-memory allocation in bytes.
7402
+ *
7403
+ * This is an allocation boundary, not a resident-set or live-object estimate:
7404
+ * freed Rust allocations may remain in the linear-memory reservation. It exists
7405
+ * so browser benchmark harnesses can report that dimension explicitly instead
7406
+ * of inferring it from JavaScript heap snapshots.
7407
+ * @returns {number}
7408
+ */
7409
+ export function wasm_linear_memory_bytes() {
7410
+ const ret = wasm.wasm_linear_memory_bytes();
7411
+ return ret >>> 0;
7412
+ }
7413
+
7400
7414
  /**
7401
7415
  * Compute WHIM descriptors (Weighted Holistic Invariant Molecular) from 3D coordinates.
7402
7416
  * Returns JSON array of 22 values: 11 unit-weight descriptors followed by 11 mass-weight
Binary file
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "Kentaro Tanabe (kent-tokyo) <kent-tokyo@users.noreply.github.com>"
6
6
  ],
7
7
  "description": "WebAssembly bindings for chematic — use chematic from JavaScript/TypeScript",
8
- "version": "1.0.15",
8
+ "version": "1.0.17",
9
9
  "license": "MIT OR Apache-2.0",
10
10
  "repository": {
11
11
  "type": "git",