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

Reduce re-exports #161

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

robin-nitrokey
Copy link
Member

Based on the discussion in #155, this PR removes most re-exports of external types and all re-exports of internal types. The following re-exports are kept:

  • heapless_bytes::Bytes (only from types): crucial part of the client API
  • littlefs2::path::{Path, PathBuf}: crucial part of the client API
  • littlefs2::fs::{DirEntry, Metadata}: also part of the client API, though less important
  • cbor_smol::{cbor_deserialize, cbor_serialize_bytes}: kept for the time being, but should probably replaced with more specific (de-)serialization methods for the data returned or expected by the API at some point

Depends on:

This patch removes some wildcard imports to make the dependencies
between modules clearer and to refactoring easier.
This patch removes all re-exports of external types as discussed
in trussed-dev#155, except for those that are essential for using Trussed:
heapless_bytes::Bytes (only from the types module) and
littlefs2::path::{Path, PathBuf}.

Also, the cbor_smol re-exports in the main module are kept until we have
a better mechanism for that.

trussed-dev#155
As discussed in trussed-dev#155, this patch removes re-exports from types that are
defined inside the crate.  This means that all types that are defined in
this crate are now only visible under one path.

trussed-dev#155
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

Successfully merging this pull request may close these issues.

1 participant