ddnet/src/mastersrv/Cargo.toml
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

37 lines
939 B
TOML

[package]
name = "mastersrv"
version = "0.0.1"
authors = ["heinrich5991 <heinrich5991@gmail.com>"]
edition = "2018"
publish = false
license = "Zlib"
[workspace]
[dependencies]
arrayvec = { version = "0.5.2", features = ["serde"] }
base64 = "0.13.0"
bytes = "1.1.0"
clap = { version = "2.34.0", default-features = false, features = [
"suggestions",
"wrap_help",
] }
csv = "1.1.6"
env_logger = "0.8.3"
headers = "0.3.7"
hex = "0.4.3"
ipnet = { version = "2.5.0", features = ["serde"] }
log = "0.4.17"
rand = "0.8.4"
serde = { version = "1.0.126", features = ["derive"] }
serde_json = { version = "1.0.64", features = [
"float_roundtrip",
"preserve_order",
"raw_value",
] }
sha2 = "0.10.0"
tokio = { version = "1.6.0", features = ["macros", "rt", "rt-multi-thread"] }
tokio-stream = { version = "0.1.8", features = ["net"] }
url = { version = "2.2.2", features = ["serde"] }
warp = { version = "0.3.1", default-features = false }