You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 12, 2025. It is now read-only.
This is a Rust library that contains bindings for garrysmod binary module creation that gives you complete access to the lua c api through bindings from dlopen.
4
-
It uses rust-dlopen
3
+
4
+
This is a Rust library that contains bindings for tinkering with the lua c api in garrysmod through bindings using rust-dlopen.
5
+
Can be used for either binary modules or just manual injections into gmod, like with [Autorun-rs](https://github.com/Vurv78/Autorun-rs)
5
6
6
7
More information on binary modules: https://wiki.facepunch.com/gmod/Creating_Binary_Modules
7
8
8
-
An example module made with rglua is below
9
+
An example module can be found below.
9
10
10
11
## How to build
11
12
12
-
Add this to your Cargo.toml
13
+
Add this to your Cargo.toml.
13
14
```toml
14
15
[lib]
15
16
crate-type = ["cdylib"] # This tells rust we want to create a .dll file that links to C code.
16
17
17
18
[dependencies]
18
-
rglua = { git = "https://github.com/Vurv78/rglua", branch = "main" }# This gives you all of the good stuff w/ bindings
Make sure you build to 32 bit if you want to use the module with srcds / on a local server.
@@ -24,11 +25,11 @@ Make sure you build to 32 bit if you want to use the module with srcds / on a lo
24
25
Also do this if you have never compiled to 32 bit, to get rustup to install 32 bit versions of everything you need
25
26
``rustup target add i686-pc-windows-msvc``
26
27
27
-
Note:
28
+
## Notes
28
29
The nature of this crate is super unsafe.
29
30
Using rust sort of defeats the purpose because of the sheer amount of times you'll have to convert strings from and to C, and call lua c api functions.
30
31
31
-
Also, I have never tested this outside of Windows and won't. If there are any issues on other platforms, I will gladly accept any PRs you may make but I can't help you myself.
32
+
Also, I have never tested this outside of Windows and won't. If there are any issues on other platforms, I will gladly accept any PRs you may make but I won't be able to help you myself.
0 commit comments