-
Notifications
You must be signed in to change notification settings - Fork 109
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
apis: organize into folders #546
Conversation
I'm planning to approve this (it needs a rebase/merge anyway), but I wonder if this is not an opportunity to rethink how to structure responsibilities in libtock-rs. In particular, I'd advocate we avoid (or reverse) centralizing all of the functionality any userspace process could possibly want into this library, which it currently does. Currently Anyway, if I'm not downvoted to oblivion, I should probably turn this into an issue and not block this PR (I think this kind of organization makes sense even if/when these crates are in different repos, or otherwise independent of libtock-rs "core"). |
On the other hand, I think we should avoid making individual app developers responsible for deciding (and figuring out) what the "Right" driver is for every kind of functionality they may need. In general I agree that we can use cargo to effectively split the core syscall mechanism from driver APIs and implementations. However, I think we should be able to name and talk about groups of apis. If we can give them names then we can probably teach others how to use them. For example, something like "the arduino interface" is a group of APIs that have a name. |
Are you referring to Or are you saying that the various drivers in |
OK, meaning
Basically yes. If I'm a bit less concerned about those crates being in this repo, though them being there does seem to discourage development of non-canonical crates out-of-tree. I suggest we table this to either a call or TockWorld (or a separate issue/e-mail thread), though. This is really something that came up for me due to reviewing this PR, but isn't actually directly relevant to it. |
Yes. For example, an app that wants to minimize binary size at the expense of debugging functionality should depend on
It's more akin to And yes, I agree that examples would be nice. The |
This is an annoying PR, so fair to close this.
However, one thing we learned after implementing all of the libtock-c drivers is that a flat folder structure gets very unwieldy, and having folders to organize is useful. So, it might be a good idea to apply that here as well.
I used the same folder names as libtock-c.