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

Unclear on how to embed #333

Open
ethindp opened this issue Jun 30, 2021 · 2 comments
Open

Unclear on how to embed #333

ethindp opened this issue Jun 30, 2021 · 2 comments
Labels
type: docs Improvements or additions to documentation

Comments

@ethindp
Copy link

ethindp commented Jun 30, 2021

Apologies if this isn't the right place to ask this, but its very unclear (and it appears to be quite difficult) to find any actual documentation on embedding Mun in anything. There is, of course, the Mun command-line program, but this doesn't really give me much of an idea on -- say -- a simple "hello world" like program that tells me how to get going. My requirements are strict, too, so Mun may not be appropriate:

I am developing a microkernel operating system. An idea I'd like to prototype would be a "dispatch" server that loads plugins either written in a scripting language like Rhai or compiled AOT with Mun or another compiler. Quite a bit of underlying infrastructure will be needed to make this work on the microkernel, which does not (yet) possess such infrastructure, but mocking the environment -- or trying to -- would be a good way of testing to see how it works. So what is a good way of embedding Mun and what crates do I need?

@baszalmstra
Copy link
Collaborator

You’re quite right there is very few documentation with regards to how to embed mun. The closest example is in the book: https://docs.mun-lang.org/ch01-03-hello-hot-reloading.html#mun-embedded-in-rust . You only really need the mun_runtime crate.

Ill leave this issue open as a reminder for us to start adding some examples in the repo!

@ethindp
Copy link
Author

ethindp commented Jul 2, 2021

Does mun_runtime work in no_std or does it require std?

You should also consider providing full embedding documentation in future -- something like an "embedding mun" book that gives you all the tips and tricks for compiling and embedding code and all that fancy stuff. I haven't looked at the documentation for each crate in particular so if its well-documented then there won't be as much of a need.

@Wodann Wodann added the type: docs Improvements or additions to documentation label Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: docs Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants