Skip to content

[no_std] Phase 1 — make purecv-core compile under no_std + alloc #83

Description

@kalwalt

Part of #82.

Goal

purecv-core builds with --no-default-features (no std) using only core + alloc.

Tasks

  • Audit all std:: usages in purecv-core (grep -rn "std::" crates/purecv-core)
  • Make std a genuine opt-in feature (std = [] in Cargo.toml, not implied by default elsewhere)
  • Add #![cfg_attr(not(feature = "std"), no_std)] + extern crate alloc; in lib.rs
  • Replace std::vec::Vecalloc::vec::Vec (behind cfg or unconditionally if always available via alloc)
  • Replace std::f64::constscore::f64::consts
  • Check for any panic/unwind assumptions (std::panic, catch_unwind) — none expected in core, but verify
  • Add a no_std smoke-test crate/example that compiles for a thumbv7em-none-eabihf or similar bare target, to catch regressions without needing full ESP-IDF toolchain in CI
  • Update CI: add a job building purecv-core with --no-default-features

Out of scope

Rayon/parallel, SIMD/pulp, imgproc/video/calib3d — handled in later phases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions