This commit is contained in:
2025-05-26 17:44:50 +03:00
parent 7f054e2904
commit 60fa98e240
24 changed files with 756 additions and 111 deletions

23
rapier/__build.c Normal file
View File

@@ -0,0 +1,23 @@
#include "god/c.h"
#include "god/ld.h"
#include "god/utils.h"
char *rapierLib = NULL;
void rapier_build(struct build_data b)
{
struct run_project cargo_build = run_new("cargo");
cargo_build.wd = "rapier";
run_add_arg(&cargo_build, "build");
run_add_arg(&cargo_build, "--release");
run_run(&cargo_build);
struct run_project cbindgen = run_new("cbindgen");
cbindgen.wd = "rapier";
run_add_arg(&cbindgen, "--config");
run_add_arg(&cbindgen, "cbindgen.toml");
run_add_arg(&cbindgen, "--crate");
run_add_arg(&cbindgen, "rapier_rtt");
run_add_arg(&cbindgen, "--output");
run_add_arg(&cbindgen, "../public/physics_gen.h");
run_run(&cbindgen);
rapierLib = "rapier/target/release/librapier_rtt.a";
}