gmbc
gmbc copied to clipboard
Lua bytecode loader for Garry's Mod servers written in Rust
gmbc
It's a bytecode loader for gmod servers
Usage
local bytecode = string.dump(function() print "my secrit code" end)
-- 10 minutes later
require("gmbc")
gmbc_load_bytecode(bytecode)()
Building
Dependencies
- Rust (https://www.rust-lang.org/tools/install)
- Note: Rust may depend on a separate compiler on your platform, such as Visual Studio, GCC, etc:
- Windows: Install Visual Studio 2019
- Linux: Install
gcc-multilib
- Note: Rust may depend on a separate compiler on your platform, such as Visual Studio, GCC, etc:
- (Optional) Additional Rust toolchains for compiling 32-bit binaries:
rustup target add i686-pc-windows-msvc # Windows
rustup target add i686-unknown-linux-gnu # Linux
Windows
git clone https://github.com/willox/gmbc
cd gmbc
cargo build --release --target=i686-pc-windows-msvc # 32-bit
cargo build --release --target=x86_64-pc-windows-msvc # 64-bit
You can then find gmbc.dll in ./target/<target>/release. Rename it to gmsv_gmbc_win32.dll or gmsv_gmbc_win64.dll and you are done.
Linux
git clone https://github.com/willox/gmbc
cd gmbc
cargo build --release --target=i686-unknown-linux-gnu # 32-bit
cargo build --release --target=x86_64-unknown-linux-gnu # 64-bit
You can then find gmbc.so in ./target/<target>/release. Rename it to gmsv_gmbc_linux.dll or gmsv_gmbc_linux64.dll and you are done.