From 1431909c5c4847f73982a35002283454b74a55bc Mon Sep 17 00:00:00 2001 From: Walter Perdan Date: Fri, 26 Jun 2026 19:15:31 +0200 Subject: [PATCH 1/2] doc: update README + ARCHITECTURE for the v0.8.0 milestone - Refresh the status note: KPM/NFT is now a complete pure-Rust pipeline (native + WASM), no longer "early stage". - Bump install snippets 0.7 -> 0.8. - Add a v0.8.0 "Pure-Rust completeness, validation & polish" roadmap entry (WASM/NFT #161, pure-Rust .fset3 #179, VisualDatabase #147/#148, Gaussian pyramid SIMD/rayon #200-#207, coverage/CI hardening) and prune the now-completed short-term goals. - ARCHITECTURE: add simd-x86-avx2 to the feature table, document the freak::visual_database orchestrator and freak::gaussian_pyramid modules, and the wasm crate's NFT bindings + browser demo. Refs #161 #179 #147 #148 #177 Co-Authored-By: Claude Opus 4.8 --- ARCHITECTURE.md | 10 ++++++++++ README.md | 20 ++++++++++++-------- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 7a7f4e2..37b40ac 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -36,12 +36,14 @@ The unified core library containing all AR functionality: - `kpm::ref_data_set` — `.fset3` reference data I/O and compression modes. - `kpm::types` — KPM data structures and constants. - `kpm::freak` — FREAK descriptor math, homography, and matching utilities (pure Rust port of `WebARKitLib/lib/SRC/KPM/FreakMatcher`): + - `freak::visual_database` — top-level per-frame query orchestrator (M9-1): builds the query keyframe, then runs the two-pass pipeline (feature match → Hough voting → homography → inlier filter, then a homography-guided re-match) across stored reference keyframes. Exposes `query` / `query_from_keyframe` and facade-parity accessors on the database + `FeatureStore` slices (#147, #148). - `freak::math` — linear algebra (matrix operations, linear solvers) and Padé matrix exponential. - `freak::homography` — homography estimation and refinement pipeline. - `freak::hough` — Hough similarity voting (4D bin discretization over translation × angle × scale) for filtering matches by transformation consistency. - `freak::clustering` — K-Medoids partitioning + Binary Hierarchical Clustering (BHC) vocabulary tree for fast approximate-NN search on 96-byte FREAK descriptors. Hamming distance via 24×32-bit bit-magic. Includes a byte-identical port of C++ `vision::FastRandom` / `vision::ArrayShuffle` so the BHC tree topology matches the C++ baseline given the same seed. - `freak::matcher` — `FeatureStore` (points + flat descriptor buffer) and `FeatureMatcher` with three match variants: brute force, BHC-indexed (fast path), and homography-guided (spatial filter via 3×3 inverse + `tr` radius). All three apply the C++ ratio test (default 0.7) and filter by `FeaturePoint::maxima`. - `freak::image_pyramid` — image pyramid construction via `BoxFilterPyramid8u` (box filtering for 8-bit grayscale) and `BinomialPyramid32f` (32-bit floating-point binomial pyramid with scale-space interpolation). + - `freak::gaussian_pyramid` — Gaussian scale-space pyramid driving the DoG detector. Hot binomial-filter passes have NO-FMA SSE4.1 / AVX2 / wasm SIMD paths (runtime-detected, bit-exact against the scalar fallback for dual-mode parity) and rayon-parallelized rows (v0.8.0, #200–#207). - `freak::feature_extraction` — keypoint detection via Difference-of-Gaussians (DoG), dominant orientation assignment via circular gradient voting, and FREAK descriptor computation with native Rust implementation of the FREAK binary pattern and bit-pair comparison. - **Types** (`types`): core data structures (`ARHandle`, `ARParam`, etc.). @@ -50,6 +52,13 @@ The unified core library containing all AR functionality: WASM wrapper and JavaScript/TypeScript glue code for browser targets. Depends only on `webarkitlib-rs` (the core crate). +Since **v0.8.0 (#161)** it exposes the pure-Rust NFT pipeline to the +browser: a `WasmKpmHandle` binding for KPM detection (load reference data +from bytes, detect), `console_log` wiring via `ar_log_init_wasm()`, a dual +**standard + SIMD** build pipeline (`npm run build:wasm`), and an +end-to-end browser NFT demo under `crates/wasm/www`. The `cc`/`bindgen` +build dependencies are optional so the wasm target builds pure-Rust. + ## Feature Flags | Feature | Description | @@ -58,6 +67,7 @@ Depends only on `webarkitlib-rs` (the core crate). | `simd` | Umbrella: enables all SIMD sub-features | | `simd-wasm32` | WASM SIMD128 intrinsics | | `simd-x86-sse41` | x86 SSE4.1 intrinsics | +| `simd-x86-avx2` | x86 AVX2 intrinsics (runtime-detected; NO-FMA for bit-exact scalar parity) | | `log-helpers` | Enable logging infrastructure (installs `env_logger` for desktop/tests, `console_log` for WASM) | | `ffi-backend` | **Opt-in** — compile the C++ FreakMatcher library and generate FFI bindings. Used for cross-validation and the regression-test suite; not required for production tracking. | | `dual-mode` | Enables FFI-based parity tests that validate pure-Rust ports against the live C++ baseline (M6 math/solvers/homography, M7 BHC/matcher, PRNG). Transitively enables `ffi-backend`. Run in CI on Linux/macOS/Windows. | diff --git a/README.md b/README.md index 4a7a5db..2e08be4 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ This project aims to provide a pure-Rust implementation of the core ARToolKit algorithms, targeting both **native** systems and **WebAssembly (WASM)** for high-performance augmented reality in the browser. > [!NOTE] -> This project is currently a **Work in Progress**. Core marker detection and pose estimation are functional. KPM/NFT (Natural Feature Tracking) is in an early stage with partial Rust porting -- a fully idiomatic Rust KPM pipeline with a working example is the primary goal for v1.0.0. +> Core marker detection and pose estimation are functional, and as of **v0.8.0** the **KPM/NFT (Natural Feature Tracking) pipeline is fully ported to pure Rust** — end-to-end keypoint matching, marker generation (`.iset`/`.fset`/`.fset3`), and runtime tracking all run with **no C++ toolchain**, natively and in the browser via WebAssembly. The project remains a **Work in Progress** toward v1.0.0 (broader API docs, multi-marker support, and a dedicated KPM benchmark are the remaining focus areas). ## 🌟 Key Features @@ -40,7 +40,7 @@ Add `webarkitlib-rs` to your `Cargo.toml`: ```toml [dependencies] -webarkitlib-rs = "0.7" +webarkitlib-rs = "0.8" ``` ### Pure Rust tracking (no C++ compiler required) @@ -66,7 +66,7 @@ need to do anything special: ```toml [dependencies] -webarkitlib-rs = "0.7" # default backend is pure Rust +webarkitlib-rs = "0.8" # default backend is pure Rust ``` ```bash @@ -83,7 +83,7 @@ NFT tracking**: ```toml [dependencies] -webarkitlib-rs = { version = "0.7", features = ["ffi-backend"] } +webarkitlib-rs = { version = "0.8", features = ["ffi-backend"] } ``` > When installing from crates.io, no extra setup is required — the C++ @@ -248,7 +248,7 @@ Enable the `log-helpers` feature and call the bundled initializer once in your b ```toml [dependencies] -webarkitlib-rs = { version = "0.7", features = ["log-helpers"] } +webarkitlib-rs = { version = "0.8", features = ["log-helpers"] } ``` ```rust @@ -429,12 +429,16 @@ The workspace contains two crates: - Cross-platform / cross-stack matcher determinism — Rust `HashMap` → `BTreeMap` and upstream C++ `unordered_map` → `std::map` ([WebARKitLib#39](https://github.com/webarkit/WebARKitLib/pull/39)). - Hand-annotated absolute corner-error regression gate (browser-based annotation tool + 5 fixtures + Linux CI gate). Finding: pure-Rust backend is more accurate than C++ on `pinball-demo` (5.27 px vs 18.79 px max corner error). - Cross-stack parity gate against `@webarkit/jsartoolkit-nft@1.10.0` ([jsartoolkitNFT#584](https://github.com/webarkit/jsartoolkitNFT/pull/584)) — guarantees native Rust pose matches what production WASM consumers see. +- **v0.8.0 — Pure-Rust completeness, validation & polish**: Closed out the remaining gaps on top of M9: + - **Full WASM/NFT support** ([#161](https://github.com/webarkit/WebARKitLib-rs/issues/161)): `WasmKpmHandle` KPM-detection bindings, `console_log` wiring, clean dual (standard + SIMD) wasm builds, and an end-to-end **browser NFT demo** of the pure-Rust pipeline. + - **Pure-Rust `.fset3` marker generation** ([#179](https://github.com/webarkit/WebARKitLib-rs/issues/179)): `nft_marker_gen` now produces `.iset` + `.fset` + `.fset3` entirely via `RustFreakMatcher` — the `ffi-backend` is no longer needed for marker creation. + - **`VisualDatabase` ergonomics** ([#147](https://github.com/webarkit/WebARKitLib-rs/issues/147), [#148](https://github.com/webarkit/WebARKitLib-rs/issues/148)): factored the per-frame query loop, added `query_from_keyframe`, and facade-parity accessors on `VisualDatabase` + `FeatureStore` slices. + - **Gaussian scale-space pyramid performance** ([#200](https://github.com/webarkit/WebARKitLib-rs/issues/200)/[#201](https://github.com/webarkit/WebARKitLib-rs/issues/201)/[#207](https://github.com/webarkit/WebARKitLib-rs/issues/207)): criterion benchmark, NO-FMA SSE4.1/AVX2/wasm SIMD binomial filter with bit-exact scalar parity, and rayon-parallelized filter passes. + - **Validation & CI hardening**: raised M9 patch coverage ≥90% ([#177](https://github.com/webarkit/WebARKitLib-rs/issues/177)), Miri UB gate ([#182](https://github.com/webarkit/WebARKitLib-rs/issues/182)), strict `--all-targets --all-features` clippy gate ([#180](https://github.com/webarkit/WebARKitLib-rs/issues/180)), benchmark download hardening ([#204](https://github.com/webarkit/WebARKitLib-rs/issues/204)), and macOS/Windows build + cache fixes ([#134](https://github.com/webarkit/WebARKitLib-rs/issues/134), [#119](https://github.com/webarkit/WebARKitLib-rs/issues/119)). ### 🎯 Short-term Goals (toward v1.0.0) - **KPM-specific benchmark** ([deferred from #142](https://github.com/webarkit/WebARKitLib-rs/issues/142)): Add a dedicated `kpm_bench.rs` Criterion bench so we can verify the pure-Rust backend stays within 20% of C++ on `pinball-demo`. The existing `marker_bench` only measures barcode marker detection. -- **WASM browser examples for KPM/NFT** ([#161](https://github.com/webarkit/WebARKitLib-rs/issues/161)): End-to-end runnable browser demo of the pure-Rust NFT pipeline. -- **Raise M9 patch coverage** ([#177](https://github.com/webarkit/WebARKitLib-rs/issues/177)): Lift M9 modules from 84.76% → ≥90% patch coverage with no file under 85%. -- **Dependency upgrades**: Criterion 0.5 → 0.8 ([#174](https://github.com/webarkit/WebARKitLib-rs/issues/174)). +- **Live-camera WASM demo + pose parity** ([#215](https://github.com/webarkit/WebARKitLib-rs/issues/215)): Extend the browser NFT demo with a live camera feed and jsartoolkitNFT pose parity. - **Enhanced Documentation**: Expand API reference with complete module-level docs, integration walkthroughs for JS/TS, and detailed usage examples. - **WASM Memory Management**: Improve resource cleanup when switching engines or markers in long-running browser sessions. From edf421c48a8e067c02d27141352201d09b0ca2e2 Mon Sep 17 00:00:00 2001 From: Walter Perdan Date: Fri, 26 Jun 2026 20:19:32 +0200 Subject: [PATCH 2/2] chore(release): v0.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bump the workspace and npm package versions 0.7.0 -> 0.8.0, regenerate the wasm pkg (standard + SIMD), and prepend the 0.8.0 changelog section (git-cliff) for the "Pure-Rust completeness, validation & polish" milestone. Release prep per MAINTAINERS.md §2. The dev->main merge and the v0.8.0 tag (which triggers the crates.io + npm publish) are done separately. Co-Authored-By: Claude Opus 4.8 --- CHANGELOG.md | 72 +++++++++++++++++++++++++++++++++++- Cargo.toml | 2 +- crates/wasm/pkg/README.md | 58 +++++++++++++---------------- crates/wasm/pkg/package.json | 2 +- package.json | 2 +- 5 files changed, 99 insertions(+), 37 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7756c7e..5f07f4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,76 @@ -# Changelog - webarkit/webarkitlib-rs +# Changelog - webarkit/webarkitlib-rs All notable changes to this project will be documented in this file. -## [0.7.0] - 2026-06-05 +## [0.8.0] - 2026-06-26 + +## Milestone — Pure-Rust completeness, validation & polish + +### ⚙️ Miscellaneous Tasks + +- *(ar2)* Allow too_many_arguments on SIMD get_similarity variants (#180) +- Clear strict clippy lints in examples/tests/benches (#180) +- *(codecov)* Exclude examples/benches from coverage targets (#180) +- *(coverage)* Fix tarpaulin tests/ glob and mirror in codecov (#180) +- Tighten clippy gate to --all-targets --all-features (#180) +- Relocate strict clippy gate to kpm-build (ubuntu) job (#180) +- *(miri)* Add Miri UB validation for pure-Rust code paths (#182) +- *(miri)* Drop -Zmiri-strict-provenance (trips on third-party deps) (#182) +- *(miri)* Switch to Tree Borrows to avoid crossbeam-epoch false positive (#182) +- *(miri)* Enable -Zmiri-disable-isolation for tempfile-using tests (#182) +- *(miri)* Enable -Zmiri-ignore-leaks for rayon thread pool (#194) +- *(miri)* Promote to required gate, split workflow, add README badge (#182) +- *(miri)* Skip docs-only changes via paths-ignore + same-name shim +- *(benchmarks)* Harden against flaky external C-library downloads (#204) + +### ⚡ Performance + +- *(ci)* Scope Miri job to unsafe boundaries via cfg_attr(miri, ignore) (#194) +- *(ci)* Annotate remaining real-image tests (#194 follow-up) +- *(kpm)* Gaussian scale-space pyramid — benchmark + rayon parallelization (#209) +- *(kpm)* Box-filter Pyramid downsample — criterion benchmark + SIMD (#211) + +### 🐛 Bug Fixes + +- *(core)* Clean up trivial clippy lints under --all-targets --all-features (#180) +- *(kpm)* Tighten dual-mode FFI extern cfg to match caller cfg (#180) +- *(kpm)* Replace unaligned transmute in hamming_distance_96 (#192) +- *(ci)* Disable cargo-bin cache on kpm-build to stop stale rustup-init shim (#134) + +### 💼 Other + +- *(wasm)* Make cc/bindgen optional, fix wasm dead-code (#161 goal 1) + +### 📚 Documentation + +- *(benches)* Refresh BENCHMARKS.md for criterion 0.8 +- *(agents)* Codify #180 clippy conventions and un-ignore .agents/ +- *(kpm)* Mark box-filter Pyramid as kept-but-unused reference (#203) +- *(wasm)* Note .fset3 / KPM detection in the NFT demo description (#161) +- Update README + ARCHITECTURE for the v0.8.0 milestone + +### 🕸️ WebAssembly & Emscripten + +- *(wasm)* Wire console logger + clean SIMD wasm build; add .fset3 asset (#161 goals 2,3) +- *(wasm)* KPM detection binding + browser NFT demo (#161 goal 4) + +### 🚀 Features + +- *(kpm)* Facade-parity convenience accessors on VisualDatabase + FeatureStore slices (#148) +- *(example)* Nft_marker_gen .fset3 via RustFreakMatcher — drop ffi-backend (#179) + +### 🚜 Refactor + +- *(ar)* Convert Default::default() + field reassign to struct-init (#180) +- *(kpm)* Factor VisualDatabase::query matching loop + add query_from_keyframe (#147) (#217) + +### 🧪 Testing + +- *(core)* Add unit tests for relocated math/pattern helpers (#180) +- *(homography)* Widen cauchy_cost tolerance to 1e-5 for Miri (#194) +- *(kpm)* Raise M9 coverage — exclude examples + edge tests (#177) (#218) +- *(ci)* Verify ffi-backend tests + example link on macOS (#119) +## [0.7.0] - 2026-06-05 ## Milestone 9 — VisualDatabase & pure Rust backend diff --git a/Cargo.toml b/Cargo.toml index c00e669..3f4caa2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ exclude = [ resolver = "2" [workspace.package] -version = "0.7.0" +version = "0.8.0" authors = ["kalwalt "] edition = "2021" description = "A high-performance, memory-safe Rust port of WebARKitLib (ARToolKit) for native and WASM." diff --git a/crates/wasm/pkg/README.md b/crates/wasm/pkg/README.md index 7684391..2e08be4 100644 --- a/crates/wasm/pkg/README.md +++ b/crates/wasm/pkg/README.md @@ -3,6 +3,7 @@ ![WebARKitLib-rs](./assets/WebARKitLib-Rust-banner.jpg) [![CI](https://github.com/webarkit/WebARKitLib-rs/actions/workflows/ci.yml/badge.svg)](https://github.com/webarkit/WebARKitLib-rs/actions/workflows/ci.yml) +[![Miri](https://github.com/webarkit/WebARKitLib-rs/actions/workflows/miri.yml/badge.svg)](https://github.com/webarkit/WebARKitLib-rs/actions/workflows/miri.yml) [![codecov](https://codecov.io/gh/webarkit/WebARKitLib-rs/branch/main/graph/badge.svg)](https://codecov.io/gh/webarkit/WebARKitLib-rs) [![Crates.io](https://img.shields.io/crates/v/webarkitlib-rs.svg)](https://crates.io/crates/webarkitlib-rs) [![npm](https://img.shields.io/npm/v/@webarkit/webarkitlib-wasm.svg)](https://www.npmjs.com/package/@webarkit/webarkitlib-wasm) @@ -13,7 +14,7 @@ This project aims to provide a pure-Rust implementation of the core ARToolKit algorithms, targeting both **native** systems and **WebAssembly (WASM)** for high-performance augmented reality in the browser. > [!NOTE] -> This project is currently a **Work in Progress**. Core marker detection and pose estimation are functional. KPM/NFT (Natural Feature Tracking) is in an early stage with partial Rust porting -- a fully idiomatic Rust KPM pipeline with a working example is the primary goal for v1.0.0. +> Core marker detection and pose estimation are functional, and as of **v0.8.0** the **KPM/NFT (Natural Feature Tracking) pipeline is fully ported to pure Rust** — end-to-end keypoint matching, marker generation (`.iset`/`.fset`/`.fset3`), and runtime tracking all run with **no C++ toolchain**, natively and in the browser via WebAssembly. The project remains a **Work in Progress** toward v1.0.0 (broader API docs, multi-marker support, and a dedicated KPM benchmark are the remaining focus areas). ## 🌟 Key Features @@ -39,7 +40,7 @@ Add `webarkitlib-rs` to your `Cargo.toml`: ```toml [dependencies] -webarkitlib-rs = "0.7" +webarkitlib-rs = "0.8" ``` ### Pure Rust tracking (no C++ compiler required) @@ -65,7 +66,7 @@ need to do anything special: ```toml [dependencies] -webarkitlib-rs = "0.7" # default backend is pure Rust +webarkitlib-rs = "0.8" # default backend is pure Rust ``` ```bash @@ -82,7 +83,7 @@ NFT tracking**: ```toml [dependencies] -webarkitlib-rs = { version = "0.7", features = ["ffi-backend"] } +webarkitlib-rs = { version = "0.8", features = ["ffi-backend"] } ``` > When installing from crates.io, no extra setup is required — the C++ @@ -122,42 +123,33 @@ This example loads a camera parameter file, a marker (pattern or barcode), and a Generate NFT (Natural Feature Tracking) marker files compatible with ARnft and NFT-Marker-Creator-App: ```bash -# Pure-Rust default (no C++ toolchain required) — produces .iset + .fset. -# Pass --yes to skip the interactive "no .fset3" confirmation prompt -# (recommended for scripted / CI use): +# Pure Rust, no C++ toolchain — produces a COMPLETE marker (.iset + .fset + .fset3): cargo run --release --example nft_marker_gen -- \ - --input path/to/image.jpg \ - --output path/to/output_name \ - --dpi 220 \ - --yes - -# Full output including .fset3 (FREAK descriptors) — opt-in C++ backend: -# .fset3 generation still uses CppFreakMatcher today; the runtime KPM -# tracker reads .fset3 files in pure Rust, only the marker-creation step -# needs the C++ FREAK extractor. Wiring nft_marker_gen to RustFreakMatcher -# for .fset3 is a follow-up task. -cargo run --release --features ffi-backend --example nft_marker_gen -- \ --input path/to/image.jpg \ --output path/to/output_name \ --dpi 220 # With SIMD acceleration + Rayon parallelism (recommended for x86_64): -cargo run --release --features "ffi-backend,simd-x86-sse41,simd-x86-avx2" \ +cargo run --release --features "simd-x86-sse41,simd-x86-avx2" \ --example nft_marker_gen -- \ --input path/to/image.jpg \ --output path/to/output_name \ --dpi 220 ``` +> Since #179, `.fset3` (FREAK descriptors) is generated by the pure-Rust +> `RustFreakMatcher` — a single invocation produces a complete marker with no +> C++ toolchain. + > **Important:** Always use the `--release` flag. Debug builds are 5–10× slower due to missing compiler optimizations. -Output files (depends on whether `ffi-backend` is enabled): +Output files (all produced on the pure-Rust default): -| File | Default (pure Rust) | With `ffi-backend` | Description | -|---|:---:|:---:|---| -| `.iset` | ✅ | ✅ | JPEG-compressed image pyramid (~300 KB, matches C++ `ar2WriteImageSet()` format) | -| `.fset` | ✅ | ✅ | Feature map with one entry per pyramid level | -| `.fset3` | ❌ (skipped, with warning) | ✅ | FREAK descriptors for KPM-based recognition | +| File | Description | +|---|---| +| `.iset` | JPEG-compressed image pyramid (~300 KB, matches C++ `ar2WriteImageSet()` format) | +| `.fset` | Feature map with one entry per pyramid level | +| `.fset3` | FREAK descriptors for KPM-based recognition (pure-Rust `RustFreakMatcher`) | **Options:** @@ -167,14 +159,12 @@ Output files (depends on whether `ffi-backend` is enabled): | `-o` | `--output` | Output base path (without extension) | required | | `-d` | `--dpi` | Source image resolution in DPI | required | | `-l` | `--level` | Tracking extraction level (0–4) | `2` | -| `-n` | `--search-feature-num` | Max features per pyramid level | `250` | -| `-y` | `--yes` | Skip the "no .fset3" confirmation prompt (for scripted / CI use; only relevant when built without `ffi-backend`) | (interactive) | **Performance feature flags:** | Feature flag | What it enables | |---|---| -| `ffi-backend` | C++ FREAK backend (opt-in since M9-3 #142). Enables `.fset3` generation in `nft_marker_gen` (the `.iset`/`.fset` outputs work on the pure-Rust default) and powers development cross-validation (`dual-mode`, `cross_stack_parity`). Runtime NFT tracking with existing `.fset3` files works on the pure-Rust default. | +| `ffi-backend` | C++ FREAK backend (opt-in since M9-3 #142). Used only for development cross-validation (`dual-mode`, `cross_stack_parity`); all of `nft_marker_gen` (`.iset` + `.fset` + `.fset3`) and runtime NFT tracking run on the pure-Rust default. | | `simd-x86-sse41` | SSE4.1 SIMD acceleration for feature map correlation (`get_similarity`) | | `simd-x86-avx2` | AVX2+FMA SIMD acceleration for feature map correlation (faster than SSE4.1) | | `simd` | Umbrella flag — enables all SIMD optimizations (SSE4.1, AVX2, WASM SIMD, image, pattern) | @@ -258,7 +248,7 @@ Enable the `log-helpers` feature and call the bundled initializer once in your b ```toml [dependencies] -webarkitlib-rs = { version = "0.7", features = ["log-helpers"] } +webarkitlib-rs = { version = "0.8", features = ["log-helpers"] } ``` ```rust @@ -439,12 +429,16 @@ The workspace contains two crates: - Cross-platform / cross-stack matcher determinism — Rust `HashMap` → `BTreeMap` and upstream C++ `unordered_map` → `std::map` ([WebARKitLib#39](https://github.com/webarkit/WebARKitLib/pull/39)). - Hand-annotated absolute corner-error regression gate (browser-based annotation tool + 5 fixtures + Linux CI gate). Finding: pure-Rust backend is more accurate than C++ on `pinball-demo` (5.27 px vs 18.79 px max corner error). - Cross-stack parity gate against `@webarkit/jsartoolkit-nft@1.10.0` ([jsartoolkitNFT#584](https://github.com/webarkit/jsartoolkitNFT/pull/584)) — guarantees native Rust pose matches what production WASM consumers see. +- **v0.8.0 — Pure-Rust completeness, validation & polish**: Closed out the remaining gaps on top of M9: + - **Full WASM/NFT support** ([#161](https://github.com/webarkit/WebARKitLib-rs/issues/161)): `WasmKpmHandle` KPM-detection bindings, `console_log` wiring, clean dual (standard + SIMD) wasm builds, and an end-to-end **browser NFT demo** of the pure-Rust pipeline. + - **Pure-Rust `.fset3` marker generation** ([#179](https://github.com/webarkit/WebARKitLib-rs/issues/179)): `nft_marker_gen` now produces `.iset` + `.fset` + `.fset3` entirely via `RustFreakMatcher` — the `ffi-backend` is no longer needed for marker creation. + - **`VisualDatabase` ergonomics** ([#147](https://github.com/webarkit/WebARKitLib-rs/issues/147), [#148](https://github.com/webarkit/WebARKitLib-rs/issues/148)): factored the per-frame query loop, added `query_from_keyframe`, and facade-parity accessors on `VisualDatabase` + `FeatureStore` slices. + - **Gaussian scale-space pyramid performance** ([#200](https://github.com/webarkit/WebARKitLib-rs/issues/200)/[#201](https://github.com/webarkit/WebARKitLib-rs/issues/201)/[#207](https://github.com/webarkit/WebARKitLib-rs/issues/207)): criterion benchmark, NO-FMA SSE4.1/AVX2/wasm SIMD binomial filter with bit-exact scalar parity, and rayon-parallelized filter passes. + - **Validation & CI hardening**: raised M9 patch coverage ≥90% ([#177](https://github.com/webarkit/WebARKitLib-rs/issues/177)), Miri UB gate ([#182](https://github.com/webarkit/WebARKitLib-rs/issues/182)), strict `--all-targets --all-features` clippy gate ([#180](https://github.com/webarkit/WebARKitLib-rs/issues/180)), benchmark download hardening ([#204](https://github.com/webarkit/WebARKitLib-rs/issues/204)), and macOS/Windows build + cache fixes ([#134](https://github.com/webarkit/WebARKitLib-rs/issues/134), [#119](https://github.com/webarkit/WebARKitLib-rs/issues/119)). ### 🎯 Short-term Goals (toward v1.0.0) - **KPM-specific benchmark** ([deferred from #142](https://github.com/webarkit/WebARKitLib-rs/issues/142)): Add a dedicated `kpm_bench.rs` Criterion bench so we can verify the pure-Rust backend stays within 20% of C++ on `pinball-demo`. The existing `marker_bench` only measures barcode marker detection. -- **WASM browser examples for KPM/NFT** ([#161](https://github.com/webarkit/WebARKitLib-rs/issues/161)): End-to-end runnable browser demo of the pure-Rust NFT pipeline. -- **Raise M9 patch coverage** ([#177](https://github.com/webarkit/WebARKitLib-rs/issues/177)): Lift M9 modules from 84.76% → ≥90% patch coverage with no file under 85%. -- **Dependency upgrades**: Criterion 0.5 → 0.8 ([#174](https://github.com/webarkit/WebARKitLib-rs/issues/174)). +- **Live-camera WASM demo + pose parity** ([#215](https://github.com/webarkit/WebARKitLib-rs/issues/215)): Extend the browser NFT demo with a live camera feed and jsartoolkitNFT pose parity. - **Enhanced Documentation**: Expand API reference with complete module-level docs, integration walkthroughs for JS/TS, and detailed usage examples. - **WASM Memory Management**: Improve resource cleanup when switching engines or markers in long-running browser sessions. diff --git a/crates/wasm/pkg/package.json b/crates/wasm/pkg/package.json index e3d4ed7..3bef609 100644 --- a/crates/wasm/pkg/package.json +++ b/crates/wasm/pkg/package.json @@ -5,7 +5,7 @@ "kalwalt \u003cgithub@kalwaltart.it\u003e" ], "description": "A high-performance, memory-safe Rust port of WebARKitLib (ARToolKit) for native and WASM.", - "version": "0.7.0", + "version": "0.8.0", "license": "LGPL-3.0-or-later", "repository": { "type": "git", diff --git a/package.json b/package.json index abf75af..f520df7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webarkitlib-rs", - "version": "0.7.0", + "version": "0.8.0", "description": "Port of WebARKitLib (ARToolKit) to Rust and WASM", "private": true, "scripts": {