Files
oak-editor/crates/oak-core
Mike-Solar ee7ea18d94 clippy: clear the workspace errors and apply the machine fixes
- Mark the raw-pointer interop entry points unsafe with # Safety docs
  (oak-core upload/download/frame-from-pixels, oak-audio convert) and
  satisfy the existing callers (tests).
- mut_from_ref: allow with the ABI contract documented (the handle
  get_mut helpers in oak-timeline/oak-render/oak-task take the shared
  reference the C ABI passes; exclusivity is the caller's unsafe
  contract).
- Fix the eq_op in the white-balance normalization (green / green).
- Apply cargo clippy --fix across the workspace (redundant closures and
  field names, field reassignment, items after test modules, ...).
- Revert the replace_box fix in image_effect's clip_define: a
  redefinition must allocate a new box, otherwise the old clip handle
  stays valid and the HS-map replace contract (clip != clip2) breaks.
- 283 warnings remain; they are all non-machine-applicable
  (chunks_exact -> as_chunks needs a manual iter_mut, too_many_arguments,
  complex types, missing Safety docs, ...) and are tracked as the
  follow-up.
2026-09-15 19:29:32 +08:00
..

oakcore-rs — Rust value-type foundation for the oak Rust modules

Status: declaration draft for review (no implementation, not wired into any build). Companion to crates/oaknode and crates/oakrender.

Rust reimplementation of the oakcore C++ value types that cross every module boundary: Rational, TimeRange, TimeRangeList, pixel/sample format enums. These are pure data types with value semantics — the one place where duplicating the C++ layout discipline in plain Rust is both safe and required (a Rust crate cannot hold C++ objects by value).

Rules:

  • Bit-exact arithmetic compatibility with olive::core::Rational (reduction, overflow behavior, comparison) — the golden rule is the C++ test-suite semantics, not "ideal" rational math.
  • #[repr(C)] only where a type crosses the C ABI; everything else is plain Rust with Copy + Clone + Eq + Hash.
  • No I/O, no allocation in arithmetic paths, no panics on degenerate input (denominator zero follows the C++ sentinel semantics).