mirror of
https://github.com/Nexoniarz/YAPF.git
synced 2026-11-02 20:44:27 +00:00
| Filename | Latest commit message | Latest commit date |
|---|---|---|
- yapf_encode() / yapf_free_buffer(): encode to memory; yapf_save uses it - yapf.c also compiles as C++ - `yapf compare`: size and decode speed of the original format vs YAPF, with a lossless check - bindings with tested examples: C++ (header-only), C# (P/Invoke), Rust (crate, builds the C code), Go (cgo), Java (FFM API, Java 22+), Zig (@cImport), LuaJIT (FFI), TypeScript types for the JS port; Python now encodes in memory - docs/LANGUAGES.md and examples/ with measured results - KDE Dolphin thumbnail plugin (KF6, CMake) - README: honest status for Photoshop / VS Code / Figma (not run in the apps yet) and macOS (cross-compiled only), platform table Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
| .. | ||
| examples | ||
| src | ||
| build.rs | ||
| Cargo.toml | ||
| README.md | ||
YAPF for Rust
A crate that compiles the C library with the cc crate, so cargo build
works on Windows, macOS and Linux with no extra steps.
[dependencies]
yapf = { git = "https://github.com/Nexoniarz/YAPF" }
let img = yapf::Image::load("texture.yapf")?; // or Image::decode(&bytes)
println!("{}x{}, {} channels", img.width, img.height, img.channels);
yapf::Image::new(256, 256, 4, rgba).save("out.yapf")?; // or .encode() → Vec<u8>
Example: cargo run --release --example demo -- ../../other/YAPF.YAPF ·
tests: cargo test.