Show HN: A game engine that transpiles your scripts to Rust for native perf
1 points
4 hours ago
| 0 comments
| github.com
| HN
Hey all, I've been developing Perro Engine, a unique game engine written in Rust that allows you to use C#, TypeScript, or the engine DSL: Pup, to script your game, and the engine will transpile your scripts into Rust modules that interop with the engine without running different runtimes, interpreters, or VMs.

Doing this essentially gives you much more performance than a scripting layer since there's no bytecode having to be decoded and no runtime bloat.

It also allows for each language to support all the same features and access to the engines internal APIs because you don't have to worry about them ACTUALLY being implemented in that language and interfacing with the Rust core, it just IS Rust and it's just calling native functions in the api.

Let it be known that of course this means it is not REALLY C# or TypeScript that's unning, it's just the familiar syntax to avoid writing game logic in Rust if you don't want to. If you need to for performance reasons (like very specifically managing memory allocaiton, clones, borrows) then you are able to write a Rust script natively as if it was any other game script, it just needs to follow the structure and conventions the engine expects.

I'd appreciate any feedback and am happy to answer any questions, and if you don't mind starring the repo that'd be great!

No one has commented on this post.