You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're getting close to releasing 0.3.0. Are there any other papercuts on the API surface we want to clean up before release? Here are some ideas:
MetadataPath and TargetPath own a String, but are mainly passed around as a reference. Should we instead replicate std::path::Path and use a dynamically sized type? Downside of this is that we'd have to use unsafe in order to construct these values.
Should we create client::ClientBuilder and move the client::Config into it? Then people who just want the default wouldn't have to deal with passing around Config::default().
The TUF spec refers to different formats as "POUFs". Should we rename tuf::interchange to tuf::pouf, and tuf::interchange::Json to tuf::pouf::Pouf1?
Should we get rid of the HashAlgorithm enum, and use a dyn HashAlgorithm instead? That might allow better customization of the hash algorithm type.
Should we drop support for the legacy hash_key_algorithm?
The tuf::error::Error is a little messy. Is there a better way to clean it up?
Misc. notes below from a cursory read without actually using the library, so reader beware.
Re: ideas in issue
MetadataPath and TargetPath: There's a lot of reflexive revulsion against libraries that use unsafe, fair or not. IMO in a security-focused library it's not worth the consternation.
+1 to ClientBuilder
+1 to tuf::pouf, maybe alias tuf::pouf::Pouf1 to tuf::pouf::Cjson?
verify_signature public? I don't see a need for it.
High-level
Would be nice to have more direction towards what a user would actually want to use.
E.g. quickstart, more examples, re-exporting important structs/traits at the top level
Or an overview of how the parts fit together.
What's a store vs. a database vs. a repository? IME every TUF library suffers from this confusion, so don't consider it a criticism.
Database is kind of a funny name but not sure what else to call it
Lots of API stutter: repository::RepositoryStorage etc. I know this is not totally a settled issue in Rust but I tend to prefer repository::Storage or even repo::Storage
Positives
Overall looks great! Very thoughtfully designed
Love the in-memory implementations! Really makes great tests and docs.
We're getting close to releasing 0.3.0. Are there any other papercuts on the API surface we want to clean up before release? Here are some ideas:
MetadataPath
andTargetPath
own aString
, but are mainly passed around as a reference. Should we instead replicate std::path::Path and use a dynamically sized type? Downside of this is that we'd have to useunsafe
in order to construct these values.client::ClientBuilder
and move theclient::Config
into it? Then people who just want the default wouldn't have to deal with passing aroundConfig::default()
.tuf::interchange
totuf::pouf
, andtuf::interchange::Json
totuf::pouf::Pouf1
?HashAlgorithm
enum, and use adyn HashAlgorithm
instead? That might allow better customization of the hash algorithm type.hash_key_algorithm
?The text was updated successfully, but these errors were encountered: