Skip to content

Commit cf6a50e

Browse files
committed
Merge branch 'dev'
2 parents b9051d2 + 5c82982 commit cf6a50e

40 files changed

Lines changed: 4751 additions & 1487 deletions

.claude/issue-86-design.md

Lines changed: 567 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ jobs:
2727
- name: Run cargo fmt check
2828
run: cargo fmt --all -- --check
2929

30+
- name: Run cargo clippy
31+
run: cargo clippy --workspace -- -D warnings
32+
3033
- name: Run cargo check
3134
run: cargo check --workspace
3235
- name: Run cargo test
@@ -112,7 +115,7 @@ jobs:
112115

113116
- name: Run native simple example
114117
working-directory: crates/core
115-
run: cargo run --example simple
118+
run: cargo run --example simple --features log-helpers
116119

117120
benchmarks:
118121
runs-on: ubuntu-latest
@@ -123,7 +126,7 @@ jobs:
123126

124127
- name: Generate hiro.raw for C benchmark
125128
working-directory: crates/core
126-
run: cargo run --example simple -- ../../benchmarks/data/camera_para.dat ../../benchmarks/data/patt.hiro ../../benchmarks/data/img.jpg
129+
run: cargo run --example simple --features log-helpers -- ../../benchmarks/data/camera_para.dat ../../benchmarks/data/patt.hiro ../../benchmarks/data/img.jpg
127130

128131
- name: Run benchmarks
129132
run: |

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ crates/wasm/pkg/
3434
!crates/wasm/pkg/LICENSE
3535
!crates/wasm/pkg/README.md
3636
!crates/wasm/pkg/package.json
37+
.DS_Store

