Skip to content

Commit dfc226c

Browse files
UnbreakableMJclaude
andcommitted
feat: bootstrap workspace and ship v0.1.0 polygon-mode pipeline
Workspace topology - 14-crate Cargo workspace plus xtask (caliper, caliper-trace, caliper-crucible, caliper-assayer, caliper-smelt, caliper-etch, caliper-burin, caliper-temper, caliper-weld, caliper-cast, caliper-bellows, caliper-touchstone, caliper-anvil, caliper-tui) - MSRV 1.88.0 (Edition 2024); deviation from PRD's "1.82.0 + Edition 2024" documented in Cargo.toml -- the original combo was self-inconsistent - Workspace lints per Microsoft Pragmatic Rust Guidelines - deny.toml allow-list; default-members excludes optional bellows/touchstone Governance - README.md, NOTICE.md, CONTRIBUTING.md, CREDITS.md per Steelbore Standard v1.2 sections 5 and 13 - AGENTS.md, CLAUDE.md, SKILL.md per PRD section 17.1 - LICENSE (GPL-3.0-or-later verbatim) - CI workflows: clippy, multi-target test matrix, cargo-deny, Miri (anvil), xtask audits, nightly fuzz, release build - Reproducible Nix dev shell via flake.nix v0.1.0 polygon-mode pipeline (58 tests passing across 7 stage crates) - caliper-anvil: OkLab + Cpu detection + scalar/AVX2/NEON nearest-centroid kernel with SIMD-equivalent-to-scalar property tests - caliper-smelt: deterministic k-means++ OKLab quantizer + xoshiro256pp RNG - caliper-etch: 4/8-connectivity connected components plus Sobel/Scharr gradient magnitude - caliper-burin: Moore-neighbour boundary trace plus Visvalingam-Whyatt simplification - caliper-cast: streaming SVG 1.1 writer (UTF-8, no BOM, deterministic) - caliper-crucible: end-to-end orchestrator wiring every stage - caliper-trace: public facade plus integration tests proving raster -> VectorDocument -> SVG-bytes round-trip - examples/trace_synthetic: visible smoke test producing real SVG output Deferred to later milestones - AVIF support (dav1d-sys requires pkg-config) -> v0.5.0 via pure-Rust rav1d - caliper-touchstone (ort 2.0.0-rc.12 vs ndarray 0.16 NdFloat mismatch) -> v0.4.0 after ort matures - Bezier fitting in caliper-temper -> v0.2.0; polygon mode covers v0.1.0 - TUI / GPU / NPU backends -> v0.2.0 / v0.3.0 / v0.4.0 per PLAN.md Refs PRD.md v2.0, PLAN.md v1.0, TODO.md v1.0. Governed by Steelbore Standard v1.2 and SFRS v1.0.0. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: UnbreakableMJ <34196588+UnbreakableMJ@users.noreply.github.com>
0 parents  commit dfc226c

92 files changed

Lines changed: 14219 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cargo/config.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# SPDX-License-Identifier: GPL-3.0-or-later
2+
#
3+
# Per-developer cargo overrides. Profile-specific RUSTFLAGS so the four
4+
# release tiers from PRD §14.1 (portable / avx / avx512 / native) target
5+
# the right microarchitecture without polluting Tier-1 CI builds.
6+
7+
[build]
8+
# Default jobs = logical CPUs; let cargo decide.
9+
10+
# Microsoft x86_64 microarchitecture levels (see PRD §14.1 + 6.1.2).
11+
[target.'cfg(target_arch = "x86_64")']
12+
# No global rustflags — each release-* profile sets its own via env in CI.
13+
14+
[alias]
15+
xtask = "run -p xtask --release --"
16+
deny = "deny --hide-inclusion-graph"
17+
audit = "deny check advisories"

.editorconfig

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# SPDX-License-Identifier: GPL-3.0-or-later
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
end_of_line = lf
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true
9+
indent_style = space
10+
indent_size = 4
11+
12+
[*.{md,markdown}]
13+
trim_trailing_whitespace = false
14+
15+
[*.{toml,yaml,yml,json}]
16+
indent_size = 2
17+
18+
[*.{nix,wgsl}]
19+
indent_size = 2
20+
21+
[Makefile]
22+
indent_style = tab

