build(dwg): ship the parser wasm built on unmodified acadrust 0.6.5

The shipped wasm was built from a vendored acadrust 0.4.1 carrying local
changes in two files (read_mesh array bounds, OLE2FRAME corner decoding),
and the published read_mesh patch did not even apply to the pristine
crate, so the notice could not reproduce the source compiled into the
wasm (MPL-2.0 3.2). acadrust 0.6.5 already does both on its own: the
road-surface MESH and the C0060203 OLE2FRAME come out identical to the
patched build, so the parser now uses the crate exactly as crates.io
serves it.

The notices name 0.6.5, its upstream commit and the crate SHA-256 (equal
to the Cargo.lock checksum the build used), the stale patch file is
removed, and the page links to the crate source instead.

Verified on 22 samples, loading each with the old and the new wasm in
Chrome: all load, 17 render pixel-identical, and the 5 that differ are
0.4.1 misreads that 0.6.5 corrects. The wrapper changes this needed live
in hmwebviewer rust/dwg-wasm (branch chore/acadrust-0.6.5).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
minsungandClaude Opus 5.5 committed 2026-10-19 19:44:07 +09:00
1 parent 1f80442f6c
commit 129f0af25e
9 files changed
+73 -162

No files matched your search

+1
View File
@@ -24,6 +24,7 @@ export interface InitOutput {
readonly parse_dwg_json: (a: number, b: number) => [number, number, number, number];
readonly __wbindgen_malloc: (a: number, b: number) => number;
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
readonly __externref_table_alloc: () => number;
readonly __wbindgen_externrefs: WebAssembly.Table;
readonly __externref_table_dealloc: (a: number) => void;
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
+38
View File
@@ -65,6 +65,10 @@ function __wbg_get_imports() {
const ret = typeof(arg0) === 'string';
return ret;
},
__wbg___wbindgen_is_undefined_c05833b95a3cf397: function(arg0) {
const ret = arg0 === undefined;
return ret;
},
__wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
throw new Error(getStringFromWasm0(arg0, arg1));
},
@@ -80,6 +84,14 @@ function __wbg_get_imports() {
const ret = new Object();
return ret;
},
__wbg_now_e7c6795a7f81e10f: function(arg0) {
const ret = arg0.now();
return ret;
},
__wbg_performance_3fcf6e32a7e1ed0a: function(arg0) {
const ret = arg0.performance;
return ret;
},
__wbg_set_575dd786d51585f8: function(arg0, arg1, arg2) {
const ret = arg0.set(arg1, arg2);
return ret;
@@ -90,6 +102,22 @@ function __wbg_get_imports() {
__wbg_set_8a16b38e4805b298: function(arg0, arg1, arg2) {
arg0[arg1 >>> 0] = arg2;
},
__wbg_static_accessor_GLOBAL_4ef717fb391d88b7: function() {
const ret = typeof global === 'undefined' ? null : global;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_static_accessor_GLOBAL_THIS_8d1badc68b5a74f4: function() {
const ret = typeof globalThis === 'undefined' ? null : globalThis;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_static_accessor_SELF_146583524fe1469b: function() {
const ret = typeof self === 'undefined' ? null : self;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_static_accessor_WINDOW_f2829a2234d7819e: function() {
const ret = typeof window === 'undefined' ? null : window;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbindgen_cast_0000000000000001: function(arg0) {
// Cast intrinsic for `F64 -> Externref`.
const ret = arg0;
@@ -126,6 +154,12 @@ function __wbg_get_imports() {
};
}
function addToExternrefTable0(obj) {
const idx = wasm.__externref_table_alloc();
wasm.__wbindgen_externrefs.set(idx, obj);
return idx;
}
let cachedDataViewMemory0 = null;
function getDataViewMemory0() {
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
@@ -146,6 +180,10 @@ function getUint8ArrayMemory0() {
return cachedUint8ArrayMemory0;
}
function isLikeNone(x) {
return x === undefined || x === null;
}
function passArray8ToWasm0(arg, malloc) {
const ptr = malloc(arg.length * 1, 1) >>> 0;
getUint8ArrayMemory0().set(arg, ptr / 1);
Binary file not shown.
+1
View File
@@ -5,6 +5,7 @@ export const parse_dwg: (a: number, b: number) => [number, number, number];
export const parse_dwg_json: (a: number, b: number) => [number, number, number, number];
export const __wbindgen_malloc: (a: number, b: number) => number;
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
export const __externref_table_alloc: () => number;
export const __wbindgen_externrefs: WebAssembly.Table;
export const __externref_table_dealloc: (a: number) => void;
export const __wbindgen_free: (a: number, b: number, c: number) => void;
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* DWG parser — rust/dwg-wasm wrapper around the acadrust crate (MPL-2.0,
* vendored with a local read_mesh patch; see hmwebviewer rust/dwg-wasm). Emits
* 0.6.5 from crates.io, unmodified; see hmwebviewer rust/dwg-wasm). Emits
* the parseResult shape Viewer2D.load() consumes. Lazy-imported so the wasm is
* only fetched when a DWG is actually opened.
*