druid-wasm-examples icon indicating copy to clipboard operation
druid-wasm-examples copied to clipboard

Druid examples arranged for easy compilation with wasm-pack

Druid examples in WASM

This repository collects most of the Druid examples and arranges them (with very slight modifications) for building with wasm-pack and serving with a web server.

To get started first check out the rust wasm tutorial.

Building

You will need cargo and wasm-pack for building the code and a simple server like http for serving the web pages.

First build the examples with

> wasm-pack build --target web

Then run the server from the root directory with

> http

which should start a server with our examples served in individual html documents.

Finally point your browser to the appropriate localhost url (usually http://localhost:8000) and you should see a page with a list of links, one for each example.

Status

Examples that are known to be working (on par with native) are marked below.

Acknowledgements

The examples (files in the examples module) in this repository are taken (mostly unmodified) from the druid library, so all credit goes to the druid developers.