workspace: kebab-case crates, app under crates/oak-app, shared versions
CI / Build & test (Windows) (push) Failing after 7s
CI / Build & test (Windows) (push) Failing after 7s
All crates take the oak-* kebab-case naming (oak-audio, oak-codec, oak-common, oak-core, oak-ffmpeg-link, oak-node, oak-otio, oak-plugin, oak-render, oak-storage, oak-task, oak-timeline, oak-undo), with the lib identifiers rewritten (oakrender:: -> oak_render::, oakcore_rs:: -> oak_core::, ...) across all 226 referencing files. The GUI application moves from the workspace root into crates/oak-app/: src/, build.rs (paths fixed for the new location) and tests/ travel with it, the root Cargo.toml becomes workspace-only ([workspace] + workspace.package + profiles), and the app package inherits the workspace version. The screenshots example becomes a standalone crate examples/simple_player/ with its own Cargo.toml. Every crate now inherits the single workspace version (version.workspace = true), and the workflows' crate paths and the build docs follow the renames. Validated with a clean cargo check --workspace.
This commit is contained in:
+3
-3
@@ -33,7 +33,7 @@ macOS, Linux, and Windows. For the Chinese version see
|
||||
`FFMPEG_DIR` does not need exporting: the committed
|
||||
`.cargo/config.toml` sets it relative to the workspace root
|
||||
(`ffmpeg-sys-next` cannot read `.env` at build-script time — the
|
||||
config entry is the only machine-agnostic way). The `oakffmpeg-link`
|
||||
config entry is the only machine-agnostic way). The `oak-ffmpeg-link`
|
||||
build script panics without it; run `build-ffmpeg.sh` once before the
|
||||
first `cargo build`.
|
||||
|
||||
@@ -128,7 +128,7 @@ Unix-style link args the MSVC linker rejects).
|
||||
|
||||
Without the `bundled` feature and without `OCIO_RS_ENABLE_REAL=1`,
|
||||
`ocio-sys` builds a stub and every colour test early-returns. The
|
||||
bundled feature is enabled unconditionally by `oakrender`, so a plain
|
||||
bundled feature is enabled unconditionally by `oak-render`, so a plain
|
||||
`cargo build` always gets the real thing on Linux/macOS.
|
||||
|
||||
## Packaging
|
||||
@@ -149,7 +149,7 @@ libraries; see `docs/project-storage.md` for what lands where.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
- **`oakffmpeg-link` panics about `FFMPEG_DIR`** — run
|
||||
- **`oak-ffmpeg-link` panics about `FFMPEG_DIR`** — run
|
||||
`tooling/ffmpeg/build-ffmpeg.sh` once; it installs into
|
||||
`.cache/ffmpeg`, which `.cargo/config.toml` points at.
|
||||
- **IDE builds fail (RustRover etc.)** — IDEs that cannot inject
|
||||
|
||||
@@ -18,7 +18,7 @@ not the working store.
|
||||
"the node graph plus settings" — nothing else — so node granularity
|
||||
is a closed, complete model.
|
||||
- **One serialization truth.** The node XML in the database is the same
|
||||
document the `.ove` serializer produces (`oaknode::serializer`).
|
||||
document the `.ove` serializer produces (`oak-node::serializer`).
|
||||
New features (e.g. adjustment layers) extend the XML schema only —
|
||||
the database schema never changes.
|
||||
- **The journal is produced by diffing, not by instrumenting commands.**
|
||||
@@ -65,7 +65,7 @@ sequence ──<tracklists>──▶ tracklist ──<tracks>──▶ track ─
|
||||
The clip row carries its timeline range (`<range in out/>`), media
|
||||
offset (`<media_in>`) and footage reference; effect chains are
|
||||
connection records inside the effect nodes' XML. Loading re-links
|
||||
these identities in two passes (see `oaknode::serializer`), so no
|
||||
these identities in two passes (see `oak-node::serializer`), so no
|
||||
join tables are needed. Timeline edits map to a handful of node rows:
|
||||
moving a clip touches its track and the clip; splitting adds one node
|
||||
and updates two; ripple edits touch the affected tracks and delete the
|
||||
@@ -85,7 +85,7 @@ removed clips.
|
||||
## Import / export
|
||||
|
||||
- Import: `.ove` / `.otio` / `.fcpxml` are parsed by their existing
|
||||
oakstorage backends and inserted as a new project row with
|
||||
oak-storage backends and inserted as a new project row with
|
||||
`kind = 'import'` journal entries.
|
||||
- Export: the in-memory serialization is written through the ove-xml
|
||||
or otio backend; nothing is read from or written to the database
|
||||
@@ -118,13 +118,13 @@ database is a single user-level SQLite file; PostgreSQL is selected with
|
||||
`Storage/Backend = "pg"` + `Storage/PgUrl`, or directly with an
|
||||
`oakdb+pg://` URI.
|
||||
|
||||
Database tests: `cargo test -p oakstorage` is green without PostgreSQL —
|
||||
Database tests: `cargo test -p oak-storage` is green without PostgreSQL —
|
||||
the SQLite suite always runs; the PG suite (`tests/database_pg_test.rs`)
|
||||
connects to a real server when `OAK_TEST_PG_URL` is set (e.g.
|
||||
`postgres://user:pass@host:5432/db`) and skips with a note otherwise.
|
||||
The URL should point at a dedicated test database: each test resets the
|
||||
four tables.
|
||||
|
||||
See also: [M10 oakstorage manual](plans/riir/M10-oakstorage.md),
|
||||
See also: [M10 oak-storage manual](plans/riir/M10-oak-storage.md),
|
||||
[M13 write-through plan](plans/riir/M13-storage-live.md),
|
||||
[project file reference](project-file-reference.md).
|
||||
|
||||
+3
-3
@@ -31,7 +31,7 @@
|
||||
```
|
||||
`FFMPEG_DIR` 无需手动导出:仓库内提交的 `.cargo/config.toml` 已按
|
||||
workspace 根的相对路径设置(`ffmpeg-sys-next` 的构建脚本读不了
|
||||
`.env`,这是唯一与机器无关的方式)。缺少它时 `oakffmpeg-link` 的
|
||||
`.env`,这是唯一与机器无关的方式)。缺少它时 `oak-ffmpeg-link` 的
|
||||
构建脚本会直接 panic:首次 `cargo build` 前请先跑一次
|
||||
`build-ffmpeg.sh`。
|
||||
|
||||
@@ -125,7 +125,7 @@ Windows 构建目标是 **x86_64-pc-windows-gnu**,使用 MSYS2 自带 Rust;
|
||||
| Windows | MSYS2 `mingw-w64-ucrt-x86_64-opencolorio` | 动态 | 设置 `OCIO_INSTALL_DIR=/ucrt64`、`OCIO_RS_LINK=dynamic` |
|
||||
|
||||
既没有 `bundled` 特性也没有 `OCIO_RS_ENABLE_REAL=1` 时,`ocio-sys`
|
||||
构建为 stub,所有色彩测试直接跳过。`oakrender` 无条件启用 bundled
|
||||
构建为 stub,所有色彩测试直接跳过。`oak-render` 无条件启用 bundled
|
||||
特性,因此在 Linux/macOS 上直接 `cargo build` 就会得到真实 OCIO。
|
||||
|
||||
## 打包
|
||||
@@ -145,7 +145,7 @@ tooling/package/build-pkg.sh # Arch Linux → .pkg.tar.zst
|
||||
|
||||
## 故障排查
|
||||
|
||||
- **`oakffmpeg-link` 报 `FFMPEG_DIR` panic** —— 先跑一次
|
||||
- **`oak-ffmpeg-link` 报 `FFMPEG_DIR` panic** —— 先跑一次
|
||||
`tooling/ffmpeg/build-ffmpeg.sh`;它安装到 `.cache/ffmpeg`,
|
||||
`.cargo/config.toml` 已指向该目录。
|
||||
- **IDE 构建失败(RustRover 等)** —— 无法向 cargo 注入环境变量的
|
||||
|
||||
@@ -14,7 +14,7 @@ Oak 的工程持久化在**数据库**(默认 SQLite,支持 PostgreSQL),
|
||||
payload 里。工程 = 节点图 + settings,没有第三种东西——节点粒度
|
||||
因此是封闭全集。
|
||||
- **单一序列化事实。** 库里的节点 XML 与 .ove 序列化器
|
||||
(`oaknode::serializer`)产出的是同一份文档。新功能(比如调整图层)
|
||||
(`oak-node::serializer`)产出的是同一份文档。新功能(比如调整图层)
|
||||
只需要扩展 XML schema,数据库 schema 永远不变。
|
||||
- **journal 由 diff 产生,不靠命令申报。** 每条 undoable 命令成功后,
|
||||
在内存里重新序列化工程并与上一状态逐节点比对;变化/新增/删除的
|
||||
@@ -54,7 +54,7 @@ sequence ──<tracklists>──▶ tracklist ──<tracks>──▶ track ─
|
||||
|
||||
clip 行自带时间线区间(`<range in out/>`)、媒体偏移(`<media_in>`)
|
||||
和素材引用;效果链是效果节点 XML 里的连接记录。加载时两阶段重连
|
||||
这些 identity(见 `oaknode::serializer`),所以不需要任何连接表。
|
||||
这些 identity(见 `oak-node::serializer`),所以不需要任何连接表。
|
||||
时间线编辑映射为少数节点行:移动 clip 触及它的 track 和 clip 本身;
|
||||
分割新增一个节点、更新两个;ripple 编辑触及受影响的 track 并删除
|
||||
被移除的 clip。
|
||||
@@ -69,7 +69,7 @@ clip 行自带时间线区间(`<range in out/>`)、媒体偏移(`<media_in
|
||||
|
||||
## 导入 / 导出
|
||||
|
||||
- 导入:.ove / .otio / .fcpxml 由既有 oakstorage 后端解析后,以
|
||||
- 导入:.ove / .otio / .fcpxml 由既有 oak-storage 后端解析后,以
|
||||
`kind = 'import'` 的 journal 行写为新工程行。
|
||||
- 导出:内存序列化经 ove-xml 或 otio 后端写出;除当前状态外不读写
|
||||
数据库。
|
||||
@@ -98,12 +98,12 @@ v1 假设单写者(SQLite `busy_timeout`,PG 行锁);多写者协作是
|
||||
`Storage/Backend = "pg"` + `Storage/PgUrl` 选择,或直接用
|
||||
`oakdb+pg://` 连接串 URI。
|
||||
|
||||
数据库测试:`cargo test -p oakstorage` 全绿无需 PostgreSQL——SQLite
|
||||
数据库测试:`cargo test -p oak-storage` 全绿无需 PostgreSQL——SQLite
|
||||
套件常驻运行;PG 套件(`tests/database_pg_test.rs`)在设置了
|
||||
`OAK_TEST_PG_URL`(如 `postgres://user:pass@host:5432/db`)时连接真实
|
||||
PG 全量运行,未设置则跳过并打印说明。该 URL 应指向专用测试库:每个
|
||||
测试会重置四张表。
|
||||
|
||||
另见:[M10 oakstorage 手册](plans/riir/M10-oakstorage.md)、
|
||||
另见:[M10 oak-storage 手册](plans/riir/M10-oak-storage.md)、
|
||||
[M13 写穿计划](plans/riir/M13-storage-live.md)、
|
||||
[工程文件格式参考](project-file-reference.md)。
|
||||
|
||||
Reference in New Issue
Block a user