Skip to content

feat(example): nft_marker_gen .fset3 via RustFreakMatcher — drop ffi-backend (#179)#219

Merged
kalwalt merged 1 commit into
devfrom
feat/nft-marker-gen-rust-fset3-179
Jun 26, 2026
Merged

feat(example): nft_marker_gen .fset3 via RustFreakMatcher — drop ffi-backend (#179)#219
kalwalt merged 1 commit into
devfrom
feat/nft-marker-gen-rust-fset3-179

Conversation

@kalwalt

@kalwalt kalwalt commented Jun 24, 2026

Copy link
Copy Markdown
Member

Summary

nft_marker_gen now produces a complete NFT marker (.iset + .fset + .fset3) in a single pure-Rust invocation — no C++ toolchain. This removes the last user-facing dependence on ffi-backend.

Closes #179. (v0.8.0 milestone close-out, 4/4 — the final one.)

Changes

  • Swap the .fset3 step from CppFreakMatcherRustFreakMatcher. KpmRefDataSet::generate is backend-agnostic (&mut dyn FreakMatcherBackend), so it's a drop-in.
  • Drop the #[cfg(feature = "ffi-backend")] gates on the .fset3 block + KPM_SURF_FEATURE_DENSITY.
  • Remove the now-pointless --yes flag and the "no .fset3" warning/confirmation prompt.
  • Update the example header docs + README to the single-invocation workflow (collapse the old two-invocation pattern, drop --yes).

Parity validation

Per the agreed policy (accept a documented tolerance if the downstream pose holds):

  • Pure-Rust generated a complete marker for pinball-893x1117-120dpi.jpg.fset3 667 KB vs the C++ path's 625 KB (comparable, not byte-identical: slightly more features).
  • Downstream round-trip: feeding the Rust-generated .fset3 into simple_nft detection yields a KPM match — page 0, error 6.05 vs the C++-marker baseline 5.09. The marker detects correctly.
  • Rust↔C++ FREAK-extraction parity is additionally CI-gated by cross_stack_parity (pose drift vs C++/JS) and dual-mode (descriptor comparison) — the same RustFreakMatcher.extract that generate() calls.

Verification

  • cargo build --example nft_marker_gen --features log-helpers clean
  • cargo clippy --all-targets --all-features -- -D warnings clean

🤖 Generated with Claude Code

…backend (#179)

`nft_marker_gen` now produces a COMPLETE NFT marker (.iset + .fset + .fset3)
in a single pure-Rust invocation, with no C++ toolchain. This removes the
last user-facing dependence on `ffi-backend`.

- Swap the `.fset3` step from `CppFreakMatcher` to `RustFreakMatcher`
  (`KpmRefDataSet::generate` is backend-agnostic — `&mut dyn
  FreakMatcherBackend`). Drop the `#[cfg(feature = "ffi-backend")]` gates on
  the `.fset3` block and the `KPM_SURF_FEATURE_DENSITY` const.
- Remove the now-pointless `--yes` flag and the "no .fset3" warning/prompt.
- Update the example header docs and README to the single-invocation workflow.

Parity (per the agreed policy — accept tolerance if downstream pose holds):
the pure-Rust path generated a complete marker for
pinball-893x1117-120dpi.jpg (.fset3 667 KB vs the C++ 625 KB — comparable,
not byte-identical). Downstream round-trip: feeding the Rust-generated .fset3
into simple_nft detection yields a KPM match (page 0, error 6.05 vs the C++
baseline 5.09) — the marker works. Rust↔C++ FREAK extraction parity is
additionally CI-gated by `cross_stack_parity` (pose) and `dual-mode`.

Closes #179.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kalwalt kalwalt moved this from Backlog to In review in Plan to port KPM to rust Jun 26, 2026
@kalwalt kalwalt self-assigned this Jun 26, 2026
@kalwalt kalwalt merged commit f756e15 into dev Jun 26, 2026
22 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in Plan to port KPM to rust Jun 26, 2026
@kalwalt kalwalt deleted the feat/nft-marker-gen-rust-fset3-179 branch June 28, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant