Skip to content

Release v0.7.0 — no_std / embedded support - #92

Merged
kalwalt merged 29 commits into
mainfrom
dev
Aug 7, 2026
Merged

Release v0.7.0 — no_std / embedded support#92
kalwalt merged 29 commits into
mainfrom
dev

Conversation

@kalwalt

@kalwalt kalwalt commented Aug 7, 2026

Copy link
Copy Markdown
Member

Promotes dev to main for the v0.7.0 release. Tag main with v0.7.0 after this merges (and CI is green) to trigger the publish workflow.

Highlights

Release metadata

  • Version bumped 0.6.1 → 0.7.0 (minor: new backward-compatible feature; default features and existing APIs unchanged).
  • CHANGELOG.md 0.7.0 section added.

Verification

  • Builds clean on host and thumbv7em-none-eabihf with --no-default-features.
  • Full suite green (308 unit + 40 doc tests); clippy/fmt clean on no-default / default / simd+parallel.

Closes #82
Closes #83
Closes #84
Closes #85

🤖 Generated with Claude Code

kalwalt and others added 29 commits July 8, 2026 11:31
num-traits switches to libm-backed float math so core compiles without
the standard library; parallel/simd/fft/ndarray require std until their
own no_std phases land (#82). Default features are unchanged.

Refs #83

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- add #![cfg_attr(not(feature = "std"), no_std)] and extern crate alloc
- std-gate the not-yet-converted modules (calib3d, features, features2d,
  imgproc, video) and their prelude re-exports
- switch std:: paths to core::/alloc:: throughout src/core
- PureCvError now implements core::error::Error (MSRV 1.88)
- float methods resolve through num_traits::Float (libm) in no_std builds
- std-gate get_tick_count/get_tick_frequency (no bare-metal clock) and the
  thread-local RNG API; replace a debug eprintln! with log::warn!

Verified on thumbv7em-none-eabihf and ESP32-S3 (Xtensa).

Refs #83

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
crates/no-std-smoke consumes the purecv public API from a #![no_std]
crate; building it for a bare-metal target proves downstream no_std
usability. Excluded from the workspace as its own root.

Refs #83

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Builds and lints with --no-default-features on the host, then builds
purecv and the smoke-test consumer for thumbv7em-none-eabihf.

Refs #83

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
default-features = false previously only dropped rayon; now that std
gates the non-core modules, the wasm wrapper must opt back into it.

Refs #83

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add a new core::logging module mirroring cv::utils::logging, built on
the existing log crate facade. Provides:

- LogLevel enum (Silent/Fatal/Error/Warning/Info/Debug/Verbose) with
  From conversions to/from log::LevelFilter and log::Level
- set_log_level/get_log_level with return-previous semantics
- tags submodule with per-subsystem constants (PURECV, CORE, IMGPROC,
  FEATURES2D, CALIB3D, VIDEO)
- Level macros: cv_log_fatal/error/warning/info/debug/verbose
- Once-per-call-site macros: cv_log_once_error/warning/info/debug
  (AtomicBool-based, no_std-friendly)
- Conditional macros: cv_log_if_error/warning/info/debug

Breaking change: set_log_level/get_log_level now use LogLevel instead
of log::LevelFilter (pre-1.0, zero callers in codebase).

Closes #80
Fuse "log the failure with the caller's subsystem tag" and "produce the
matching PureCvError" into a single call, so every error site stays a
one-liner while log level and format policy live in one place.

- cv_bail!  — log warning, then `return Err(PureCvError::Variant(msg))`
- cv_err!   — log warning, yield the PureCvError value (expression position)
- cv_bail_debug! / cv_err_debug! — debug-level variants for low-severity paths

Add unit tests and a doctest covering all four macros. Purely additive;
no call sites migrated yet.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Migrate every `Err(PureCvError::…)` input-validation site in arithm.rs
(42 sites) and matrix.rs (7 sites) to the cv_bail!/cv_err! log-and-return
macros, so bad input is logged at warning level with the caller's CORE tag.

Each message now names its function and interpolates the actual offending
values (dims, channel counts, args) instead of a static string, e.g.
"add: matrices must have the same dimensions (src1 4×4×3, src2 2×2×1)".
The pre-existing solve() singular-matrix log is left untouched.

Drop the now-unused PureCvError import from both files.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
These three modules had no `//!` summary, so they rendered with a blank
description on the crate root docs page while siblings (calib3d,
features2d, video, …) had one. Add overviews mirroring their style:

- core:    Matrix/Scalar, arithm/solvers, dft/dct, error, logging
- imgproc: color, filter, edge, threshold, morph, geometric, pyramid
- features: placeholder note for the not-yet-implemented FAST/ORB APIs

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…es (#80)

Migrate every Err(PureCvError::…) input-validation site in the remaining
core modules to the cv_bail!/cv_err! log-and-return macros, completing the
core coverage started in arithm.rs and matrix.rs:

- dct.rs (4), dft.rs (3), metrics.rs (3), rng.rs (2), types.rs (1)
- dynamic.rs (9), structural.rs (16)

Each message now names its function and interpolates the actual offending
values (dims, channel counts, lengths). Drop the now-unused PureCvError
import from these files (types.rs keeps a full-path doc link).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a `purecv-core` feature bullet for the OpenCV-style logging facade and
a "Logging" usage subsection showing init_basic_logger(), set_log_level(),
the warning emitted on invalid input, and the cv_log_*! macros with
per-subsystem RUST_LOG filtering.

CHANGELOG.md is git-cliff generated and picks these commits up at release.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The built-in SimpleLogger / init_basic_logger write to stdout via
println!, which is the only genuinely std-only code in the logging
module. Gate them (and the core re-export) behind #[cfg(feature = "std")]
so the module is no_std-ready ahead of the no_std work in #86.

Everything else here (LogLevel, set/get_log_level, the cv_log_*! /
cv_bail! / cv_err! macros, the once-macros' core::sync::atomic state) is
core/alloc-only. The remaining alloc-path reconciliation for logging.rs
(format!/String under no_std) belongs to the no_std core conversion in
#86, where the extern-crate-alloc scaffolding and target CI exist.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
# Conflicts:
#	src/core/arithm.rs
#	src/core/dynamic.rs
#	src/core/matrix.rs
#	src/core/metrics.rs
#	src/core/rng.rs
#	src/core/structural.rs
feat(core): no_std support for the core module (Phase 1)
Un-gates `imgproc` (and its prelude re-exports) for no_std builds; the
module now compiles with only core + alloc.

Refs #84

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Converts std:: paths to their core:: equivalents and adds alloc imports
(vec/Vec/format/ToString) plus num_traits::Float where concrete f32/f64
math is used, so scalar fallbacks build without std. No behavior change.

Refs #84

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds a scalar gaussian_blur call to the bare-metal smoke consumer and
updates the CI job name to cover Phase 2 (issue #84).

Refs #84

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Phase 3 (#85) concluded the exploration with "port both": the audit found
no hard blockers — calib3d RANSAC uses its own self-contained LCG PRNG (not
the std-gated thread-local RNG), and neither module uses HashMap/Instant/
threads. Un-gates `video` and `calib3d` (and their prelude re-exports).

Refs #85

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Mechanical std::->core:: conversion, alloc imports (vec/Vec/format/ToString),
and num_traits::Float where concrete f32/f64 math is used. optical_flow's
SIMD-only vec! import is gated behind the simd feature. No behavior change.

Refs #85

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds rodrigues (calib3d) and build_optical_flow_pyramid (video) to the
no_std smoke crate, extends the CI job name, and documents the per-module
no_std support matrix in the README.

Refs #85

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- broaden the intro/philosophy to cover all modules and no_std targets
- add an "Embedded-ready" philosophy bullet and a no_std quickstart snippet
- note MSRV 1.88; fix version examples (0.5 -> 0.6)
- core::f64::consts (available under no_std), updated test counts (308/40)
- roadmap: mark embedded/no_std support done

Refs #82

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
feat: no_std / embedded support for core, imgproc, calib3d & video (#82)
Bump version 0.6.1 -> 0.7.0 (minor: no_std/embedded support + logging).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kalwalt kalwalt self-assigned this Aug 7, 2026
@kalwalt kalwalt added enhancement New feature or request rust-code rust Pull requests that update rust code new-release no_std everything about not std feature and embedded sys. labels Aug 7, 2026
@kalwalt
kalwalt merged commit 7450e7e into main Aug 7, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request new-release no_std everything about not std feature and embedded sys. rust Pull requests that update rust code rust-code

Projects

None yet

1 participant