Asset canister source code?

I was just helping someone trying to build an interesting app for the Internet Computer, and they would benefit from having a dedicated asset storing and serving canister – and dfx ships with such a canister! But it seems that the code itself isn’t available yet.

Can we expect that canister code to be publicly available soon, or should I advise them to work without it, @roman-kashitsyn?

Hi @nomeata!

The assets canister is in the final stages of the open-sourcing pipeline, it should be open very soon (I hope within a week or so). I’m looking forward to finally making it public. People should be able to see the code that serves their assets.

Related to that, the specification for our simple certified HTTP asset protocol deserves a public home. Maybe include it in the repo, until it has a better one?

In fact, the whole HTTP Gateway feature specification needs a home…

@nomeata does the HTTP Gateway feature specification apply to this PR?

Right, that specification would have to be changed (extended) for that feature. So having the spec in a public place where proposals can be made would be even better :slight_smile:

I’ve just got the final approval and pressed the button.
It’s public now: GitHub - dfinity/certified-assets: A certified assets canister written in Rust. :tada:

is this have motoko code?

is this have motoko code?

The assets canister that ships with DFX is written in Rust.
We designed it to be backward-compatible with the first version of the asset canister that was written in Motoko.

The Motoko version was retired in this PR: https://github.com/dfinity/sdk/pull/1644.

This repo now points me to sdk/src/canisters/frontend/ic-frontend-canister at master · dfinity/sdk · GitHub, which doesn’t have the source code implementation.

Looking at crates.io: Rust Package Registry points me to GitHub - dfinity/cdk-rs: Rust canister development kit for the Internet Computer., and I’m assuming the assets canister is somewhere in https://github.com/dfinity/cdk-rs/tree/main/library/ic-certified-map?

Note that this half-hearted struggle in trying to find the current Asset Canister source code is coming from someone with no experience in Rust other than hello world, but I’m curious since @sea-snake just made some improvements to agent-js, adding an AssetManager to the 0.14.0 release.

@icme i think you might be looking for sdk/src/canisters/frontend/ic-certified-assets at master · dfinity/sdk · GitHub

See it now, thanks :pray:

Yeah, sorry about that - we decided to consolidate recently because it was confusing to find all the packages. We should make sure that we leave some breadcrumb readme’s behind so people know where to go