ddnet/src
bors[bot] b21ba35225
Merge #5599
5599: Add support for Rust code in DDNet r=def- a=heinrich5991

The glue is done using the [cxx crate](https://cxx.rs/) on the Rust side.

As a proof-of-concept, only a small console command (`rust_version`) printing the currently used Rust version was added.

You can generate and open the Rust documentation using `DDNET_TEST_NO_LINK=1 cargo doc --open`.

You can run the Rust tests using `cmake --build <build dir> --target run_rust_tests`, they're automatically included in the `run_tests` target as well.

Rust tests don't work on Windows in debug mode on Windows because Rust cannot currently link with the debug version of the C stdlib on Windows: https://github.com/rust-lang/rust/issues/39016.

---

The stuff in `src/rust-bridge` is generated using
```
cxxbridge src/engine/shared/rust_version.rs --output src/rust-bridge/engine/shared/rust_version.cpp --output src/rust-bridge/engine/shared/rust_version.h
cxxbridge src/engine/console.rs --output src/rust-bridge/cpp/console.cpp --output src/rust-bridge/cpp/console.h
```

Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2022-11-06 21:40:48 +00:00
..
android Refactor usages of sha256_str 2022-10-15 18:06:45 +02:00
antibot Merge pull request #3961 from fokkonaut/pr-antibot 2021-12-19 19:33:56 +01:00
base Merge #5599 2022-11-06 21:40:48 +00:00
engine Merge #5599 2022-11-06 21:40:48 +00:00
game Merge #5599 2022-11-06 21:40:48 +00:00
macos Huge variable naming format 2022-07-08 18:01:29 +02:00
mastersrv Add support for Rust code in DDNet 2022-10-19 23:46:06 +02:00
rust-bridge Add support for Rust code in DDNet 2022-10-19 23:46:06 +02:00
steam Huge variable naming format 2022-07-08 18:01:29 +02:00
test Merge #5599 2022-11-06 21:40:48 +00:00
tools Fix misspellings 2022-10-25 13:51:56 -03:00