Sugarloaf

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

Desktop rect

bash cargo run --example rect

Desktop text

bash cargo run --example text

Examples

| Demo sugarloaf 1 | Demo Sugarloaf wasm | | ----------- | ----------- | | Demo Rect | Demo sugarloaf 3 | | Demo sugarloaf 4 | Demo sugarloaf 5 | | Demo sugarloaf 6 | |

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: