Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/raphamorim/sugarloaf
Sugarloaf is a simple cross-platform rendering engine.
https://github.com/raphamorim/sugarloaf
rio rio-terminal rust rust-lang
Last synced: 3 days ago
JSON representation
Sugarloaf is a simple cross-platform rendering engine.
- Host: GitHub
- URL: https://github.com/raphamorim/sugarloaf
- Owner: raphamorim
- License: mit
- Created: 2024-11-23T13:45:49.000Z (29 days ago)
- Default Branch: main
- Last Pushed: 2024-12-08T17:33:38.000Z (14 days ago)
- Last Synced: 2024-12-08T18:26:50.251Z (14 days ago)
- Topics: rio, rio-terminal, rust, rust-lang
- Language: Rust
- Homepage:
- Size: 10.2 MB
- Stars: 39
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sugarloaf
Note: sugarloaf has moved into [Rio terminal](https://github.com/raphamorim/rio) source code through cargo workspaces.
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.
```bash
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.