From 1c39341f96f68d54ef7bc333316c38be02d7088c Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Sun, 15 Nov 2026 18:24:32 -0500 Subject: [PATCH] Forward opt-in threading to rav1e encoder dependencies --- crates/image-codecs/Cargo.toml | 2 ++ crates/video/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/image-codecs/Cargo.toml b/crates/image-codecs/Cargo.toml index be5cd57e1..40a1e50f2 100644 --- a/crates/image-codecs/Cargo.toml +++ b/crates/image-codecs/Cargo.toml @@ -13,6 +13,8 @@ workspace = true [features] corpus = [] default = [] +# Opt in to threaded AVIF encoding without enabling AVIF (or assembly) by itself. +threads = ["ravif?/threading", "rav1e?/threading"] avif = ["image/avif", "dep:ravif", "dep:rav1e", "dep:avif-serialize"] heif = ["dep:craft-heif"] # AVIF decode: craft-video's clean-room pure-Rust AV1 decoder. Native targets only (on wasm32 a diff --git a/crates/video/Cargo.toml b/crates/video/Cargo.toml index dae21e5b1..bb771e419 100644 --- a/crates/video/Cargo.toml +++ b/crates/video/Cargo.toml @@ -57,7 +57,7 @@ av1-encode = ["craft-media/isobmff"] # Tiled AV1 fallback for frames that exceed the clean-room encoder's single-tile limits. av1-large-encode = ["av1-encode", "dep:rav1e"] # Decode and encode across worker threads (rayon) in the codecs that support it. -threads = ["dep:rayon"] +threads = ["dep:rayon", "rav1e?/threading"] [dependencies] craft-media = { workspace = true }