From 6e9b147bbda91737f3aa9b21bae15c126af144d8 Mon Sep 17 00:00:00 2001 From: Chris Tsang Date: Fri, 24 Jul 2026 18:09:50 +0100 Subject: [PATCH] Add WebP decoding to the Node/wasm package image-webp is pure Rust and compiles to wasm32; brings the npm package's input formats closer to the CLI/Python surface. Wasm grows ~115 KB (486 KB -> 601 KB). Also gitignore nodejs/.npmrc. Co-Authored-By: Claude Opus 4.8 (1M context) --- nodejs/.gitignore | 2 ++ nodejs/Cargo.toml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nodejs/.gitignore b/nodejs/.gitignore index ed60c86..92b2e50 100644 --- a/nodejs/.gitignore +++ b/nodejs/.gitignore @@ -2,3 +2,5 @@ /target /node_modules Cargo.lock +# npm auth token — per-project, never commit +.npmrc diff --git a/nodejs/Cargo.toml b/nodejs/Cargo.toml index efe506e..8ccb9ca 100644 --- a/nodejs/Cargo.toml +++ b/nodejs/Cargo.toml @@ -19,8 +19,8 @@ vtracer = { version = "1.0.0-alpha.1", path = "../crates/vtracer" } wasm-bindgen = "0.2" serde = { version = "1", features = ["derive"] } serde-wasm-bindgen = "0.6" -# Pure-Rust decoders that compile to wasm32-unknown-unknown. -image = { version = "0.25", default-features = false, features = ["png", "jpeg", "gif", "bmp"] } +# Pure-Rust decoders that compile to wasm32-unknown-unknown (webp via image-webp). +image = { version = "0.25", default-features = false, features = ["png", "jpeg", "gif", "bmp", "webp"] } [profile.release] opt-level = "s"