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.
This commit is contained in:
2026-08-11 18:00:08 +08:00
parent 7b295b7661
commit 43003d0e33
+31
View File
@@ -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 <http://www.gnu.org/licenses/>.
#
# `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"