ddnet/src/engine
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
..
client Merge #5599 2022-11-06 21:40:48 +00:00
docs Merge #5918 2022-10-09 13:53:05 +00:00
external Update zlib to version 1.2.13 2022-10-14 14:53:24 +02:00
gfx Fix misspellings 2022-10-25 13:51:56 -03:00
server Merge #5599 2022-11-06 21:40:48 +00:00
shared Merge #5599 2022-11-06 21:40:48 +00:00
antibot.h Forgot to add target here 2021-07-22 00:22:12 +02:00
Cargo.toml Add support for Rust code in DDNet 2022-10-19 23:46:06 +02:00
client.h Constify snap more (inspired by upstream) 2022-10-09 15:12:12 +02:00
config.h Implement "reset" command 2021-12-27 01:13:11 +01:00
console.h Add support for Rust code in DDNet 2022-10-19 23:46:06 +02:00
console.rs Add support for Rust code in DDNet 2022-10-19 23:46:06 +02:00
demo.h Allow spectator mode to be changed while demo is paused 2022-08-28 17:52:49 +02:00
discord.h Only announce servers using Steam/Discord integration which are registered 2022-10-09 16:16:54 +02:00
editor.h Use bool for Load, Save, Append result, true on success 2022-11-03 20:17:06 +01:00
engine.h Mark virtual function as override using a script: 2022-05-17 23:47:32 +02:00
favorites.h Allow multiple addresses per server in the serverbrowser 2022-07-10 16:52:07 +02:00
friends.h Run clang-format 2020-09-26 21:50:15 +02:00
ghost.h Organize engine-shared includes 2022-05-29 20:02:22 +02:00
graphics.h Let CKernel clean-up. Use unused CSound::Shutdown 2022-09-16 16:50:19 +02:00
input.h Let CKernel clean-up. Use unused CSound::Shutdown 2022-09-16 16:50:19 +02:00
kernel.h Fix misspellings 2022-10-25 13:51:56 -03:00
keys.h Add joystick support to engine 2022-06-13 20:40:36 +02:00
lib.rs Add support for Rust code in DDNet 2022-10-19 23:46:06 +02:00
map.h Huge variable naming format 2022-07-08 18:01:29 +02:00
message.h Run clang-format 2020-09-26 21:50:15 +02:00
rust.h Add support for Rust code in DDNet 2022-10-19 23:46:06 +02:00
server.h Remove unused DemoRecorder_IsRecording method 2022-08-25 17:57:03 +02:00
serverbrowser.h Remove support for legacy 64 player info protocol 2022-10-12 16:12:02 +02:00
sound.h Let CKernel clean-up. Use unused CSound::Shutdown 2022-09-16 16:50:19 +02:00
sqlite.h Remove useless typedef in c++ 2022-06-25 21:05:54 +02:00
steam.h Only announce servers using Steam/Discord integration which are registered 2022-10-09 16:16:54 +02:00
storage.h Add IStorage::FindFiles to find all files with a specific name 2022-11-05 15:42:39 +01:00
textrender.h (A bit) safer interface for text containers 2022-07-08 19:19:37 +02:00
updater.h Overhauled job system 2017-11-23 15:47:38 +01:00
uuid.h Make sure headers compile standalone 2020-09-26 21:50:27 +02:00
warning.h Add block list for drivers 2020-11-05 21:07:14 +01:00