4 stable releases

1.0.3 Mar 26, 2022

#853 in Graphics APIs

Download history 4/week @ 2024-02-25 56/week @ 2024-03-31

56 downloads per month

MIT/Apache

125KB
3K SLoC

WASM WebGL

The WASM Bus for using WebGL on tokera.sh

Example

use wasm_bus_webgl::prelude::*;

fn main() -> Result<(), WebGlError> {
    let context = WebGl::new()?;

    context.clear_color(0.0, 0.0, 0.4, 1.0);
    context.clear(BufferBit::Color);

    std::thread::sleep(std::time::Duration::from_secs(4));

    Ok(())
}

Testing

You can test your WASI program by uploading it to wapm.io and then heading over to the Tokera Shell

https://tokera.sh

Dependencies

~3.5–5.5MB
~97K SLoC