Conversation
Wasmer and Cranelift are ~10x slower in debug mode, making template tests painfully slow. Add opt-level = 2 for these specific crates in dev profile across all 11 template Cargo.toml files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request optimizes the wasmer and cranelift crates in development and test builds across multiple Cargo.toml files to improve test performance. The reviewer suggested using glob patterns for package overrides to make the configuration more concise and maintainable.
Comment on lines
+26
to
+37
| [profile.dev.package.wasmer] | ||
| opt-level = 2 | ||
| [profile.dev.package.wasmer-compiler] | ||
| opt-level = 2 | ||
| [profile.dev.package.wasmer-compiler-cranelift] | ||
| opt-level = 2 | ||
| [profile.dev.package.cranelift-codegen] | ||
| opt-level = 2 | ||
| [profile.dev.package.cranelift-frontend] | ||
| opt-level = 2 | ||
| [profile.dev.package.cranelift-entity] | ||
| opt-level = 2 |
There was a problem hiding this comment.
For better maintainability and conciseness, you can use glob patterns to specify the optimization level for multiple packages at once. Cargo's profile overrides support globs for package names, which can reduce the number of entries here from six to two.
This suggestion can be applied to all Cargo.toml files modified in this pull request.
Suggested change
| [profile.dev.package.wasmer] | |
| opt-level = 2 | |
| [profile.dev.package.wasmer-compiler] | |
| opt-level = 2 | |
| [profile.dev.package.wasmer-compiler-cranelift] | |
| opt-level = 2 | |
| [profile.dev.package.cranelift-codegen] | |
| opt-level = 2 | |
| [profile.dev.package.cranelift-frontend] | |
| opt-level = 2 | |
| [profile.dev.package.cranelift-entity] | |
| opt-level = 2 | |
| [profile.dev.package.'wasmer*'] | |
| opt-level = 2 | |
| [profile.dev.package.'cranelift-*'] | |
| opt-level = 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[profile.dev.package.*]withopt-level = 2for wasmer and cranelift crates across all 11 templateCargo.tomlfileswasmer,wasmer-compiler,wasmer-compiler-cranelift,cranelift-codegen,cranelift-frontend,cranelift-entity) without affecting the rest of the projectTest plan
cargo teston individual templates to verify tests pass and are noticeably fasterin_cargo_workspace == "false"(profile sections inside conditional blocks)🤖 Generated with Claude Code