Crates.io | sursface |
lib.rs | sursface |
version | 0.2.2 |
created_at | 2025-04-06 18:03:21.222207+00 |
updated_at | 2025-08-31 17:58:44.760147+00 |
description | Small cross-platform rendering library |
homepage | |
repository | https://github.com/boralg/sursface |
max_upload_size | |
id | 1623250 |
size | 110,039 |
Sursface is a small cross-platform rendering library designed to simplify the development of WebGPU applications, without compromising developer control.
It builds upon well-established APIs (wgpu
and winit
) to wrap over the core lifecycle operations of a graphical app, while re-exposing the full capabilities of these APIs unchanged. Sursface's goal is to enable writing plain WebGPU code with less hassle.
wasm32-unknown
Nix target, making your apps trivially embeddable into webpages.wgpu
.wgpu
as if sursface
wasn't there.To compile Sursface, ensure you have the following tools installed: Rust, Cargo, and optionally Nix (recommended).
Clone the repository:
git clone https://github.com/boralg/sursface.git
cd sursface
You can compile Sursface on your native platform using Cargo:
cargo build --release
To build a binary inside the Nix store, ready to run locally:
nix build .
Sursface supports cross-compilation to various targets. Here are some examples:
nix build .#x86_64-linux
nix build .#x86_64-windows
nix build .#wasm32-unknown
Releases consist of executable binaries of the examples. These are automatically built for each new release, and can be directly downloaded, unzipped, and ran, without any installation process.
Examples can also be run directly with cargo
:
cargo run --bin <example_name>
For instance:
cargo run --bin hello_triangle