Embed resources into DAR files?

  1. Is there a way to embed resources into DAR files?

    For example, something like this:

    sdk-version: 3.4.9
    name: DarWithResources
    source: daml
    version: 0.0.1
    dependencies:
      - daml-prim
      - daml-stdlib
    resources:
      - LICENSE
      - templates/onboarding.gohtml
    
  2. If we manually add a resource to the DAR file (using zip -u) will the Canton process reject the DAR?

Regarding question 2 (manually adding resources) the dpm sandbox v. 3.4.9 accepts the DAR:

  • Added a text file to the DAR:

    zip -u .daml/dist/DarWithResources-0.0.1.dar LICENSE
    
    unzip -l .daml/dist/DarWithResources-0.0.1.dar | grep LICENSE
    
       12  12-19-2025 12:05   LICENSE
    
  • Uploaded the DAR:

    curl --data-binary @.daml/dist/DarWithResources-0.0.1.dar http://localhost:7575/v2/packages
    
  • Ran a script in the DAR:

    dpm script --dar .daml/dist/DarWithResources-0.0.1.dar --all --ledger-host localhost --ledger-port 6865
    
    Main:setup SUCCESS