Conversation
- 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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Promotes
devtomainfor the v0.7.0 release. Tagmainwithv0.7.0after this merges (and CI is green) to trigger the publish workflow.Highlights
no_std/ embedded support —core,imgproc,calib3d, andvideocompile with--no-default-features(onlycore+alloc), runnable on microcontrollers such as the ESP32.features2dremainsstd-gated. Delivered across three phases ([no_std] Phase 1 — makepurecv-corecompile underno_std + alloc#83, [no_std] Phase 2 —purecv-imgprocunderno_std(parallel & simd disabled) #84, [no_std] Phase 3 (exploratory) — evaluate video/calib3d on embedded targets #85 under umbrella Feature request: no-std support so purecv can run on microcontrollers such a esp32 #82) and verified on real ESP32-S3 hardware (purecv-esp32-examples).cv::utils::loggingequivalent) #80) —LogLevel, per-subsystemtags,cv_log_*!macros, andcv_bail!/cv_err!log-and-return helpers used acrosscoreto report invalid input.libm-backed float math underno_stdvianum-traits.Release metadata
0.6.1 → 0.7.0(minor: new backward-compatible feature; default features and existing APIs unchanged).CHANGELOG.md0.7.0section added.Verification
thumbv7em-none-eabihfwith--no-default-features.Closes #82
Closes #83
Closes #84
Closes #85
🤖 Generated with Claude Code