From 43003d0e3396f2c0e4a722c6eb96dcdac4b9f02b Mon Sep 17 00:00:00 2001 From: Mike Solar Date: Tue, 11 Aug 2026 18:00:08 +0800 Subject: [PATCH] build: root .cargo/config.toml enables the real OCIO bridge workspace-wide cargo test from the workspace root does not read crates/oakcommon/.cargo/config.toml, so ocio-sys silently built its stub bridge and oakcommon's OCIO tests failed with empty configs. Mirror the same env (OCIO_RS_ENABLE_REAL/OCIO_INSTALL_DIR/OCIO_RS_LINK) at the root; no manual environment variables are needed any more. --- .cargo/config.toml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 000000000..28d280c7a --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,31 @@ +# 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 . +# +# `ocio-sys` (the FFI layer behind `ocio-rs`) does not probe the system for +# OpenColorIO on its own: with no configuration it builds a *stub* bridge +# whose calls all fail. These environment variables make it link the real +# Homebrew OpenColorIO dylib: +# +# OCIO_RS_ENABLE_REAL - opt into the real (non-stub) bridge +# OCIO_INSTALL_DIR - prefix whose include/ and lib/ hold OpenColorIO +# OCIO_RS_LINK - Homebrew ships a dylib, so link dynamically +# +# See README.md "Build & test" for the bundled alternative. + +[env] +OCIO_RS_ENABLE_REAL = "1" +OCIO_INSTALL_DIR = "/opt/homebrew/opt/opencolorio" +OCIO_RS_LINK = "dynamic"