Hi! I want to create an executable binary with my generated code. Is there any tutorial or documentation on how to do it? Any pointer is appreciated :)
:wave: Hey,
We have a crate (cranelift-object
) that allows you to take a bunch of functions and emit them into a object file. From there you should be able to feed that into a linker to get a proper executable.
Unfortunately we don't have much documentation for this, but you can see how it is used in clif-util
which is an internal development tool.
clif-util
doesen't do the linking, but you can look at this example for how to do that.
Thank you @Afonso Bordado ! These examples help a lot :D
Last updated: Dec 23 2024 at 12:05 UTC