hakoniwa-code-runner 0.2.1

Run code snippets in a variety of languages over network.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::{env, path::PathBuf};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let out_dir = PathBuf::from(env::var("OUT_DIR")?);
    let descriptor_path = out_dir.join("hakoniwa-code-runner.bin");

    let mut config = prost_build::Config::new();
    config.protoc_arg("--experimental_allow_proto3_optional");

    tonic_build::configure()
        .file_descriptor_set_path(descriptor_path)
        .compile_with_config(
            config,
            &["protos/languages.proto", "protos/runs.proto"],
            &["protos/"],
        )?;
    Ok(())
}