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

gzip and metadata #374

Closed
lastmjs opened this issue May 5, 2023 · 1 comment
Closed

gzip and metadata #374

lastmjs opened this issue May 5, 2023 · 1 comment
Assignees

Comments

@lastmjs
Copy link
Member

lastmjs commented May 5, 2023

This is mainly copied from the Azle issue: demergent-labs/azle#1029

Kybra might have to wait longer considering that the binaries are much larger, thus a dependency on ic-cdk-optimizer/ic-wasm will probably be needed for longer, and ic-wasm is performing this task for now. It might still be nice to switch over to the metadata in dfx.json though.

Soon dfx will automatically gzip Wasm for us, allowing us to simply pass the regular .wasm file into dfx.json. Also, the metadata section of dfx.json will work for Azle at that point. Once this happens, we should use the metadata section in dfx.json to set candid:service and cdk:name.

Using the metadata section of dfx.json will be much more elegant than forcing ic-wasm as a dependency or using link sections in the code, candid:service I believe is done automatically if you just specify it, and cdk name should be easy...cdk version would be harder, but it's debatable whether or not that should be in there anyway.

Here's what I believe the metadata section should look like:

            "metadata": [
                {
                    "name": "candid:service"
                },
                {
                    "name": "cdk",
                    "contents": "azle"
                }
            ],
@bdemann bdemann self-assigned this May 9, 2023
@lastmjs
Copy link
Member Author

lastmjs commented Apr 2, 2024

We now do gzipping and metadata from dfx.json

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

No branches or pull requests

2 participants