ddnet/cmake
heinrich5991 dcd76fd3e1 Add support for Rust code in DDNet
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
```
2022-10-19 23:46:06 +02:00
..
toolchains Add support for Rust code in DDNet 2022-10-19 23:46:06 +02:00
BuildVulkanShaders.cmake CMake/BuildVulkanShaders: Fix check for GLSLANG_VALIDATOR_PROGRAM_FOUND 2022-05-15 14:22:38 +03:00
CheckAtomic.cmake Add CheckAtomic.cmake 2022-01-07 22:43:38 +08:00
checksummed_extra.txt Add some checksum functions to the client 2022-01-31 21:31:26 +01:00
Download_GTest_CMakeLists.txt.in Bump minimum CMake version from 2.8 to 2.8.12 2020-12-08 10:24:22 +01:00
FindAndroid.cmake Add Android build scripts 2021-08-24 12:18:20 +02:00
FindCrypto.cmake Emscripten support 2022-03-25 12:42:18 +01:00
FindCurl.cmake Add zlib1.dll for curl, add pnglibconf.h 2021-10-04 00:31:58 +02:00
FindDiscordSdk.cmake Support building universal binaries with discord 2021-12-20 16:07:00 +01:00
FindExceptionHandling.cmake Revert "Build our own drmingw with mingw" 2022-06-24 13:29:20 +02:00
FindFFMPEG.cmake Lib updates (untested) 2022-02-07 10:42:18 +01:00
FindFreetype.cmake Support running mac executables from build directory directly 2021-12-20 00:17:38 +01:00
FindGLEW.cmake Fix GLEW system lib linking on macOS 2021-12-18 00:36:33 +01:00
FindMiniupnpc.cmake Add UPnP support 2020-04-14 12:11:50 +02:00
FindMySQL.cmake Get rid of the MySQL C++ connector as a dependency 2021-02-24 17:34:08 +01:00
FindNotify.cmake Don't require notify on Linux 2020-04-30 15:05:49 +02:00
FindOgg.cmake Fix macOS CI 2020-06-17 13:37:36 +03:00
FindOpus.cmake Try to find external GLEW, pnglite and Wavpack 2018-02-12 23:29:45 +01:00
FindOpusfile.cmake Try to find external GLEW, pnglite and Wavpack 2018-02-12 23:29:45 +01:00
FindPNG.cmake Bundle libpng16.16.dylib for macOS 2022-07-28 16:42:52 +02:00
FindRust.cmake Add support for Rust code in DDNet 2022-10-19 23:46:06 +02:00
FindSDL2.cmake Prefer system SDL2 lib when -DPREFER_BUNDLED_LIBS=OFF 2021-12-20 00:17:38 +01:00
FindSQLite3.cmake Remove SQLite dependency on macOS, add DDNet-Server to client app 2021-12-25 19:05:15 +01:00
FindVulkan.cmake Add Vulkan backend 2022-03-21 12:39:51 +01:00
FindWavpack.cmake Add set_src to be more teeworlds compatible 2020-01-19 20:38:11 +01:00
FindWebsockets.cmake Lib updates (untested) 2022-02-07 10:42:18 +01:00
FindZLIB.cmake Emscripten support 2022-03-25 12:42:18 +01:00