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

Discussion: Separation of floki into library and binary #112

Open
maxdymond opened this issue Jul 17, 2020 · 1 comment
Open

Discussion: Separation of floki into library and binary #112

maxdymond opened this issue Jul 17, 2020 · 1 comment

Comments

@maxdymond
Copy link
Collaborator

In order to make floki easier to test on the Rust side, it might make sense to split floki into a library portion and a binary portion. This issue is to track what code would be in which part.

My naive first take on this:

  • binary:

    • command line parsing
  • library:

    • everything else

Would be interested in hearing thoughts... @rlupton20?

@rlupton20
Copy link
Collaborator

rlupton20 commented Jul 17, 2020

I think that broadly makes sense.

Another possibility is to have the CLI part do configuration parsing + environment structure building, and passing them into the rest of floki. That's broadly the pattern I've been going for so far. To put it another way, all IO apart from running the container is kept to the CLI half, with the library just mapping from pure data to a running container.

I'm not sure the split will make it easier to test as such, but it might highlight any unintended interlacing of things. I don't know if the library would find much use in isolation.

(I had a brief wild thought that an additional frontend might take the VSCode style config and run containers using that - I'd never use such a thing, but a similar thing might be possible for emacs etc.)

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