-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Add note about how to preserve debug symbols in Rust #21347
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
Add note about how to preserve debug symbols in Rust #21347
Conversation
Howdy and thanks for contributing to our repo. The Cloudflare team reviews new, external PRs within two (2) weeks. If it's been two weeks or longer without any movement, please tag the PR Assignees in a comment. We review internal PRs within 1 week. If it's something urgent or has been sitting without a comment, start a thread in the Developer Docs space internally. PR Change SummaryAdded instructions for preserving debug symbols in Rust when profiling.
Modified Files
How can I customize these reviews?Check out the Hyperlint AI Reviewer docs for more information on how to customize the review. If you just want to ignore it on this PR, you can add the Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add |
cc965dc
to
c69139e
Compare
Howdy @lukevalenta, tagged @ToriLindsay to help with this. Also gave you |
@@ -32,6 +32,24 @@ To generate a CPU profile: | |||
|
|||
You now have a CPU profile. | |||
|
|||
:::note | |||
|
|||
For Rust Workers, add the following to your `Cargo.toml` to preserve [DWARF](https://dwarfstd.org/) debug symbols (from [this comment](https://github.com/rustwasm/wasm-pack/issues/1351#issuecomment-2100231587)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @lukevalenta 👋 Is wasm an industry standard that we trust? It can be tricky to use external dependencies like that in the docs if it could be subject to change or even become malware. If not, is there some more general advice we can provide instead? Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ToriLindsay, Web Assembly (wasm) is the the glue that allows us to run any compiled language (like Rust, Go, or C on Workers (see https://developers.cloudflare.com/workers/runtime-apis/webassembly/), so this PR isn't suggesting to add any external dependencies that aren't already present.
(cc @zebp or @irvinebroque)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lukevalenta Ah ok. I didn't recognize the acronym. Thanks for the clarification! I'll approve.
Co-authored-by: ToriLindsay <[email protected]>
@@ -32,6 +32,24 @@ To generate a CPU profile: | |||
|
|||
You now have a CPU profile. | |||
|
|||
:::note | |||
|
|||
For Rust Workers, add the following to your `Cargo.toml` to preserve [DWARF](https://dwarfstd.org/) debug symbols (from [this comment](https://github.com/rustwasm/wasm-pack/issues/1351#issuecomment-2100231587)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lukevalenta Ah ok. I didn't recognize the acronym. Thanks for the clarification! I'll approve.
* Add note about how to preserve debug symbols in Rust * Update src/content/docs/workers/observability/dev-tools/cpu-usage.mdx Co-authored-by: ToriLindsay <[email protected]> --------- Co-authored-by: ToriLindsay <[email protected]>
Summary
Add note about how to preserve debug symbols in Rust when profiling.
Screenshots (optional)
Without debug symbols:

With debug symbols:

Documentation checklist