Skip to content

Conversation

albersonmiranda
Copy link
Contributor

This PR follows #461.

As required for wasm build, adds the following lines to Cargo.toml template in use_extendr():

[profile.release]
lto = true
codegen-units = 1

Closes #463.

@JosiahParry
Copy link
Contributor

jesus i just did this myself. Lol i need to get notifications

@JosiahParry
Copy link
Contributor

Copying comment from my PR

This PR closes #463 and is a follow up to #461 for WebR support (and generally overall binary size).

It adds lto=true and codegen-units=1 to the release profile. This is seemingly required (at least lto = true) for WASM compatibility—otherwise the symbols generated are incompatible with emscripten.

@JosiahParry
Copy link
Contributor

Migrated my news update to this PR. thanks everyone!

@JosiahParry JosiahParry merged commit 9db60d0 into extendr:main Aug 15, 2025
19 checks passed
Copy link

codecov bot commented Aug 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.71%. Comparing base (b226db3) to head (e5e8af1).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

Files with missing lines Coverage Δ
R/use_extendr.R 98.66% <100.00%> (+0.02%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Use lto and codegen-units in the release profile
2 participants