#rendering-engine #terminal #web-gpu #multi-platform #rio #cross-platform

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.

47 releases

0.2.2 Nov 23, 2024
0.1.17 Oct 6, 2024
0.1.3 Jul 27, 2024
0.0.36 Mar 14, 2024
0.0.12 Jul 21, 2023

#9 in Rendering engine

Download history 415/week @ 2024-08-22 148/week @ 2024-08-29 365/week @ 2024-09-05 259/week @ 2024-09-12 327/week @ 2024-09-19 161/week @ 2024-09-26 244/week @ 2024-10-03 41/week @ 2024-10-10 20/week @ 2024-10-17 12/week @ 2024-10-24 15/week @ 2024-10-31 72/week @ 2024-11-07 269/week @ 2024-11-14 398/week @ 2024-11-21 153/week @ 2024-11-28 382/week @ 2024-12-05

1,257 downloads per month
Used in 3 crates (2 directly)

MIT license

4.5MB
38K 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

~43–77MB
~1.5M SLoC