Skip to content

marchc1/gmod-module-base-cs

Repository files navigation

gmod-module-base-cs

This is an attempt to replicate what gmod-module-base does with ahead-of-time compiled C#. It includes the same "headers" that the C++ project does, along with some DllImport's for tier0 library functions I found useful while debugging.

I don't know if I'll get anywhere with this project yet, still experimenting.


Building

  • Set the GARRYSMOD_INSTALL_DIR system environment or remove the post-publish step. See Expectation #3.
  • Right click on the example project/whatever project you make
  • Click "Publish"
  • Select the publish profile you want to use
  • Publish

Expectations

  • Everything here is currently just a proof of concept I did out of boredom.
  • It only really supports win64. The publish profiles exist for OS X (lol) and Linux, but I haven't tested them and the post-publish instructions for copying things over doesn't exist yet.
    • It should support win32 if the project was using .NET 9. I may upgrade the project later for that.
  • This expects an environment variable for GARRYSMOD_INSTALL_DIR, pointing towards the GarrysMod folder without a trailing slash. Post-publish copy won't work otherwise. If you don't want to set that variable, just remove that step.
  • Some ILuaBase functionality exists.
  • You are limited to the same limitations Native AOT has.

About

An experiment to create a C# native interface for Garry's Mod binary modules

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published