unrust / uni-app
This library is a part of Unrust, a pure rust native/wasm game engine. This library provides a native/wasm compatibility layer for following components :
- Window creation
- Input (mouse + keyboard)
- File system (local + http[s], ready-only)
Usage
[]
= "0.4.*"
extern crate uni_app;
Build
As web app (wasm32-unknown-unknown)
Install wasm32 target :
rustup target install wasm32-unknown-unknown
Compile the demo with
wasm-pack build examples
This creates a wasm package in examples/pkg
Run the demo with
cd www
npm install
npm run start
Open your browser at http://localhost:8080/
As desktop app (native-opengl)
Run it from the www/ directory to be able to load the test.txt file :
cd www && cargo run --example basic --release
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
You can contribute to this library through pull requests. If you do so, please update the CHANGELOG.md and CREDITS.md files. If you provide a new feature, consider adding an example as a tutorial/showcase.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.