32 lines
627 B
C++
32 lines
627 B
C++
#include "helper.h"
|
|
#include "c.h"
|
|
#include "ld.h"
|
|
#include "tier1/utlstring.h"
|
|
|
|
|
|
CUtlString rapier_lib;
|
|
int rapier_build()
|
|
{
|
|
CUtlVector<CUtlString> cargo_args = {
|
|
"build",
|
|
"--release",
|
|
"--target",
|
|
"x86_64-unknown-linux-gnu"
|
|
};
|
|
IRunner::Run("cargo", "rapier", cargo_args);
|
|
|
|
CUtlVector<CUtlString> cbindgen_args = {
|
|
"--config",
|
|
"cbindgen.toml",
|
|
"--crate",
|
|
"rapier_rtt",
|
|
"--output",
|
|
"../public/physics_gen.h",
|
|
};
|
|
IRunner::Run("cbindgen", "rapier", cbindgen_args);
|
|
rapier_lib = "rapier/target/x86_64-unknown-linux-gnu/release/librapier_rtt.a";
|
|
|
|
return 0;
|
|
};
|
|
DECLARE_BUILD_STAGE(rapier, rapier_build);
|