Vurv78 / rglua

Toolkit for garrysmod development with the source sdk and lua c api

Home Page:https://docs.rs/rglua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸŒ‘ rglua cratesio Build Status License github/Vurv78

This is a crate that allows interop with the (g)luajit c api as well as the source sdk through libloading and vtable bindings. You can then use these for binary modules or manually injected code, like with Autorun-rs

More information on binary modules can be found on the garrysmod wiki: Creating Binary Modules and examples can be found here.

Usage

If you are targeting 32 bit make sure to install the toolchain and build to it:

rustup target add i686-pc-windows-msvc
cargo build --target=i686-pc-windows-msvc

Comparison

There are actually a decent amount of libraries out there for gmod development. Here's a comparison and why you could use this one.

Library rglua rust-glua-sys gmod-rs gmrs
Full Lua C Api Bindings βœ”οΈ ❌ ❌ ❌
On Crates.io βœ”οΈ ❌ βœ”οΈ ❌
Proc Macros βœ”οΈ ❌ βœ”οΈ βœ”οΈ
Interfacing w/ Source SDK βœ”οΈ ❌ ❌ ❌
Returning Result<> from functions βœ”οΈ ❌ ❌ βœ”οΈ
Can be used on stable βœ”οΈ βœ”οΈ ❌ βœ”οΈ
Real world examples βœ”οΈ ❌ 〰️ βœ”οΈ
Linux / OSX Support βœ”οΈ ❌ βœ”οΈ βœ”οΈ
Github Stars 😒 πŸ‘ πŸ‘‘ πŸ€·β€β™‚οΈ

You can help with that last one πŸ˜‰

Acknowledgements

This is heavily based off of garrysmod_common, in how we export the lua_shared functions and trying to replicate everything from the Lua C Api.

About

Toolkit for garrysmod development with the source sdk and lua c api

https://docs.rs/rglua

License:MIT License


Languages

Language:Rust 100.0%