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

Possible to pre-initialze? #140

Closed
taylorh140 opened this issue Sep 18, 2023 · 3 comments
Closed

Possible to pre-initialze? #140

taylorh140 opened this issue Sep 18, 2023 · 3 comments

Comments

@taylorh140
Copy link

I'm mildly interested in using this for the plugin. but it seems like it might take a bit too long to boot.
I did see:
https://github.com/bytecodealliance/wizer

do you think this could be a way to jump to the run state faster?

@ktock
Copy link
Owner

ktock commented Sep 18, 2023

@taylorh140

the plugin

Could you elaborate this? You mean the plugin running on the container?
We already use that for WASI image for pre-booting the VM. However, configuring the network interface and starting runc aren't included in the initialization phase so they are done everytime you start the container on the runtime. Maybe we can move more logic to the initialization phase so that they are pre-initialized by wizer.

@taylorh140
Copy link
Author

I didn't know that happened. I assumed it was a virtual reboot every time.

the demo says:
"It can take some time to load and start the container."

It made me assume that it didn't have this step as I would consider that loading up into the run state.

I'm now thinking most of the time is just downloading the wasm file, and initializing memory. (This is very cool)

I'll go ahead and close this issue with this in mind.

I was looking into the feasibility of getting Mermaid.js compiled to a single wasm file for a plugin but it has too many dependencies on the browser. So this looks like a fun workaround. In my case, it would have no access to any WASI stuff. it would just be a string feed into the wasm file and I would expect an SVG out. (a lot of work for that right?).

So yeah it wouldn't need to configure any network unless I wanted to feed data in and out through that. (it would probably be pretty quick for a local file).

@taylorh140
Copy link
Author

forgot to close :)

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