36 lines
717 B
C++
36 lines
717 B
C++
#include "helper.h"
|
|
#include "c.h"
|
|
#include "ld.h"
|
|
#include "tier1/utlstring.h"
|
|
|
|
|
|
CUtlString rapier_lib;
|
|
DECLARE_BUILD_STAGE(rapier)
|
|
{
|
|
if (CommandLine()->CheckParam("-norust"))
|
|
return 0;
|
|
rapier_lib = CUtlString("rapier/target/%s/release/librapier_rtt.a",szTarget.GetString());
|
|
V_printf("%s\n",rapier_lib.GetString());
|
|
CUtlVector<CUtlString> cargo_args = {
|
|
"build",
|
|
"--release",
|
|
"--target",
|
|
szTarget
|
|
};
|
|
runner->Run("cargo", "rapier", cargo_args);
|
|
runner->Wait();
|
|
|
|
CUtlVector<CUtlString> cbindgen_args = {
|
|
"--config",
|
|
"cbindgen.toml",
|
|
"--crate",
|
|
"rapier_rtt",
|
|
"--output",
|
|
"../public/physics_gen.h",
|
|
};
|
|
runner->Run("cbindgen", "rapier", cbindgen_args);
|
|
runner->Wait();
|
|
|
|
return 0;
|
|
};
|