all-is-cubes-server 0.9.0

Game server for the web edition of the recursive voxel game All is Cubes.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![allow(missing_docs)]

fn main() {
    // Make the build profile visible so that we can
    // embed/read a client built with the same profile.
    // We use cfg rather than env because `include_dir!()` forces us to do that anyway.
    // TODO: Replace `include_dir!()` with a build script.
    // Also, replace requiring the build to already exist with having this build script do it.
    println!(
        "cargo::rustc-env=AIC_CLIENT_BUILD_DIR={manifest}/../all-is-cubes-wasm/target/web-app-{profile_dir_name}",
        manifest = std::env::var("CARGO_MANIFEST_DIR").unwrap(),
        profile_dir_name = match &*std::env::var("PROFILE").unwrap() {
            "debug" => "dev",
            "release" => "release",
            other => panic!("unexpected PROFILE={other}")
        },
    );
}