Skip to content

feat(neon): Add feature flag for enabling macros #1112

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kjvalencik
Copy link
Member

This allows making the linkme dependency optional which may be problematic on some platforms.

We may want to wait for reported problems before we add this complexity. While adding a default feature flag is not considered a breaking change, it can break builds for anyone using default-features = false.

This allows making the `linkme` dependency optional which may be problematic on some platforms.
Copy link

🐰 Bencher Report

Branchkv/export-flag
Testbedubuntu-latest

🚨 1 Alert

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Upper Boundary
(Limit %)
JsFunction::callThroughput
operations / second (ops/s)
📈 plot
🚷 threshold
🚨 alert (🔔)
5,078,147.36 ops/s
(+10.59%)Baseline: 4,591,850.07 ops/s
5,051,035.08 ops/s
(100.54%)

Click to view all benchmark results
BenchmarkLatencyBenchmark Result
nanoseconds (ns)
(Result Δ%)
Lower Boundary
nanoseconds (ns)
(Limit %)
Upper Boundary
nanoseconds (ns)
(Limit %)
ThroughputBenchmark Result
operations / second (ops/s)
(Result Δ%)
Lower Boundary
operations / second (ops/s)
(Limit %)
Upper Boundary
operations / second (ops/s)
(Limit %)
JsFunction::bind📈 view plot
🚷 view threshold
207.96 ns
(+0.67%)Baseline: 206.58 ns
185.92 ns
(89.40%)
413.15 ns
(50.33%)
📈 view plot
🚷 view threshold
4,809,855.49 ops/s
(-0.29%)Baseline: 4,823,941.40 ops/s
0.00 ops/s
(0.00%)
5,306,335.54 ops/s
(90.64%)
JsFunction::call📈 view plot
🚷 view threshold
196.04 ns
(-9.69%)Baseline: 217.08 ns
195.37 ns
(99.66%)
434.15 ns
(45.15%)
📈 view plot
🚷 view threshold
🚨 view alert (🔔)
5,078,147.36 ops/s
(+10.59%)Baseline: 4,591,850.07 ops/s
0.00 ops/s
(0.00%)
5,051,035.08 ops/s
(100.54%)

JsFunction::call_with📈 view plot
🚷 view threshold
190.64 ns
(-7.27%)Baseline: 205.58 ns
185.02 ns
(97.06%)
411.17 ns
(46.36%)
📈 view plot
🚷 view threshold
5,247,082.91 ops/s
(+8.34%)Baseline: 4,843,299.35 ops/s
0.00 ops/s
(0.00%)
5,327,629.29 ops/s
(98.49%)
auto-exported-noop📈 view plot
🚷 view threshold
30.26 ns
(-1.07%)Baseline: 30.58 ns
27.52 ns
(90.97%)
61.16 ns
(49.47%)
📈 view plot
🚷 view threshold
33,218,206.09 ops/s
(-0.57%)Baseline: 33,408,575.34 ops/s
0.00 ops/s
(0.00%)
36,749,432.87 ops/s
(90.39%)
hello-world📈 view plot
🚷 view threshold
53.16 ns
(-6.77%)Baseline: 57.02 ns
51.32 ns
(96.54%)
114.04 ns
(46.61%)
📈 view plot
🚷 view threshold
18,795,620.18 ops/s
(+7.38%)Baseline: 17,503,084.53 ops/s
0.00 ops/s
(0.00%)
19,253,392.98 ops/s
(97.62%)
manually-exported-noop📈 view plot
🚷 view threshold
29.91 ns
(+4.93%)Baseline: 28.51 ns
25.66 ns
(85.77%)
57.01 ns
(52.46%)
📈 view plot
🚷 view threshold
33,487,632.03 ops/s
(-4.43%)Baseline: 35,038,668.31 ops/s
0.00 ops/s
(0.00%)
38,542,535.14 ops/s
(86.88%)
🐰 View full continuous benchmarking report in Bencher

Copy link

codecov bot commented Jul 22, 2025

Codecov Report

Attention: Patch coverage is 52.94118% with 32 lines in your changes missing coverage. Please review.

Project coverage is 82.77%. Comparing base (2335828) to head (767d22d).

Files with missing lines Patch % Lines
crates/neon-macros/src/lib.rs 0.00% 13 Missing ⚠️
crates/neon/src/macro_internal/export.rs 71.42% 10 Missing ⚠️
crates/neon/src/context/internal.rs 55.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1112      +/-   ##
==========================================
- Coverage   82.85%   82.77%   -0.08%     
==========================================
  Files          74       74              
  Lines        4701     4721      +20     
  Branches     4701     4721      +20     
==========================================
+ Hits         3895     3908      +13     
- Misses        713      721       +8     
+ Partials       93       92       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Successfully merging this pull request may close these issues.

1 participant