50f1bcb851 | ||
---|---|---|
gmod | ||
gmod-macros | ||
.editorconfig | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
LICENSE | ||
README.md | ||
rust-toolchain.toml |
README.md
⚙ gmod-rs
A swiss army knife for creating binary modules for Garry's Mod in Rust.
Example
Cargo.toml
[lib]
crate-type = ["cdylib"]
[dependencies]
gmod = "*"
lib.rs
#[macro_use]
extern crate gmod;
#[gmod13_open]
fn gmod13_open(lua: gmod::lua::State) -> i32 {
println!("Hello from binary module!");
0
}
#[gmod13_close]
fn gmod13_close(lua: gmod::lua::State) -> i32 {
println!("Goodbye from binary module!");
0
}