New Dev Blog post: Introducing dfx deps!

Good afternoon developers! There is a new feature blog post introducing dfx deps!

dfx deps is a new set of subcommands designed to provide a consistent developer workflow for integrating and testing third-party canisters within local environments. Third-party canisters can be canisters created by DFINITY, such as the Internet Identity or NNS canisters, or they can be canisters created by members of the IC community that provide a public service at a static canister ID.

Testing third-party canister integrations locally is important to verify the third-party canister’s integration functionality without paying cycles or using production environments.

You can read the full blog post here.

5 Likes

So this info:

"pullable": {
        "dependencies": [],
        "wasm_url": "https://github.com/lwshang/pullable/releases/latest/download/service.wasm",
        "init_guide": "A natural number, e.g. 1"
      }

Is added to the mainnet canister when it is deployed? And the next step(when a user is developing with my service) can pull it from canister settings somehow(dfx does it for them in this case…but I’m guessing it is available somewhere else public)?

I also assume that this means that anyone who wants to take advantage of this will need to redeploy?

CC: @lwshang who is probably the best resource to provide insight and answer these questions.

Q1

Is added to the mainnet canister when it is deployed?

Yes. With the example pullable canister, you can check the public metadata:

> dfx canister metadata --network ic ig5e5-aqaaa-aaaan-qdxya-cai dfx

That will return:

{
  "pullable": {
    "wasm_url": "https://github.com/lwshang/pullable/releases/latest/download/service.wasm",
    "wasm_hash": null,
    "dependencies": [],
    "init_guide": "A natural number, e.g. 1"
  }
}

Q2

And the next step(when a user is developing with my service) can pull it from canister settings somehow(dfx does it for them in this case…but I’m guessing it is available somewhere else public)?

Here is the complete document of the workflow.

And you may want to check the example project.

Q3

I also assume that this means that anyone who wants to take advantage of this will need to redeploy?

Yes. Service providers need make their canister “pullable” so that other people (consumers) can pull it as a dependency. You may want to check this Pullable Guide.

1 Like