perf: disable napi tracing feature to reduce binary size#8702
Conversation
Remove the `"tracing"` feature from both `napi` and `napi-derive` workspace dependencies. This eliminates ~491 generated `tracing::debug!()` call sites in napi wrapper functions, saving ~99 KiB in the release binary. Rolldown has its own tracing infrastructure (`rolldown_tracing` / `RD_LOG`) that is unaffected by this change. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for rolldown-rs canceled.
|
There was a problem hiding this comment.
Pull request overview
This PR updates the workspace’s N-API dependency configuration to drop the optional tracing feature from napi and napi-derive, and syncs Cargo.lock accordingly (reducing transitive dependencies brought in via N-API).
Changes:
- Remove the
tracingfeature from the workspacenapidependency. - Remove the
tracingfeature from the workspacenapi-derivedependency. - Update
Cargo.lockto reflect the feature/dependency change.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Cargo.toml | Drops tracing from napi / napi-derive feature sets in workspace deps. |
| Cargo.lock | Removes the now-unneeded tracing dependency entry from the resolved lock graph. |
You can also share your feedback on Copilot code review. Take the survey.
Benchmarks Rust |
Merging this PR will not alter performance
Comparing Footnotes
|
|
Hmm, is it possible to reduce the size without completely removing this feature? If we do this, we'll have to create a build with this feature enabled and give it to users when these kinds of bug were found. |
What useful tracing information do the N-API crates provide? |
|
It helps debugging deadlock issues like #7289. It will log for each napi function call and we can know which function is pending. |
|
ahh ok |
Summary
"tracing"feature from bothnapiandnapi-deriveworkspace dependenciestracing::debug!()call sites in napi wrapper functions, saving ~99 KiB in the release binaryrolldown_tracing/RD_LOG) is unaffected🤖 Generated with Claude Code