Replies: 1 comment
-
Sorry for the delayed answer You may be looking for workers |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In short, I'm trying to create a user scripting system that allows users to create multiple scripts and dynamically load and unload them.
I've done this many times in lua (in rust, I use mlua crate).
My original idea was to create a
tokio::task
for each js runtime event loop in a main tokio runtime, butRc<RustyLoader>
not implementingSend
prevented me from doing so.It is possible to run each script in each
std::thread
, but I think this scheduling is more difficult and may create too many system threads. So I prefer to try the first option first.Maybe using a single main js runtime and then load each user script in js instead of in rust is a better choise. I haven't tested this yet, so it's just an idea.
Be grateful for your helps!
Beta Was this translation helpful? Give feedback.
All reactions