Mochi :dango:
A game engine oriented toward low power mobile linux phones/tablets. It's written in Rust and uses Gtk and Cairo! All drawing is done with an Cairo Context that this library has extended to do some really common graphics operations.
Features
- atlases
- animated sprites
Example

[dependencies]
mochi = "0.0"
init;
let img_mochi = image_from_resource;
let img_mochi_eaten = image_from_resource;
run_game;
How to build a game
Mochi works off resources put into a Glib resource file. This is pretty simple to do. Just make an xml file that references your images:
ball.png
paddle.png
Build into a gresource file that Glib can understand:
glib-compile-resources game.xml
Inline the bytes of the game.gresource into your code during init:
init;
Now your game has everything it needs in it's binary! The images can be acquired as needed using the resource paths you setup.
let img_ball = image_from_resource;
License
This project is 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
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in mochi by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.