-
Notifications
You must be signed in to change notification settings - Fork 95
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
Split CLI into library and binary part #551
base: main
Are you sure you want to change the base?
Conversation
To move forward with this PR, we need to remove Line 86 in edf22da
|
Enables other executables to invoke dora CLI commands directly without going through the argument parsing.
I replaced the |
To be honest, I fear that passing the pass to I was thinking about using |
I think that people like the idea of being able to spawn a dora application within python or Rust, so that they can wrap dora within their own application ( UI, library, ...) I think that making it a library makes distributing dora application a lot easier. |
I have pushed a new branch with the changes to use |
I'm not sure if Maybe it's possible to spawn the deamon/coordinator/runtime as threads instead of subprocesses? Or we could use fork on Unix systems. Or we could require some basic form of argument parsing when the dora library is used, then we could continue using |
That could be a good idea and it could scope the up environment to the duration of the initial process. It seems that fork has some issue: https://internals.rust-lang.org/t/why-no-fork-in-std-process/13770 If at the end of the day. If this is too hard, let's just wrap |
Yeah, I'm not a fan of using
Ok, let me try to set it up. The challenge of this approach is that all background threads are stopped immediately when the process exits, without doing any cleanup. So we need some kind of handle that leads to a proper stop on drop.
That's also fine with me. |
That's true about the cleanup |
I guess we should ask users to use the destroy command before closing the script they are using. |
Enables other executables to invoke dora CLI commands directly without going through the argument parsing.