diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index e0d622364d..08b5a8be6b 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -16,6 +16,7 @@ jobs: matrix: target: - x86_64-unknown-linux-gnu + - x86_64-unknown-linux-gnu-ubuntu-24 - x86_64-unknown-linux-musl - aarch64-unknown-linux-gnu - x86_64-pc-windows-msvc @@ -27,6 +28,8 @@ jobs: target: x86_64-pc-windows-msvc - os: ubuntu-22.04 target: x86_64-unknown-linux-gnu + - os: ubuntu-24.04 + target: x86_64-unknown-linux-gnu-ubuntu-24 - os: ubuntu-22.04 target: x86_64-unknown-linux-musl - os: ubuntu-22.04-arm @@ -48,10 +51,19 @@ jobs: run: cargo fmt --check - name: Cargo build (Native TLS) + if: ${{ matrix.os != 'ubuntu-24.04' }} run: | cargo build --all --no-default-features --features=native-tls cargo clean + - name: Cargo build (AVIF Loading Support) + if: ${{ matrix.target == 'x86_64-unknown-linux-gnu-ubuntu-24' }} + run: | + sudo apt-get update + sudo apt-get install -y dav1d libdav1d-dev pkg-config + cargo build --all --no-default-features --features=load-avif + cargo clean + - name: Cargo build (Rust TLS) run: cargo build --all diff --git a/Cargo.lock b/Cargo.lock index 25c8de748a..f69b01b344 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -214,6 +214,19 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +[[package]] +name = "av-data" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fca67ba5d317924c02180c576157afd54babe48a76ebc66ce6d34bb8ba08308e" +dependencies = [ + "byte-slice-cast", + "bytes", + "num-derive", + "num-rational", + "num-traits", +] + [[package]] name = "av-scenechange" version = "0.14.1" @@ -257,7 +270,7 @@ dependencies = [ "arrayvec", "bitreader", "byteorder", - "fallible_collections", + "fallible_collections 0.5.1", "leb128", "log", ] @@ -451,6 +464,12 @@ dependencies = [ "allocator-api2", ] +[[package]] +name = "byte-slice-cast" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7575182f7272186991736b70173b0ea045398f984bf5ebbb3804736ce1330c9d" + [[package]] name = "bytecheck" version = "0.6.12" @@ -533,6 +552,16 @@ dependencies = [ "smallvec", ] +[[package]] +name = "cfg-expr" +version = "0.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9acd0bdbbf4b2612d09f52ba61da432140cb10930354079d0d53fafc12968726" +dependencies = [ + "smallvec", + "target-lexicon", +] + [[package]] name = "cfg-if" version = "1.0.4" @@ -1023,6 +1052,28 @@ dependencies = [ "matches", ] +[[package]] +name = "dav1d" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80c3f80814db85397819d464bb553268992c393b4b3b5554b89c1655996d5926" +dependencies = [ + "av-data", + "bitflags 2.10.0", + "dav1d-sys", + "static_assertions", +] + +[[package]] +name = "dav1d-sys" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3c91aea6668645415331133ed6f8ddf0e7f40160cd97a12d59e68716a58704b" +dependencies = [ + "libc", + "system-deps", +] + [[package]] name = "deranged" version = "0.5.5" @@ -1312,6 +1363,15 @@ dependencies = [ "zune-inflate", ] +[[package]] +name = "fallible_collections" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a88c69768c0a15262df21899142bc6df9b9b823546d4b4b9a7bc2d6c448ec6fd" +dependencies = [ + "hashbrown 0.13.2", +] + [[package]] name = "fallible_collections" version = "0.5.1" @@ -1667,6 +1727,15 @@ dependencies = [ "ahash 0.7.8", ] +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.12", +] + [[package]] name = "hashbrown" version = "0.14.5" @@ -2009,10 +2078,12 @@ dependencies = [ "bytemuck", "byteorder-lite", "color_quant", + "dav1d", "exr", "gif", "image-webp", "moxcms", + "mp4parse", "num-traits", "png", "qoi", @@ -2797,6 +2868,20 @@ dependencies = [ "pxfm", ] +[[package]] +name = "mp4parse" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63a35203d3c6ce92d5251c77520acb2e57108c88728695aa883f70023624c570" +dependencies = [ + "bitreader", + "byteorder", + "fallible_collections 0.4.9", + "log", + "num-traits", + "static_assertions", +] + [[package]] name = "mutate_once" version = "0.1.2" @@ -4872,6 +4957,19 @@ dependencies = [ "syn 2.0.114", ] +[[package]] +name = "system-deps" +version = "7.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c8f33736f986f16d69b6cb8b03f55ddcad5c41acc4ccc39dd88e84aa805e7f" +dependencies = [ + "cfg-expr", + "heck 0.5.0", + "pkg-config", + "toml", + "version-compare", +] + [[package]] name = "tap" version = "1.0.1" @@ -4889,6 +4987,12 @@ dependencies = [ "xattr", ] +[[package]] +name = "target-lexicon" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df7f62577c25e07834649fc3b39fafdc597c0a3527dc1c60129201ccfcbaa50c" + [[package]] name = "tauri-winres" version = "0.3.5" @@ -5492,6 +5596,12 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" +[[package]] +name = "version-compare" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c2856837ef78f57382f06b2b8563a2f512f7185d732608fd9176cb3b8edf0e" + [[package]] name = "version_check" version = "0.9.5" @@ -6120,6 +6230,7 @@ dependencies = [ "env_logger 0.11.8", "errors", "globset", + "image", "link_checker", "log", "mime", diff --git a/Cargo.toml b/Cargo.toml index a08be28b84..cb214a2e08 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,6 +42,7 @@ errors = { workspace = true } console = { workspace = true } utils = { workspace = true } # For feature forwarding +image = { workspace = true } link_checker = { workspace = true } search = { workspace = true } templates = { workspace = true } @@ -66,6 +67,7 @@ same-file = "1" default = ["rust-tls"] rust-tls = ["reqwest/rustls-tls", "link_checker/rust-tls", "templates/rust-tls"] native-tls = ["reqwest/default-tls", "link_checker/native-tls", "templates/native-tls"] +load-avif = ["image/avif-native"] indexing-zh = ["search/indexing-zh"] indexing-ja = ["search/indexing-ja"]