Writing a .NET Garbage Collector in C# – Part 1
2 comments
·February 24, 2025etra0
MrLeap
Interesting. You and I are reasonably adjacent it seems like. I've been cooking up a pleasant way to enable modding support in games I make.
I have this idea in my head that I want this system to work even all the way up to letting people host their own servers that run their own mods without allowing them the power to do nefarious things to the clients who connect. This means a scripting language layer, most commonly LUA. For a bunch of reasons, many are vibes based, I've decided to go with a lisp instead.
After doing a bit of research I found this repo to use as a starting point.
https://github.com/microsoft/schemy
Checks all my boxes. Big ones being no new dependencies and not many lines of code. It took just a few minutes to get a handle on the whole thing end-to-end. I'm working right now on setting a little reflection metaprogramming that would expose any functions that I put an attribute above to the lisp layer.
There's a few things to delete so it's safe to serialize over the wire, but it looks like it'll enable what I'm after. I hope I can trust my serializers :D
What kinds of mods do you want to make?
I'm very much looking up to NativeAOT on C#, being able to compile to native dlls is very attractive to me, as I'd love to do (offline) game modding. I currently use Rust and it works quite well, but it's never too late to wish for a more 'forgiving' language for smaller projects!