wasm_game_lib/lib.rs
1//! Welcome!
2//!
3//! # This project is discontinued.
4//!
5//! Please note that this was an experimental game library made while I was learning Rust.
6//! Feel free to request the ownership of the crate on crates.io at [mubelotix@gmail.com](mailto:mubelotix@gmail.com).
7//!
8//! The goal of this crate is to help you to make great 2d games running in web browsers.
9//! This crate is inspired by SFML.
10//!
11//! # How to use
12//!
13//! Getting started with Wasm may be painful.
14//! That's why I created a simple template you can use to quickly start wasm development.
15//!
16//! First, you need to install `wasm-pack` and `cargo-generate`.
17//!
18//! ```sh
19//! cargo install wasm-pack
20//! cargo install cargo-generate
21//! ```
22//!
23//! Then, use cargo-generate to generate a new crate (modify the name at the end of the command):
24//!
25//! ```sh
26//! cargo generate --git https://github.com/Mubelotix/wasm-game-lib-template --name amazing-game
27//! ```
28//!
29//! Your game is now generated and is ready to be compiled with the command:
30//!
31//! ```sh
32//! wasm-pack build --target=web
33//! ```
34//!
35//! To test you game, you need a web server.
36//! Open a terminal and go to your project directory.
37//! Then, launch the webserver.
38//!
39//! ```sh
40//! cd pkg/
41//! python3 -m http.server 8001
42//! ```
43//!
44//! Your game is now testable on [http://localhost:8001](http://localhost:8001)!
45//!
46//! In case this does not work, make sure you followed every instruction and [contact me](mailto:mubelotix@gmail.com).
47
48#![warn(missing_docs)]
49
50pub mod graphics;
51pub mod inputs;
52/// You will need this module for various things.
53#[macro_use]
54pub mod system;