gmod-rs fork
Go to file
William Venner 50f1bcb851 Improve README 2021-10-20 22:44:59 +01:00
gmod Improve README 2021-10-20 22:44:59 +01:00
gmod-macros Publish 2021-09-17 18:08:22 +01:00
.editorconfig Initial commit 2021-09-09 21:50:58 +01:00
.gitignore Initial commit 2021-09-09 21:50:58 +01:00
Cargo.lock Clean up the debug related functions 2021-10-10 20:04:12 +01:00
Cargo.toml Initial commit 2021-09-09 21:50:58 +01:00
LICENSE Initial commit 2021-09-09 21:50:58 +01:00
README.md Improve README 2021-10-20 22:44:59 +01:00
rust-toolchain.toml Initial commit 2021-09-09 21:50:58 +01:00

README.md

crates.io

docs.rs

⚙ 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
}