lunaria-api 0.2.0

A Rust API client for the video game Lunaria
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::path::PathBuf;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let proto_path = PathBuf::from("protobufs");

    let build_server = std::env::var("CARGO_FEATURE_SERVER").is_ok();

    tonic_build::configure()
        .build_server(build_server)
        .compile(
            &["lunaria/v1/lunaria.proto", "lunaria/v1/game.proto"],
            &[proto_path.to_str().unwrap()],
        )?;

    Ok(())
}