.github/workflows/ci.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# SPDX-License-Identifier: GPL-3.0-or-later
2+
#
3+
# Caliper CI — runs on every push and pull request.
4+
# Mirrors PLAN.md §7 verification matrix.
5+
6+
name: ci
7+
8+
on:
9+
push:
10+
branches: [main]
11+
pull_request:
12+
branches: [main]
13+
workflow_dispatch:
14+
15+
env:
16+
CARGO_TERM_COLOR: always
17+
RUSTFLAGS: "-D warnings"
18+
19+
concurrency:
20+
group: ci-${{ github.ref }}
21+
cancel-in-progress: true
22+
23+
jobs:
24+
fmt:
25+
name: rustfmt
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
- uses: dtolnay/rust-toolchain@1.88.0
30+
with:
31+
components: rustfmt
32+
- run: cargo fmt --all --check
33+
34+
clippy:
35+
name: clippy
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v4
39+
- uses: dtolnay/rust-toolchain@1.88.0
40+
with:
41+
components: clippy
42+
- uses: Swatinem/rust-cache@v2
43+
- run: cargo clippy --workspace --all-targets -- -D warnings
44+
45+
test:
46+
name: test (${{ matrix.target.name }})
47+
runs-on: ${{ matrix.target.os }}
48+
strategy:
49+
fail-fast: false
50+
matrix:
51+
target:
52+
- { name: linux-gnu, os: ubuntu-latest, triple: x86_64-unknown-linux-gnu }
53+
- { name: linux-musl, os: ubuntu-latest, triple: x86_64-unknown-linux-musl }
54+
- { name: linux-arm64, os: ubuntu-24.04-arm, triple: aarch64-unknown-linux-gnu }
55+
- { name: macos-x86_64, os: macos-13, triple: x86_64-apple-darwin }
56+
- { name: macos-arm64, os: macos-latest, triple: aarch64-apple-darwin }
57+
- { name: windows, os: windows-latest, triple: x86_64-pc-windows-msvc }
58+
steps:
59+
- uses: actions/checkout@v4
60+
- uses: dtolnay/rust-toolchain@1.88.0
61+
with:
62+
targets: ${{ matrix.target.triple }}
63+
- uses: Swatinem/rust-cache@v2
64+
- run: cargo test --workspace --target ${{ matrix.target.triple }}
65+
66+
deny:
67+
name: cargo-deny
68+
runs-on: ubuntu-latest
69+
steps:
70+
- uses: actions/checkout@v4
71+
- uses: EmbarkStudios/cargo-deny-action@v2
72+
73+
miri:
74+
name: miri (caliper-anvil)
75+
runs-on: ubuntu-latest
76+
steps:
77+
- uses: actions/checkout@v4
78+
- uses: dtolnay/rust-toolchain@nightly
79+
with:
80+
components: miri
81+
- uses: Swatinem/rust-cache@v2
82+
- run: cargo +nightly miri test -p caliper-anvil
83+
84+
audit:
85+
name: xtask audits
86+
runs-on: ubuntu-latest
87+
needs: [fmt]
88+
steps:
89+
- uses: actions/checkout@v4
90+
- uses: dtolnay/rust-toolchain@1.88.0
91+
- uses: Swatinem/rust-cache@v2
92+
- run: cargo xtask spdx-audit
93+
- run: cargo xtask utf8-audit
94+
- run: cargo xtask network-audit

.github/workflows/fuzz.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# SPDX-License-Identifier: GPL-3.0-or-later
2+
#
3+
# Nightly fuzz job. Runs cargo-fuzz against decoder targets and anvil kernels.
4+
5+
name: fuzz
6+
7+
on:
8+
schedule:
9+
# 04:00 UTC every day
10+
- cron: "0 4 * * *"
11+
workflow_dispatch:
12+
13+
jobs:
14+
fuzz:
15+
name: fuzz ${{ matrix.target }}
16+
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
target:
21+
- decode_png
22+
- decode_jpeg
23+
- decode_webp
24+
- anvil_color_distance
25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: dtolnay/rust-toolchain@nightly
28+
- uses: Swatinem/rust-cache@v2
29+
- run: cargo install cargo-fuzz --locked
30+
- name: fuzz ${{ matrix.target }} (5 min)
31+
run: |
32+
if [ -d fuzz ]; then
33+
cargo +nightly fuzz run ${{ matrix.target }} -- -max_total_time=300
34+
else
35+
echo "fuzz/ directory not yet scaffolded — see TODO.md §10"
36+
fi

.github/workflows/release.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# SPDX-License-Identifier: GPL-3.0-or-later
2+
#
3+
# Tagged-release pipeline. Builds per-platform artefacts and uploads them
4+
# to the matching GitHub Release. PRD §14.2 enumerates the distribution
5+
# channels — this workflow handles the per-platform build half; channel
6+
# publication (crates.io / AUR / Flatpak / Homebrew / MSI / NixOS) lands
7+
# with v1.0.0 §6.6 of TODO.md.
8+
9+
name: release
10+
11+
on:
12+
push:
13+
tags:
14+
- "v*.*.*"
15+
workflow_dispatch:
16+
17+
permissions:
18+
contents: write
19+
20+
jobs:
21+
build:
22+
name: build ${{ matrix.target.name }}
23+
runs-on: ${{ matrix.target.os }}
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
target:
28+
- { name: linux-gnu, os: ubuntu-latest, triple: x86_64-unknown-linux-gnu }
29+
- { name: linux-musl, os: ubuntu-latest, triple: x86_64-unknown-linux-musl }
30+
- { name: linux-arm64, os: ubuntu-24.04-arm, triple: aarch64-unknown-linux-gnu }
31+
- { name: macos-x86_64, os: macos-13, triple: x86_64-apple-darwin }
32+
- { name: macos-arm64, os: macos-latest, triple: aarch64-apple-darwin }
33+
- { name: windows, os: windows-latest, triple: x86_64-pc-windows-msvc }
34+
steps:
35+
- uses: actions/checkout@v4
36+
- uses: dtolnay/rust-toolchain@1.88.0
37+
with:
38+
targets: ${{ matrix.target.triple }}
39+
- uses: Swatinem/rust-cache@v2
40+
- run: cargo build --release --bin caliper --target ${{ matrix.target.triple }}
41+
- uses: actions/upload-artifact@v4
42+
with:
43+
name: caliper-${{ matrix.target.name }}
44+
path: target/${{ matrix.target.triple }}/release/caliper*
45+
46+
release:
47+
name: github-release
48+
runs-on: ubuntu-latest
49+
needs: [build]
50+
steps:
51+
- uses: actions/download-artifact@v4
52+
with:
53+
path: artifacts/
54+
- uses: softprops/action-gh-release@v2
55+
with:
56+
files: artifacts/**/*
57+
draft: true
58+
generate_release_notes: true

.gitignore

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# SPDX-License-Identifier: GPL-3.0-or-later
2+
3+
# Build artifacts
4+
/target/
5+
**/target/
6+
/dist/
7+
*.bk
8+
*.orig
9+
10+
# IDE / editor scratch
11+
.vscode/
12+
.idea/
13+
*.swp
14+
*.swo
15+
.direnv/
16+
.envrc.local
17+
18+
# OS scratch
19+
.DS_Store
20+
Thumbs.db
21+
22+
# Test scratch
23+
/tmp/
24+
*.profraw
25+
*.profdata
26+
fuzz/corpus/
27+
fuzz/artifacts/
28+
29+
# Local-only secrets / overrides
30+
*.local
31+
.env
32+
.env.local
33+
34+
# Generated headers
35+
/target/include/
36+
37+
# Touchstone model assets (pulled on demand, never committed)
38+
/assets/models/*
39+
!/assets/models/.gitkeep
40+
41+
# Local plan / chat exports
42+
/Chat.txt

0 commit comments

Comments
 (0)