qmi 0.1.4

An ECS with too much macro usage
Documentation
use qmi::QMI;
use serde::Serialize;

#[derive(Debug, Serialize)]
struct Position {
    x: i32,
    y: i32,
    z: i32,
}

#[derive(Debug, Serialize)]
struct Velocity {
    x: i32,
    y: i32,
    z: i32,
}

fn main() {
    let mut qmi = QMI::create_or_open("test.db");
    let player = qmi.spawn();
    let wall = qmi.spawn();
    qmi.insert(player, Position { x: 10, y: 0, z: 0 });
    qmi.insert(player, Velocity { x: 20, y: 0, z: 0 });
    qmi.insert(wall, Position { x: 0, y: 0, z: 0 });
    for item in qmi.query::<(Position,)>() {
        println!("{:?}", item);
    }
    for item in qmi.query::<(Position, Velocity)>() {
        println!("{:?}", item);
    }
    let _ = qmi.save();
}