RawJock · rj-raw.wasm — RAW decoder module (LGPL-2.1) ===================================================== What this is rj-raw.wasm is the UNMODIFIED rawler library (part of dnglab, https://github.com/dnglab/dnglab), licensed under the GNU Lesser General Public License v2.1 (COPYING.LGPLv2.1 in this folder), linked with a thin glue crate that only exposes a C ABI (src/lib.rs.txt, also LGPL-2.1). It is a separate WebAssembly module that RawJock loads lazily, only when you open a RAW file, in its own worker. The rest of RawJock (MIT) talks to it ONLY through the ABI below. No patches are applied to rawler. Upstream source (exact version) Repository : https://github.com/dnglab/dnglab Crate : rawler 0.8.0 (rawler/Cargo.toml version = "0.8.0") Commit : 4d41508b88754b8e48f7edd22ef99803c1caf6c8 (main, 2026-10-17; newer than tag v0.8.0 = ae01bcb2d0f8, it adds the Canon white-level fix and X-Trans/Fuji fixes used by RawJock) Tarball : https://github.com/dnglab/dnglab/archive/4d41508b88754b8e48f7edd22ef99803c1caf6c8.tar.gz Glue crate : src/Cargo.toml.txt, src/Cargo.lock.txt (exact dependency versions), src/lib.rs.txt Build : build.txt (recipe), src/build-rj-raw.sh.txt (script) You may replace this module Build rawler (any version, with your own changes) with a glue that implements the same ABI and drop your rj-raw.wasm into this folder (keep the file name). RawJock checks rj_version() == 1. C ABI v1 (wasm32-wasip1 reactor; all pointers/sizes are i32; little-endian) Imports: wasi_snapshot_preview1.{random_get, environ_get, environ_sizes_get, clock_time_get, fd_write, proc_exit, sched_yield}. The loader (rj-raw.js, MIT) stubs them: no files, no environment, no network. Exports: memory rj_version() -> u32 ABI version, 1 rj_alloc(n) -> ptr allocate n bytes (the RAW file is streamed straight into this block) rj_free(ptr, n) free an rj_alloc block rj_decode(ptr, len) -> handle decode the RAW file; 0 on failure rj_err_ptr() / rj_err_len() UTF-8 text of the last error rj_cfa_ptr(h) / rj_cfa_len(h) sensor samples as u16, row-major, width*height*cpp values (float sensor data is scaled to u16 and white/black are scaled with it) rj_meta_ptr(h) / rj_meta_len(h) UTF-8 JSON metadata, see below rj_free_handle(h) free a decode result Metadata JSON (abi 1): {abi, make, model, cleanMake, cleanModel, width, height, cpp, bps, photometric: "cfa"|"linear"|"mono", floatSource, cfa: {name, w, h, pattern: [colour per cell; 0 R, 1 G, 2 B, 3 other]}, white: [levels], black: {w, h, cpp, levels: [...]}, wb: [r, g, b, e] (as-shot multipliers; null = unknown), activeArea: [x, y, w, h] | null, cropArea: [x, y, w, h] | null (absolute sensor px), orientation: EXIF 1–8, colorMatrix: [{illuminant: EXIF LightSource code, m: XYZ→camera 3×3 (or 4×3) row-major}]} The module does NOT develop, demosaic, write DNG or decode previews: RawJock does all of that in its own MIT code.