add networking, 3d improvements, reorganize src structure

This commit is contained in:
asrael 2026-01-17 22:52:36 -06:00
parent 39b604b333
commit 415d424057
122 changed files with 5358 additions and 721 deletions

23
server/build.rs Normal file
View file

@ -0,0 +1,23 @@
use std::env;
use std::path::PathBuf;
fn main() {
let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
let client_src = PathBuf::from(&manifest_dir).join("../client/src");
println!("cargo:rerun-if-changed=../client/src/net/pxl8_protocol.h");
println!("cargo:rerun-if-changed=../client/src/core/pxl8_types.h");
let bindings = bindgen::Builder::default()
.header(client_src.join("net/pxl8_protocol.h").to_str().unwrap())
.clang_arg(format!("-I{}", client_src.join("core").display()))
.use_core()
.rustified_enum(".*")
.generate()
.expect("Unable to generate bindings");
let out_path = PathBuf::from(env::var("OUT_DIR").unwrap());
bindings
.write_to_file(out_path.join("protocol.rs"))
.expect("Couldn't write bindings");
}