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

Move asset certification code into a new separate crate #2091

Merged
merged 2 commits into from
Dec 1, 2023

Conversation

frederikrothenberger
Copy link
Contributor

@frederikrothenberger frederikrothenberger commented Nov 30, 2023

This PR moves the asset certification code to a new crate, later to be reused by all asset serving canisters in this repository.

This PR intentionally only moves code (with the only exception of switching out the implementation for the representation independent hash). There will be a subsequent PR to make the library interface nicer.

The code was only moved from assets.rs with the exception of the ContentType impl. The functionality for certification headers that
currently resides in http.rs will be added to the crate in later PR as well.

This PR is step 1 of 4:

  1. move code from assets.rs to the crate
  2. move certification header code from http.rs to the crate
  3. refactor the crate a bit to make the public interface nicer
  4. use the crate in the other canisters

This PR moves the asset certification code to a new crate,
later to be reused by all asset serving canisters in this repository.

This PR intentionally only _moves_ code (with the only exception of
switching out the implementation for the representation independent
hash). There will be a subsequent PR to make the library interface nicer.

The code was only moved from `assets.rs` with the exception of the 
`ContentType` impl. The functionality for certification headers that
 currently resides in `http.rs` will be added to the crate in later PR as well.
Copy link
Collaborator

@przydatek przydatek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

src/asset_util/src/lib.rs Outdated Show resolved Hide resolved
@frederikrothenberger frederikrothenberger added this pull request to the merge queue Dec 1, 2023
Merged via the queue into main with commit caf6855 Dec 1, 2023
53 checks passed
@frederikrothenberger frederikrothenberger deleted the frederik/asset-handling-crate branch December 1, 2023 16:06
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.

3 participants