CHANGELOG.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,61 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [0.3.8] - 2026-05-04
6+
7+
### Last action before `Milestone 6 — Math & homography in pure Rust`
8+
9+
### ⚙️ Miscellaneous Tasks
10+
11+
- Pass --features log-helpers when running simple example
12+
- Remove accidental .DS_Store from repo changes
13+
- Convert println!/eprintln! to arlog_*! in examples and bench
14+
15+
### 🎨 Styling
16+
17+
- Apply cargo fmt --all (fixes CI fmt check)
18+
- *(core)* Fix formatting issues
19+
- *(marker)* Apply cargo fmt
20+
- *(diagnostic)* Apply stable rustfmt wrapping (#104 CI)
21+
22+
### 🐛 Bug Fixes
23+
24+
- *(clippy)* Clear all warnings and add clippy -D warnings to CI
25+
- *(clippy)* Fix 5 CI-only clippy warnings (explicit_counter_loop, manual_checked_ops)
26+
- *(marker)* Populate cf_patt/id_patt and copy to final id/cf per mode
27+
- *(core)* Port confidence_cutoff from C and add regression tests (issue #92)
28+
- *(marker)* Wire cutoff_phase from MatchOk/MatchError result codes (#88)
29+
- *(marker)* Resolve merge conflict in cutoff_phase tests
30+
- *(simple,marker)* Honour the buff/pixel_format contract (#103)
31+
32+
### 📚 Documentation
33+
34+
- *(issue-86)* Add implementation plan
35+
- Update CLAUDE.md with documentation and style guidelines
36+
- *(issue-103)* Correct findings — Rust/C cf close but not byte-equal
37+
38+
### 🚀 Features
39+
40+
- *(marker)* Add finalize_marker_id_cf_dir helper
41+
- *(types)* Add MatchOk, MatchError, From<MatchError> for ARMarkerInfoCutoffPhase
42+
- *(core)* Add ar_detect_marker orchestrator for full marker detection pipeline
43+
- *(types)* Add AR tracking history mode constants (#101)
44+
- *(marker)* Port arDetectMarker tracking history pipeline (#96)
45+
- *(diagnostic)* Add dump_patt + diff_patt for issue #103
46+
47+
### 🚜 Refactor
48+
49+
- *(core)* Move AR modules into ar/ subfolder (closes #82)
50+
- *(types)* Defer MatchOk.global_id field to issue #89
51+
- *(pattern)* Pattern_match returns Result<MatchOk, MatchError>
52+
- *(matrix)* Ar_matrix_code_get_id returns Result<MatchOk, MatchError>
53+
54+
### 🧪 Testing
55+
56+
- *(marker)* Add failing tests for finalize_marker_id_cf_dir helper
57+
- *(marker)* Add confidence_cutoff edge case and mode-specific unit tests (#96)
58+
- *(marker)* Extract history phases as helpers and add 12 unit tests (#96)
59+
560
## [0.3.7] - 2026-04-23
661

762
### 🐛 Bug Fixes

CLAUDE.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,30 @@ Stage 3 in `crates/core/src/ar2/feature_map.rs`.
158158
- [ ] No `println!` / `eprintln!` added in library code
159159
- [ ] CHANGELOG.md **not** touched
160160
- [ ] Branch is off current `dev`
161+
162+
## 📝 Documentation & Style
163+
- All comments, docstrings, and commit messages must be in **English**.
164+
- Use `Result<T, PureCvError>` for error handling instead of `panic!`.
165+
- Create tests for every functions / type and benchmarks if possible.
166+
- Add HEADER.txt to every new file you create. You found it in `.claude\HEADER.txt`.
167+
168+
> **CI will reject any PR that fails `cargo fmt -- --check` or `cargo clippy`.**
169+
170+
## 🐙 Github Instructions & Conventional Commits
171+
- When creating a PR always start from the `dev` branch and point against `dev` branch.
172+
- **MANDATORY:** You must use the [Conventional Commits](https://www.conventionalcommits.org/) specification for all commit messages. This is strictly required for our automated `git-cliff` changelog generation.
173+
- **Format:** `<type>(<optional scope>): <description>`
174+
- **Allowed Types:**
175+
- `feat`: A new feature or algorithm implementation.
176+
- `fix`: A bug fix.
177+
- `perf`: A code change that improves performance (e.g., optimizations).
178+
- `doc`: Documentation only changes.
179+
- `refactor`: A code change that neither fixes a bug nor adds a feature.
180+
- `test`: Adding missing tests or correcting existing ones.
181+
- `chore`: Changes to the build process, dependencies, or auxiliary tools.
182+
- **Preferred Scopes for PureCV:** Use scopes to categorize the architectural work, such as `(simd)`, `(wasm)`, `(parallel)`, `(core)`, `(imgproc)`.
183+
- **Examples of valid commits:**
184+
- `feat(simd): implement AVX2 support for matrix multiplication`
185+
- `perf(wasm): optimize memory allocation for Emscripten target`
186+
- `fix(core): resolve out-of-bounds error in Row-Major layout`
187+
- `doc: add usage examples for parallel processing`

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ exclude = [
99
resolver = "2"
1010

1111
[workspace.package]
12-
version = "0.3.7"
12+
version = "0.3.8"
1313
authors = ["kalwalt <github@kalwaltart.it>"]
1414
edition = "2021"
1515
description = "A high-performance, memory-safe Rust port of WebARKitLib (ARToolKit) for native and WASM."

benchmarks/c_benchmark/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,18 @@ elseif(NOT WIN32)
187187
target_link_libraries(c_benchmark m)
188188
endif()
189189

190+
# ── Pattern-extraction diagnostic dumper (issue #103) ──
191+
# Sibling of c_benchmark; runs detection once, re-extracts the matched patch
192+
# via arPattGetImage, and dumps it for byte-comparison with the Rust port.
193+
# See ../data/README.md and ../../docs/issue-103-fix-plan.md.
194+
add_executable(dump_patt ${AR_CORE_SOURCES} "dump_patt.c")
195+
target_compile_definitions(dump_patt PRIVATE ${COMMON_DEFS})
196+
if(WIN32 AND MSVC)
197+
target_compile_options(dump_patt PRIVATE /W3 /Z7)
198+
elseif(NOT WIN32)
199+
target_link_libraries(dump_patt m)
200+
endif()
201+
190202
# ── KPM targets (fixture generator + benchmark) ──
191203
# These require libjpeg-9f (bootstrapped) and are NOT built by default.
192204
# Build manually with: cmake --build . --target kpm_dump_fixtures

0 commit comments

Comments
 (0)