ktock / container2wasm

Container to WASM converter

Home Page:https://ktock.github.io/container2wasm-demo/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possible to pre-initialze?

taylorh140 opened this issue · comments

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?

@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.

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).

forgot to close :)