Skip to content

Use Ryū's small feature to cut ~9kb #55

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

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions shopify_function/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,11 @@ serde = { version = "1.0.13", features = ["derive"] }
serde_json = "1.0"
shopify_function_macro = { version = "0.6.0", path = "../shopify_function_macro" }

# Use the `small` feature of ryu (transitive dependency through serde_json)
# to shave off ~9kb of the Wasm binary size.
[dependencies.ryu]
version = "*"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the thinking that by using *, cargo will use the same version that serde_json is using to avoid having multiple versions of ryu?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that's the intent / hope. I think it works, but I'm no Cargo expert.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds reasonable

features = ["small"]

[dev-dependencies]
graphql_client = "0.13.0"