feat(imaging): default to pure-Rust codecs
Some checks failed
CI / rust-skia (Rust only) (push) Successful in 2m51s
CI / required (push) Failing after 3m23s

This commit is contained in:
2026-08-13 11:24:38 +00:00
parent e16ad04dbd
commit 25fdffbd3b
25 changed files with 124 additions and 103 deletions

View File

@@ -8,12 +8,12 @@ repository.workspace = true
description = "Optional Skia image decoder for the MetaCrate LibreMetaverse rewrite"
[features]
default = []
default = ["rust-skia"]
skia = ["dep:skia-safe"]
rust-skia = ["dep:image-webp", "dep:skia-rs-codec", "skia-rs-codec/gif", "skia-rs-codec/jpeg", "skia-rs-codec/png"]
[dependencies]
libremetaverse-imaging = { version = "0.0.1", path = "../libremetaverse-imaging" }
libremetaverse-imaging = { version = "0.0.1", path = "../libremetaverse-imaging", default-features = false }
libremetaverse-types = { version = "0.0.1", path = "../libremetaverse-types" }
image-webp = { version = "=0.2.4", optional = true }
skia-rs-codec = { version = "=0.3.0", default-features = false, optional = true }

View File

@@ -6,7 +6,8 @@ exposes a `skia-safe` type and never discovers or links Skia.
## Features and formats
The default feature set has no Skia dependency. `SkiaTextureCodec::decode` and
The default feature set enables the pure-Rust `rust-skia` backend and has no
native Google Skia dependency. `SkiaTextureCodec::decode` and
`RustSkiaTextureCodec::decode` return a typed `InvalidOperation` error when
their respective feature is disabled, while conversion from the checked
project-owned `backend::SKBitmap` remains available for tests and callers that
@@ -15,7 +16,7 @@ already own decoded pixels.
For a fully Rust implementation, enable:
```sh
cargo test -p libremetaverse-imaging-skia --no-default-features --features rust-skia
cargo test -p libremetaverse-imaging-skia
```
`rust-skia` pins [`skia-rs-codec` 0.3.0](https://github.com/rust-skia/skia-rs)

View File

@@ -1,9 +1,9 @@
//! Optional Skia imaging adapter corresponding to `LibreMetaverse.Imaging.Skia`.
//!
//! Enable `skia` or the fully native-Rust `rust-skia` alternative for bounded
//! `BMP`, `GIF`, `ICO`, `JPEG`, `PNG`, `WBMP`, and `WebP` decoding.
//! The default build remains inert. See the crate README for native cache,
//! source-build, licensing, and cross-platform prerequisite details.
//! The default `rust-skia` backend provides bounded pure-Rust `BMP`, `GIF`,
//! `ICO`, `JPEG`, `PNG`, `WBMP`, and `WebP` decoding. Enable the optional
//! `skia` feature when native Google Skia is specifically required. See the
//! crate README for native cache, source-build, licensing, and deployment details.
extern crate self as libremetaverse_imaging_skia;