theupdateframework / theupdateframework/rust-tuf

Cleaning up API surface before releasing 0.3.0

Open
#355 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
198
Forks
39
Avg merge
9h 19m
Merged PRs (30d)
2

Description

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?
  • should tuf::verify::verify_signature be public?
  • Change TargetsMetadata to store targets in a BTreeMap rather than a HashMap to make ordering stable.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the listed API candidates: MetadataPath and TargetPath, client::Config, tuf::interchange, HashAlgorithm, tuf::error::Error, tuf::verify::verify_signature, and TargetsMetadata. Compare each proposal with the 0.3.0 release goals and the linked TUF and docs.rs references. Done requires a settled scope and decisions for the proposed API changes, not just an isolated edit.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend-api-design
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
18/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.