Skip to content

swiftcoder/gfx-rs-sdl-emscripten-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What?

A port of the gfx-rs triangle demo, with the necessary scafolding to cross-compile to the web via emscripten.

Why?

Although I've been able to run simple rust programs using sdl2 under emscripten, I have yet to successfully run an OpenGL-based program. This repository is intended to capture ongoing efforts to debug the process.

How?

To build the sample, you will need to install a recent rust, and the portable emscripten SDK. To display the sample in a web browser, install nodejs and then npm install http-server -g.

To run the sample on desktop, a simple cargo run will suffice.

To run the sample in a browser, run make web to build, then run make serve to setup a web server, and finally load http://localhost:8080 in your web browser of choice.

About

Demo to work out the kinks in cross-compiling gfx-rs for the web

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published