"Somewhat Higher" level Rust Bindings
For now, this is:
- Only for
x86_64-pc-windows-msvcandx86_64-unknown-linux-gnu - Focused for Team Fortress 2 server plugin development
Use nightly Rust; the runtime crates declare Rust 1.99.0 as their minimum and use unstable language features. TF2-specific wrappers are opt-in:
[dependencies]
source_sdk_2013 = { version = "0.1.0-alpha.8", features = ["tf2"] }tf2_loadout also enables tf2 and adds the loadout re-applier. The internal
_test-support feature is for tests, not normal plugin builds. See the
SDK documentation for callback-scoped
Server access and the safety contracts of individual operations.
Ordinary SDK builds use the checked-in generated bindings and need neither Valve's C++ SDK nor libclang. To regenerate them intentionally from a repository checkout, follow the binding-generation instructions.
The separate Metamod:Source bindings
also build native C++17 plugin shells and require both supported Metamod source
checkouts. Their build inputs are not required by source_sdk_2013 itself.
- Modules that declare non-inline submodules are directory modules:
foo/mod.rswith the submodules infoo/, neverfoo.rsnext to afoo/directory. Modules without submodules stay plainfoo.rs. - Tests cover logic that is not obvious from reading it: parsing and protocol edge cases, non-trivial math or geometry, state machines, cleanup and panic containment, ABI layouts and regressions for bugs that were hit. Do not add tests for no-brainers, such as a constant, a table or allow-list restating its source, a one-line predicate, or an accessor, builder or derive.
For Valve's Source SDK 2013, see the SOURCE 1 SDK LICENSE. For AlliedModders' Metamod:Source, see their "zLib/libpng" license
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in rust_source_sdk_2013 by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.