Skip to content

Commit c02b9c0

Browse files
kalwaltclaude
andcommitted
docs(#51): add CONTRIBUTING.md
Add contribution guidelines: branch-from-dev / PR-to-dev, signed commits, Conventional Commits (with examples), what may/may not change (WebARKit/ vs the vendored old-ARToolKit5 lib/SRC), the cross-repo PR-pair flow, and build/test (CMake static lib for WASM/Linux via opencv-em; gtest). README already links here. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent f113d88 commit c02b9c0

1 file changed

Lines changed: 67 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Contributing to WebARKitLib
2+
3+
Thanks for helping improve WebARKit! This is the C/C++ source of the tracker; most
4+
changes are consumed by the [webarkit-testing](https://github.com/webarkit/webarkit-testing)
5+
superproject as a submodule.
6+
7+
## Workflow
8+
9+
- **Branch from `dev`** and open your PR **against `dev`** (not `main`).
10+
- Reference the related issue in the PR description.
11+
- **Sign your commits** (`git commit -S …`).
12+
13+
## Commit messages — Conventional Commits
14+
15+
All commit messages **must** follow
16+
[Conventional Commits](https://www.conventionalcommits.org/):
17+
18+
```
19+
<type>(<optional scope>): <short description>
20+
```
21+
22+
Common types: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`, `perf`. Examples:
23+
24+
```
25+
feat(tracker): detect features on a downsampled frame
26+
fix(#55): populate pose3d so getPoseMatrixCV() isn't zero
27+
docs: document the pose pipeline
28+
refactor(#50): remove dead computePose/invertPose
29+
```
30+
31+
## What you may change
32+
33+
- Active WebAR work lives under **`WebARKit/`** (the OCVT planar tracker).
34+
- **Do not** modify the vendored **old ARToolKit5** sources under `lib/SRC/**` or
35+
`include/AR/**` — those are upstream utilities used by
36+
[jsartoolkitNFT](https://github.com/webarkit/jsartoolkitNFT) /
37+
[ARnft](https://github.com/webarkit/ARnft) and are kept untouched.
38+
39+
## Cross-repo changes (the PR pair)
40+
41+
A change that affects the WASM build is consumed by webarkit-testing via the
42+
submodule. Coordinate both repos:
43+
44+
1. Branch from `dev` in **both** WebARKitLib and webarkit-testing.
45+
2. Make the C++ change here; in webarkit-testing bump the submodule pointer and
46+
rebuild (`npm run build-docker``build-es6`).
47+
3. Open a **PR pair** (WebARKitLib → `dev`, webarkit-testing → `dev`); cross-link them.
48+
4. After the WebARKitLib PR merges, re-point the submodule to the merged `dev` tip.
49+
50+
## Building & tests
51+
52+
- The library is normally built **from webarkit-testing** (WASM) — see its README.
53+
`WebARKit/CMakeLists.txt` can also build it as a static lib for **WASM** or **native
54+
Linux** (selected via `EMSCRIPTEN_COMP`), pulling OpenCV from
55+
[webarkit/opencv-em](https://github.com/webarkit/opencv-em).
56+
- **Unit tests** (GoogleTest) live in `tests/` and run in CI on every PR:
57+
58+
```bash
59+
cmake -S tests -B tests/build && cmake --build tests/build && ctest --test-dir tests/build
60+
```
61+
62+
If you change a config constant or the version, update the matching assertions in
63+
`tests/webarkit_test.cc`.
64+
65+
## License
66+
67+
By contributing, you agree that your contributions are licensed under **LGPL-3.0**.

0 commit comments

Comments
 (0)