https://github.com/swiftcoder/gfx-rs-sdl-emscripten-demo
Demo to work out the kinks in cross-compiling gfx-rs for the web
https://github.com/swiftcoder/gfx-rs-sdl-emscripten-demo
Last synced: about 1 month ago
JSON representation
Demo to work out the kinks in cross-compiling gfx-rs for the web
- Host: GitHub
- URL: https://github.com/swiftcoder/gfx-rs-sdl-emscripten-demo
- Owner: swiftcoder
- License: mit
- Created: 2017-10-08T21:59:34.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-08T22:24:59.000Z (over 7 years ago)
- Last Synced: 2025-01-29T23:41:45.788Z (3 months ago)
- Language: Rust
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 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 in your web browser of choice.