Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Quick Start

Create the project

cargo new --lib <your_project_name>

Setup your files

Edit cargo.toml as follows:

cargo.toml
[package]
name = "<your_project_name>"
version = "0.1.0"
edition = "2024"

[lib]
crate-type = ["cdylib"]

[dependencies]
engine = { git = "https://github.com/bloopgames/bloop-rs.git", tag = "0.0.22" }

[build-dependencies]
module-codegen = { git = "https://github.com/bloopgames/bloop-rs.git", tag = "0.0.22" }


Add a new file in src, build.rs:

srcbuild.rs
use module_codegen::FfiBuilder;

fn main() {
    FfiBuilder::new().write();
}

Edit lib.rs:

srclib.rs
use engine::prelude::*;

#[system_once]
fn hello() {
log::info!("hello!");
}

mod ffi {
use super::\*;
include!(env!("ECS_GENERATED_PATH"));
}

Download the bloop engine binary for your platform

https://github.com/bloopgames/bloop-rs/releases

Run the game

./bloop -g <path_to_your_project_dir>