https://github.com/webarkit/webarkit-nft-forge-rs
A Rust NFT marker generator for WebARKit and all WebAR
https://github.com/webarkit/webarkit-nft-forge-rs
artoolkit nft webar webarkit webarkitlibrs
Last synced: 4 days ago
JSON representation
A Rust NFT marker generator for WebARKit and all WebAR
- Host: GitHub
- URL: https://github.com/webarkit/webarkit-nft-forge-rs
- Owner: webarkit
- Created: 2026-04-22T17:06:48.000Z (2 months ago)
- Default Branch: master
- Last Pushed: 2026-06-14T10:54:43.000Z (13 days ago)
- Last Synced: 2026-06-14T12:23:51.263Z (13 days ago)
- Topics: artoolkit, nft, webar, webarkit, webarkitlibrs
- Language: Rust
- Homepage:
- Size: 2.75 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# đ ī¸ WebARKit NFT Forge - Rust Edition
This project is a **pure Rust implementation** (with optional legacy C++ FFI fallback) of a high-performance **NFT Marker Creator** for WebARKit. It provides powerful tools to generate Natural Feature Tracking (NFT) markers that can be used in augmented reality applications.
⨠**Key Features:**
- **Universal Compatibility**: Generates NFT markers from images and exports them in a format compatible with a wide range of AR frameworks based on **WebARKitLib**, **ARtoolKit5**, and **ARToolKitX** (including *ARnft*, *JsartoolkitNFT*, *Jsartoolkit5*, and *AR.js*).
- **Core Reliability**: Built on top of the robust [`webarkitlib-rs`](https://github.com/webarkit/WebARKitLib-rs) crate for reliable core marker generation functionality.
- **Friendly GUI**: Includes an intuitive graphical interface built with `eframe` and `egui_extras` for user-friendly interaction.
- **Cross-Platform**: Designed to run seamlessly on **Windows**, **macOS**, and **Linux**.
đ The package now ships both as:
- đĨī¸ A standalone **desktop application binary**
- đĻ A **reusable Rust library**
## đ Prerequisites
By default, the project compiles and runs in **pure Rust** and only requires:
- đĻ **Rust**: Latest stable version.
If you explicitly want to use the legacy C++ backend (via the `ffi-backend` feature), you will also need:
- âī¸ **C++ Toolchain**: A C++17 compatible compiler (MSVC on Windows, Clang/GCC on macOS/Linux).
- đ ī¸ **CMake**: Required for building the FFI bindings.
## đģ Installation
### đ¨ Build instructions
1. Clone the repository:
```bash
git clone https://github.com/webarkit/webarkit-nft-forge-rs.git
cd webarkit-nft-forge-rs
```
2. Build the project using Cargo. By default, this builds the **pure Rust** KPM feature extractor:
```bash
cargo build --release
```
*Legacy FFI Backend:* If you wish to build with the C++ FFI backend instead:
```bash
cargo build --release --features ffi-backend
```
*Optional features:* You can also enable SIMD optimizations and logging helpers:
```bash
cargo build --release --features simd,log-helpers
```
3. Run the application:
```bash
cargo run --release
```
Or with the legacy FFI backend:
```bash
cargo run --release --features ffi-backend
```
## đšī¸ Usage
### đŧī¸ GUI Application
The application provides a user-friendly interface for generating NFT markers:
1. đŧī¸ **Select Image**: Click "đ Select Image" to choose a source JPG or PNG file.
2. đ **Output Directory**: Optionally select where to save the markers. Defaults to the current directory.
3. đˇī¸ **Marker Name**: Provide a semantic name for your marker files.
4. đī¸ **DPI Setting**: Use the slider to set the source image DPI (default 72, range 72-600).
5. đ **Generate**: Click "đ Generate Marker". The process runs in the background, and you can monitor progress via the status bar.
The tool generates three files per marker:
- đ `.iset`: Image set metadata.
- đ `.fset`: Feature set data.
- đ§Š `.fset3`: KPM/FREAK feature data (required for NFT).
### đ Library
You can also use the core functionality as a library in your own Rust projects:
```rust
use std::sync::Arc;
use std::sync::atomic::AtomicU32;
use webarkit_nft_forge_rs::generate_nft_marker;
fn main() -> Result<(), Box> {
let image_data = std::fs::read("input.jpg")?;
let output_dir = std::path::Path::new("./output");
let progress = Arc::new(AtomicU32::new(0));
generate_nft_marker(
&image_data,
1920, 1080, 3, // width, height, channels
output_dir,
"my_marker",
72.0, // DPI
Some(progress)
)?;
Ok(())
}
```
## âī¸ License
This project is licensed under the [LGPL-3.0-or-later](LICENSE).