Single mechanical restructure commit: - root Cargo.toml = oakapp bin + workspace; one cargo build produces oakapp, oak-cli, oak-worker, liboakengine.dylib - app/rust/src -> src/ (app at repo root, no rust/ nesting) - src/<mod>/rust -> crates/oak<mod>; src/oakcore-rs -> crates/oakcore; src/bindings/oakotio -> crates/oakotio; src/engine/rust -> crates/oakengine (keeps cdylib+staticlib+rlib) - public C headers include/<mod>/ -> crates/oakengine/include/<mod>/ - OFX SDK headers vendored into crates/oakplugin/ofx/ (HostSupport gone) - legacy deleted: old src/ C++ modules, engine/, core/, ffmpeg_bridge/, app/ (Qt), cli/worker C++, root CMakeLists, third_party/KDDockWidgets submodule, otio-install, all build-* output (~40GB) - oakstorage kept but excluded from the workspace (skeleton w/ todos); gpui excluded (own workspace) - verified: cargo build green, cargo test --workspace 1845/0 (with the documented OCIO_RS_* env override for the homebrew OCIO)
1022 B
1022 B
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/oaknodeandcrates/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 withCopy + Clone + Eq + Hash.- No I/O, no allocation in arithmetic paths, no panics on degenerate input (denominator zero follows the C++ sentinel semantics).