- CI: push/PR to main only; ubuntu/macos-15-arm64/windows-ucrt64 matrix; deps via tooling/install-deps.sh; project FFmpeg built once and cached under .cache/ffmpeg keyed on the build script; rust-cache for target/ - CD: tag v* packages with cargo-packager — deb/AppImage/pacman on Linux (rpm converted from the deb with fpm), NSIS on Windows, and a DMG (Apple Silicon) whose .app embeds liboakengine.dylib via install_name_tool; tag pushes publish a GitHub release with all packages attached - root Cargo.toml gains [package.metadata.packager]; the app icon is generated from Oak_Icon.svg with rsvg-convert in CI - root build.rs now also links the app on Linux (link-search + rpath + --export-dynamic); Windows remains blocked on the DLL undefined-symbol problem (oakcore_* host imports), documented in build.rs
145 lines
6.4 KiB
TOML
145 lines
6.4 KiB
TOML
# 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/>.
|
|
|
|
# Root manifest: the `oakapp` package (the gpui-based application) plus the
|
|
# Cargo workspace over every crate under crates/.
|
|
#
|
|
# oakstorage (crates/oakstorage) is deliberately excluded: it is a work in
|
|
# progress whose contract tests are still `todo!()` stubs (they cannot pass
|
|
# yet), and it pulls heavy database backends (sea-orm). It stays a
|
|
# standalone crate with its own Cargo.lock; build it with
|
|
# `cd crates/oakstorage && cargo build`.
|
|
#
|
|
# gpui (the oak-gpui fork at gpui/) is excluded too: it is a separate git
|
|
# repository with its own workspace (resolver 3, edition 2024,
|
|
# workspace.package/workspace.dependencies). Without the exclusion its
|
|
# crates would be auto-included here via oakapp's path dependencies and
|
|
# would inherit from THIS workspace's [workspace.package] (which lacks the
|
|
# keys gpui expects). Excluded, each gpui crate resolves against gpui's own
|
|
# workspace root, exactly as before the monorepo workspace existed.
|
|
[workspace]
|
|
members = ["crates/*"]
|
|
exclude = ["crates/oakstorage", "gpui"]
|
|
# NOTE: `crates/oakengine` is deliberately NOT a default member (it stays a
|
|
# workspace member, so `cargo test -p oakengine` works): its in-flight
|
|
# integration tests (`tests/it_*族.rs`, an ongoing rewrite) share temp files
|
|
# and process-global facade state, which makes the parallel default-members
|
|
# run flaky. The app builds it as a regular path dependency instead.
|
|
default-members = [".", "crates/oak-cli", "crates/oak-worker"]
|
|
resolver = "2"
|
|
|
|
[profile.release]
|
|
# FFI discipline: every module crate exports an `extern "C"` ABI whose
|
|
# entry points must never unwind/abort across the boundary; panics are
|
|
# caught by catch_unwind and mapped to error codes instead. `unwind` is
|
|
# also rustc's default, but this makes the project-wide policy explicit
|
|
# (it used to live in each member's Cargo.toml, which a workspace root
|
|
# ignores).
|
|
panic = "unwind"
|
|
|
|
[package]
|
|
name = "oak"
|
|
version = "0.5.0"
|
|
edition = "2021"
|
|
description = "Oak Video Editor"
|
|
license = "GPL-3.0-or-later"
|
|
|
|
[lib]
|
|
name = "oakapp"
|
|
path = "src/lib.rs"
|
|
# Doctests are disabled: the real engine binding links the `liboakengine`
|
|
# cdylib (see build.rs), which the doctest binary would have to resolve as
|
|
# well for every doc example. The doc examples' assertions are covered by
|
|
# unit tests instead (see `oakui/timecode`).
|
|
|
|
[[bin]]
|
|
name = "oak-editor"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
# gpui: the GPU-accelerated UI framework (oak-gpui fork, git submodule at gpui/).
|
|
gpui = { path = "gpui/crates/gpui" }
|
|
# Convenience entry point: `gpui_platform::application()` picks the platform
|
|
# backend. font-kit enables text shaping/rendering on macOS.
|
|
gpui_platform = { path = "gpui/crates/gpui_platform", features = ["font-kit"] }
|
|
# Oak's widget library: menus, viewer, form controls, project explorer.
|
|
gpui_widgets = { path = "gpui/crates/gpui_widgets" }
|
|
# The mock engine's synthetic viewer frames (`image::Frame` in a
|
|
# `RenderImage`), matching the versions gpui itself uses.
|
|
image = "0.25"
|
|
smallvec = "1"
|
|
# Editable-text widget (used by the file / export dialogs' path fields, the
|
|
# same gpui-elements crate gpui_widgets builds on).
|
|
gpui_elements = { path = "gpui/crates/gpui_elements" }
|
|
|
|
[build-dependencies]
|
|
# The real engine is NOT linked as an rlib: the app binds only the frozen
|
|
# `oakengine_*` C ABI through the built `liboakengine` cdylib (build.rs
|
|
# emits the link-search path / rpath / `#[link(name = "oakengine")]`
|
|
# externs). This build-dependency only orders the build — cargo compiles
|
|
# the engine's cdylib before the app's build script runs, so a fresh
|
|
# `cargo build` at the repo root always finds `liboakengine.dylib`.
|
|
oakengine = { path = "crates/oakengine" }
|
|
|
|
[features]
|
|
default = []
|
|
# Force the mock engine even though the real facade is linked. Off by
|
|
# default: the app runs on the real engine unless `--mock` / `OAK_ENGINE=mock`
|
|
# is given at runtime (or this feature is enabled at build time).
|
|
mock-engine = []
|
|
|
|
[dev-dependencies]
|
|
# `#[gpui::test]` harness for engine-seam smoke tests (test-support feature).
|
|
gpui = { path = "gpui/crates/gpui", features = ["test-support"] }
|
|
# `test-support` also enables `gpui_macos/test-support`, which is what makes
|
|
# `render_to_image` (the screenshot example) available.
|
|
gpui_platform = { path = "gpui/crates/gpui_platform", features = ["test-support"] }
|
|
# Screenshot capture: `examples/screenshot.rs` saves the rendered window PNG
|
|
# (the `image` crate is already in the lockfile through gpui).
|
|
image = "0.25"
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# cargo-packager metadata (the CD workflow, .github/workflows/cd.yml, packages
|
|
# the release binaries with `cargo packager`; the schema lives at
|
|
# https://docs.crabnebula.dev/packager/configuration/).
|
|
#
|
|
# Binaries are resolved relative to `target/<profile>` (oak-editor is the
|
|
# main binary; oak-cli / oak-worker are bundled alongside). They must exist
|
|
# before packaging runs — `cargo packager` does NOT build the app itself, so
|
|
# CD builds with `cargo build --release` first.
|
|
#
|
|
# `icons/icon.png` is NOT committed: it is generated from `Oak_Icon.svg`
|
|
# (rsvg-convert) in CD right before packaging, because cargo-packager needs a
|
|
# bitmap (it converts a square PNG into .icns / .ico / hicolor PNGs itself).
|
|
# Keep the path here in sync with the CD workflow.
|
|
# ---------------------------------------------------------------------------
|
|
[package.metadata.packager]
|
|
name = "oak"
|
|
productName = "Oak"
|
|
identifier = "org.oakvideoeditor.Oak"
|
|
description = "Oak Video Editor"
|
|
longDescription = "Oak Video Editor: a free, open-source non-linear video editor written in Rust."
|
|
authors = ["Oak Team"]
|
|
copyright = "Copyright (C) 2026 Oak Team"
|
|
licenseFile = "LICENSE"
|
|
category = "Video"
|
|
icons = ["icons/icon.png"]
|
|
binaries = [
|
|
{ path = "oak-editor", main = true },
|
|
{ path = "oak-cli", main = false },
|
|
{ path = "oak-worker", main = false },
|
|
]
|