ocio-rs
A pure Rust port of OpenColorIO (OCIO), the color management framework for visual effects and animation.
The crate is named ocio. It has no C++ dependency, and its CPU renderers
reproduce the results of OCIO built with SSE2 on every target.
Status
The current release is ocio 0.3.1. The port follows OCIO main
between v2.5.0 and v2.6.0 (up to upstream commit 93878f9, 2026-09-16),
and the library reports version 2.5.2: every library change of the 2.5.x
patch releases is ported. See UPSTREAM.md for the exact
upstream revision and PORTING.md for the architecture and the
numerics notes.
Done
- Configs: YAML parsing and writing, contexts and environment variables,
file rules, viewing rules, looks, named transforms, virtual displays,
built-in configs (up to
v4.0.0_aces-v2.0_ocio-v2.5), OCIOZ archives, processor caching and config merging. - Transforms and ops: the OCIO transform set (including the ACES 2
fixed functions, Apple Log 2 and RGB-to-HMJ), op optimization, and a CPU
processor working on interleaved RGBA
f32. - CPU numerics: the CPU renderers reproduce OCIO built with SSE2 (the way OCIO ships), emulated in portable Rust so the results are the same on every target, ARM included. They were checked bit for bit against PyOpenColorIO 2.6.0 on the built-in configs and the gamma, log, CDL, PQ, exposure / contrast and grading ops.
- File formats: the LUT and transform formats OCIO reads and writes
(CLF/CTF including SMPTE ST 2136-1,
.cube,.spi1d,.spi3d,.3dl, ...), and LUT baking. - App helpers: color space / display / view menus, the legacy viewing pipeline and mixing helpers.
- GPU shader text generation for GLSL, GLSL ES, Vulkan GLSL, HLSL, MSL,
Cg and OSL, plus WGSL (an ocio-rs addition for
wgpu/ WebGPU, see theocio::gpu::wgslmodule). All 270 OpenColorIO GPU unit tests are ported and run on the WGSL shaders through naga, and thewgpu-exampleprogram validates a full ACES 2.0 display transform on a real GPU against the CPU processor. ocio-rs has no GPU execution backend of its own: the shaders are meant for your renderer. - Command line tools: ports of the OCIO applications (see below).
Missing for OCIO v2.6.0
Upstream commits after the snapshot that are not ported yet (details and the
suggested order in UPSTREAM.md):
- Display and view aliases (#2341).
- The 2.6.0 built-in configs,
v5.0.0_aces-v2.1_ocio-v2.6(#2353, needs #2341). - Color interop ID functions (#2345).
- Config compatibility validation for HDR displays and the
ociocheck"Compatibility" section (#2344). - SMPTE CLF no-clamp
Rangewriting (#2349). - GPU shader correctness fixes (#2319).
Once these are ported, the library version moves to 2.6.0. A few known,
documented deviations from the C++ code (optimizer debug logging, the cycle
guard depth, CLF generated ids) are listed in
UPSTREAM.md.
Usage
Add the crate to your Cargo.toml:
[]
= "0.3"
use Config;
let config = create_from_file.unwrap;
let processor = config.get_processor.unwrap;
let cpu = processor.default_cpu_processor;
let mut pixel = ;
cpu.apply_rgb;
Command line tools
The tools workspace member (ocio-tools, not published) ports the OCIO
applications:
| Tool | Purpose |
|---|---|
ocioarchive |
Create, list and extract OCIOZ archives |
ociobakelut |
Bake a color transform into a LUT |
ociocheck |
Validate a config |
ociochecklut |
Apply a LUT file to a color |
ocioconvert |
Convert an image between color spaces |
ociolutimage |
Convert between LUTs and LUT images |
ociomakeclf |
Create a CLF file |
ociomergeconfigs |
Merge configs |
ocioperf |
Benchmark a transform |
ociowrite |
Write a config or transform to a file |
Run one with cargo run -p ocio-tools --release --bin ociocheck -- config.ocio.
Development
See CLAUDE.md for the testing conventions.
To execute the generated WGSL on a GPU and benchmark it against the CPU
processor, see the standalone wgpu-example.
License
BSD-3-Clause; see LICENSE.
ocio-rs is a derivative work of OpenColorIO: its code is translated from the C++ sources, and its built-in configs and test fixtures are copied from the OpenColorIO repositories. It is therefore distributed under the same license and keeps the upstream copyright notice, next to the copyright of the Rust port:
// SPDX-License-Identifier: BSD-3-Clause
// Copyright Contributors to the OpenColorIO Project.
// Copyright (c) 2026 Philippe Llerena.
The built-in configs and test fixtures copied verbatim from OpenColorIO remain
solely under the OpenColorIO Project copyright. The standalone
wgpu-example, which is not derived from
OpenColorIO, is Copyright (c) 2026 Philippe Llerena under the same
BSD-3-Clause terms.
ocio-rs is not affiliated with or endorsed by the OpenColorIO Project or the Academy Software Foundation.