#rio #language #rio-terminal

sugarloaf

Sugarloaf is Rio rendering engine, designed to be multiplatform. It is based on WebGPU, Rust library for Desktops and WebAssembly for Web (JavaScript). This project is created and maintained for Rio terminal purposes but feel free to use it.

55 releases

new 0.2.12 Mar 30, 2025
0.2.8 Feb 28, 2025
0.2.2 Nov 23, 2024
0.1.3 Jul 27, 2024
0.0.12 Jul 21, 2023

#129 in Graphics APIs

Download history 229/week @ 2024-12-04 157/week @ 2024-12-11 77/week @ 2024-12-18 37/week @ 2024-12-25 60/week @ 2025-01-01 259/week @ 2025-01-08 225/week @ 2025-01-15 25/week @ 2025-01-22 170/week @ 2025-01-29 282/week @ 2025-02-05 424/week @ 2025-02-12 19/week @ 2025-02-19 256/week @ 2025-02-26 140/week @ 2025-03-05 82/week @ 2025-03-12 74/week @ 2025-03-19

554 downloads per month
Used in 3 crates (2 directly)

MIT license

5MB
34K SLoC

Sugarloaf

Sugarloaf is Rio rendering engine, designed to be multiplatform. It is based on WebGPU, Rust library for Desktops and WebAssembly for Web (JavaScript). This project is created and maintained for Rio terminal purposes but feel free to use it.

cargo run --example text

WASM Tests

Setup

Install wasm-bindgen-cli globally: cargo install wasm-bindgen-cli. wasm-bindgen-cli provides a test runner harness.

Running Tests

Run (in the root sugarloaf directory):

CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_RUNNER=wasm-bindgen-test-runner cargo test --target wasm32-unknown-unknown -p sugarloaf --tests

Flag explanation:

  • CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_RUNNER=wasm-bindgen-test-runner: Tells Cargo to use the test harness provided by wasm-bindgen-cli.
  • -p sugarloaf: Only run tests in the sugarloaf directory.
  • --tests: Only run tests; do not build examples. Many (possibly all) of the examples in sugarloaf/examples currently do not compile to WASM because they use networking.

Dependencies

~42–75MB
~1.5M SLoC