Skip to content

Navigation Menu

Sign in
Sign up

The choice of C not Rust for the transpile target #27

Answered by VictorTaelin
ken-okabe asked this question in Q&A
Discussion options

Just from curiosity, I wonder what's the reason would be to have chosen C not Rust as the transpile/compile target language because the HVM itself is written in Rust.

Is Rust redundantly too strict for the memory leak safety and rather hazard to compose the efficient code after the theoretical guarantee of the memory-safe code from GC-less of Symmetric Interaction Calculus?

You must be logged in to vote

It compiles to Rust now!

Replies: 2 comments 4 replies

Comment options

There's an issue that has some discussion on the topic that should answer your questions: #69.

You must be logged in to vote
1 reply
Comment options

Btw, I intend in the future to replace as much redundant code as possible on the generated C by binding it with the Rust code, and generating just the relevant part that is "dynamic".

Comment options

It compiles to Rust now!

You must be logged in to vote
3 replies
Comment options

Awesome! I've entertained the idea of using HVM for scripting, maybe plugging into Bevy for Rendering.

With HVM compiling to Rust, that would give us the possibility to load non-built-in scripts as runtime-compiled HVM, and for built-in scripts, we could compile to Rust, and embed it!

Comment options

Oh, so you intend to user it with a game engine? This is hype!

Comment options

I'm thinking about it. :)

I'm not sure if I'll be able to or not, but it's something I'm interested in trying.

Answer selected by steinerkelvin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /