Files
oak-editor/build.rs
T
Mike-Solar 022c0a7a5a refactor(app): cut liboakengine, link module rlibs directly (M14 R3)
- real.rs rewritten over module Rust APIs (Arc<Mutex<Project>> +
  NodeId; the addref handle dance and renderer boxes are gone);
  AppEngine trait and all panels untouched
- new app assembly layers: graphops (project/timeline/edit
  primitives), effectchain (chain composition with undo groups),
  renderops (montage build + ticket render + ExportTask export),
  library via oakstorage directly
- module-side safe API additions: oakundo global value-semantic
  push/undo/redo + from_closures, oakstorage project_arc_of
- deleted: src/oakui/ffi.rs, src/oakui/host_syms.rs, the dylib link
  config in build.rs (only the gpui IOSurface framework link remains)
- the binary carries zero liboakengine references (otool/nm verified);
  101 app tests green incl. the real-render and full-res e2e tests
- behavior improvements for free: sequences land in the project graph
  (the facade scratch-project deviation is gone), footage drops take
  one undo record, effect remove/reorder undo restores edges
2026-08-16 23:36:43 +08:00

35 lines
1.5 KiB
Rust

// Oak Video Editor - Non-Linear Video Editor
// Copyright (C) 2026 Oak Team
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//! Build-time link configuration for the `oakapp` crate.
//!
//! M14 R3: the app links the oak* module crates as plain rlibs — there is
//! no `liboakengine` dylib to locate anymore. The only remaining link
//! concern is gpui's macOS backend: gpui_macos reaches the IOSurface API
//! through the `core-video` crate, which depends on `io-surface` with
//! `default-features = false` — that disables io-surface's `link` feature,
//! so nothing adds the IOSurface.framework to the final link and the
//! binary fails with undefined `_IOSurface*` symbols. The app's build
//! script is the single place that configures the macOS link, so link the
//! framework here.
fn main() {
let os = std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default();
if os == "macos" {
println!("cargo:rustc-link-lib=framework=IOSurface");
}
}