Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative codegen backend to make embedding possible #483

Open
Timmmm opened this issue Nov 22, 2022 · 1 comment
Open

Alternative codegen backend to make embedding possible #483

Timmmm opened this issue Nov 22, 2022 · 1 comment

Comments

@Timmmm
Copy link

Timmmm commented Nov 22, 2022

As I understand it, Mun requires LLVM for compilation. That means it is not a good option for embedding in programs - in the same way that you can embed Rhai or Gluon or Lua for example.

The documentation has a section on embedding Mun programs in Rust or C++ but as far as I can tell that still requires you to have already compiled them externally using LLVM.

Perhaps it could support Cranelift too?

@baszalmstra
Copy link
Collaborator

You are correct, embedding the compiler is not something we currently easily support. Only running Mun using the mun_runtime crate is. We assume the user is running the compiler daemon separately. The daemon (the mun executable) is statically linked against LLVM, meaning the user doesn't need to have LLVM installed.

Adding cranelift as a target would be really nice though! It also has some nice features that would make hotreloading even faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants