Skip to content

Commit cc2b785

Browse files
committed
update blog post
1 parent bd64ad6 commit cc2b785

File tree

1 file changed

+61
-72
lines changed
  • blog/posts/2025-08-26-rextendr-release-040

1 file changed

+61
-72
lines changed
Lines changed: 61 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "rextendr 0.4.0"
2+
title: "rextendr 0.4"
33
description: |
44
A new version of rextendr has arrived.
55
author: Blake Vernon
@@ -9,14 +9,25 @@ image-alt: "The rextendr logo, letter R in middle of gears."
99
categories: [Release, Updates]
1010
---
1111

12+
## TL; DR
13+
14+
- New domain! Say hi to extendr.rs 👋🏼
15+
- [Positron & VS Code Support 👩🏽‍💻](#positron)
16+
- [CRAN compatibility out of the box](#cran)
17+
- [WebR support 🕸️](#webr)
18+
1219
The extendr team is excited to announce the release of
13-
[rextendr](https://extendr.github.io/rextendr/dev) `0.4.0`, along with two
20+
[rextendr](https://extendr.github.io/rextendr/dev) `0.4`, along with two
1421
follow-up patch releases, that bring significant improvements to the R package
15-
ecosystem for Rust integration. Those include enhanced CRAN compatibility,
16-
improved developer experience, and streamlined package scaffolding. A great deal
17-
of work also went into re-factoring code, focusing support on later versions of
18-
R, and reducing package dependencies to streamline maintenance and ensure the
19-
long-term viability of the project.
22+
ecosystem for Rust integration. These include:
23+
24+
- enhanced CRAN compatibility,
25+
- improved developer experience,
26+
- WebR support,
27+
- and streamlined package scaffolding.
28+
29+
A great deal of work also went into re-factoring code to reduce package dependencies and
30+
improve the maintainability to ensure the long-term viability of the project.
2031

2132
::: callout-note
2233
## What is rextendr?
@@ -26,78 +37,56 @@ For those new to the project, rextendr is an R package similar to `usethis` and
2637
crate `extendr` handling most of the heavy lifting behind the scenes.
2738
:::
2839

29-
## CRAN compatibility
30-
31-
The standout feature of the current release is found in rextendr's workhorse
32-
function `use_extendr()`, which now provides CRAN-ready scaffolding out of the
33-
box. This is achieved through a set of targeted updates.
34-
35-
- **Enhanced build configuration** - `use_extendr()` now creates
36-
`tools/msrv.R` to ensure that developers have a CRAN compatible version of
37-
Rust installed. It also provides updated `configure` scripts for
38-
pre-compilation checks and setup on various operating systems.
39-
- **Explicit system requirements** - `use_extendr()` now sets the package
40-
`DESCRIPTION`'s `SystemRequirements` field to "Cargo (Rust's package
41-
manager), rustc" per CRAN requirements. It also adds `xz` so packages can
42-
build on Posit Package Manger.
43-
- **Friendly updating** - `use_extendr()` can now be called on existing
44-
extendr-powered R packages to update or generate new scaffolding. Prompts
45-
allow the user to specify which updates or changes to accept or reject. This
46-
is especially useful as rextendr continues to adapt to developer needs and
47-
evolving CRAN policies.
48-
49-
## Developer tools
50-
51-
Release of 0.4.0 and its patches also comes with a host of new developer
52-
tooling.
53-
54-
- **Greater IDE support** - new functions `use_vscode()` and `use_positron()`
55-
generate `.vscode/settings.json` with suitable defaults, thus enhancing
56-
developer experience in VSCode and Positron. One of the big ones here is the
57-
addition of `rust-analyzer.linkedProjects`, which ensures that rust analyzer
58-
can find the Rust project inside the R package directory.
59-
- **Cargo functions** - rextendr added or updated a few helper functions to
60-
invoke Cargo commands from R. These include `rust_sitrep()` to provide Rust
61-
toolchain diagnostics, `use_crate()` to add dependencies to `Cargo.toml`,
62-
and `read_cargo_metadata()` to fetch project information.
63-
64-
## WebR support
65-
66-
A very exciting development in the project is greater support for WebR, with
67-
extendr-powered R packages now compatible with WASM, meaning the packages can be
68-
used in the browser without an R installation. A nice side-effect of these
69-
enhancements is that compiled extendr-packages are now substantially reduced in
70-
size.
71-
72-
## A new extendr badge!
40+
## WebR support{#webr}
41+
42+
A very exciting development in this release is **WebR compatibility out of the box**. All extendr-powered R packages are now compatible with [WebR](https://webr.r-wasm.org/latest/), meaning your packages can run in the browser without an R installation.
43+
44+
WebR support happens without any additional work on your part. Just update your build files with `use_extendr()` and permit rextendr to update your `Makevars{.win}.in`, files in `tools/`, `configure` scripts.
45+
46+
::: callout-tip
47+
## WebR for existing packages
48+
WebR support requires that `lto = true` in your release profile. This is handled for new packages, but not existing ones. Be sure to add it to your `Cargo.toml`.
49+
:::
50+
51+
52+
## CRAN compatibility{#cran}
53+
54+
The standout feature of the current release is found in rextendr's workhorse function `use_extendr()`, which now provides **CRAN-ready scaffolding out of the box**. All you need to do is vendor your Rust dependencies with `vendor_pkgs()` and you're ready for CRAN submission.
55+
56+
57+
## Positron & VS Code Support{#positron}
58+
59+
With [Positron](http://positron.posit.co/) coming out of beta, we've introduced `use_positron()` and `use_vscode()` to generate (or update) `.vscode/settings.json` tailored to Rust development in R packages.
60+
61+
When you run `use_extendr()`, it now automatically calls `use_vscode()` when VS Code or Positron is detected as your IDE, making the setup completely seamless.
62+
63+
## Enhanced Developer Tools
64+
65+
Release of 0.4.0 and its patches also comes with additional developer tooling:
66+
67+
- **Rust diagnostics**`rust_sitrep()` provides comprehensive Rust toolchain diagnostics and guides you through fixing any installation issues
68+
- **Dependency management**`use_crate()` makes adding Rust dependencies to your `Cargo.toml` as easy as `usethis::use_package()`
69+
- **MSRV support**`use_msrv()` helps specify the minimum supported Rust version for your package
70+
- **Metadata access**`read_cargo_metadata()` lets you fetch detailed project information from Cargo
71+
- **Eeasy dependency vendoring**`vendor_pkgs()` vendors and compresses your Rust dependencies for easy CRAN publication and offline installation
72+
73+
## A new extendr badge! {#badge}
7374

7475
The extendr community has grown quite a bit in the last two years, maybe as much
75-
as the codebase! We wanted to make sure that new developers could boast about
76-
their extendr-powered packages - and, if we're being honest, increase visibility
77-
for the project - by adding an extendr badge to their README files, which can
76+
as the codebase! First of all, we want to say **thank you** for being a part of the community!
77+
78+
We wanted to make sure that new developers could boast about
79+
their extendr-powered packages—and, if we're being honest, increase visibility
80+
for the project—by adding an extendr badge to their README files, which can
7881
now be done with `use_extendr_badge()`. This results in:
7982

8083
[![](https://img.shields.io/badge/extendr-%5E0.8.0-276DC2)](https://extendr.rs/extendr/extendr_api/)
8184

82-
## What These Changes Mean for Developers
85+
If you're using extendr in your package, do us a solid and add the badge to your README! 🥺
8386

84-
These improvements provide a host benefits to new developers:
8587

86-
- **Simplified CRAN submission process** - Running `use_extendr()` now creates
87-
package scaffolding that's ready for CRAN submission with minimal additional
88-
configurations. Invariably, developers in the R community will experience
89-
many frictions and pain points on the way to publishing on CRAN, but
90-
rextendr will not be one of them.
91-
- **Reduced maintenance overhead** - The new updating mechanism provided by
92-
`use_extendr()` means that developers can now generally count on the extendr
93-
team to help implement changes that meet CRAN requirements and take
94-
advantage of new developments in Rust.
95-
- **Better integration with R infrastructure** - Developers can now build with
96-
confidence knowing that their packages will be robust across platforms and
97-
package managers.
9888

99-
## To learn more...
89+
## There's still more
10090

101-
Check out our recently updated \[website\](<https://extendr.rs/>) and
102-
documentation! We are still a ways away from having complete documentation, but
103-
we're getting there! Did you notice our new domain?
91+
Check out our recently updated [website](https://extendr.rs/) and
92+
documentation! For the full changelog see the [NEWS.md](https://github.com/extendr/rextendr/blob/main/NEWS.md).

0 commit comments

Comments
 (0)