Crate sb3_decoder

Crate sb3_decoder 

Source
Expand description

§sb3-decoder

A Rust library for decoding Scratch 3.0 project files (.sb3) into Rust structs.

§Example

use sb3_decoder::prelude::*;

let mut decoder = DecoderBuilder::new()
    .use_file("path/to/project.sb3") // Open a file
    .use_bytes(include_bytes!("path/to/project.sb3")) // Or use bytes directly
    .build()
    .unwrap();
let project = decoder.decode().unwrap();

§Features

  • costume_png: Enable support for rasterizing SVG costumes to PNG.
  • costume_svg: Enable support for handling SVG costumes directly.

Note: The features costume_png and costume_svg are mutually exclusive; enable only one of them.

Re-exports§

pub use image;

Modules§

decoder
The decoder for decoding Scratch 3.0 project files (.sb3).
error
Error types for the application.
prelude
A prelude module to re-export commonly used items from the crate.
structs
The project and everything inside it, all rust-ified into structs.