WebARKitLib-rs crate

[Showcase] WebARKitLib-rs โ€” A High-Performance Rust & WASM Port of ARToolkit

Hello everyone! :crab: :glasses:
I am Walter from webarkit github org!

Iโ€™m excited to share WebARKitLib-rs, a from-scratch port of the classic WebARKitLib (ARToolkit) engine to Rust.

The goal of this project is to bring battle-tested marker tracking to the modern web and native ecosystems with memory safety and SOTA performance.

:rocket: Key Features

  • Pure Rust Core: A safe, side-effect-free implementation of the ARToolkit tracking engine.
  • Blazing Fast WASM: Optimized for the web with a zero-copy memory bridge between JavaScript and Rust.
  • SIMD Accelerated: Custom WASM SIMD and SSE4.1 kernels for grayscale conversion and pattern matching, yielding up to 2.3x speedups.
  • Barcode (Matrix) Support: Full support for 3x3 to 6x6 matrix markers with BCH/Hamming error correction for robust detection.
  • Dual-Build Pipeline: We provide both Standard and SIMD-optimized WASM modules with an automated loader that picks the best one for your browser.
  • Performance Parity: Achieved ~400ยตs tracking times on standard resolutions (benchmarked against the original C implementation).

:hammer_and_wrench: Why Rust & WASM?

By porting to Rust, weโ€™ve eliminated many of the "footguns" found in legacy C codebases while gaining access to top-tier WASM performance. Whether you're building a web-based AR experience or a native Rust application, the engine is designed to be lightweight and highly portable.

:package: Get Started

The project is open-source and ready for feedback!

I'd love to hear your thoughts or see what you build with it! :clinking_beer_mugs:
P:S. I'm not a great expert of Rust. I did this port with the Help of Antigravity and Google Gemini.

What kind of problems does it solve? I understand from your post that it is intended to be fast and safer that previous implementations, but the post gives me no clue about what it is supposed to do.

Hi @threefold3 this is a project for AugmentedReality, as i written it is based on WebARKitLib (a variant of ARToolKit). With this you can create applications to detect Square Markers and Barcode Markers. As i know, but maybe i'm wrong, there aren't crates for this. Maybe i will update the initial post with more informations.

Don't know i f someone tested the code but actually the crate only export one part of the code (core). This because the structure and my partial ignorance about Rust crates. I will fix this soon refactoring the code. The project is still in an experimental phase, so apologize for this inconvenient.

For anyone interested: Very soon, we'll reach an important milestone in WebARkitLib-rs development, implementing the full KPM build in Rust. Stay tuned!