Skip to content

refactor(rust): rename rolldown_plugin_data_uri to rolldown_plugin_data_url#8421

Merged
hyf0 merged 1 commit intomainfrom
02-22-refactor_rust_rename_rolldown_plugin_data_uri_to_rolldown_plugin_data_url_
Feb 24, 2026
Merged

refactor(rust): rename rolldown_plugin_data_uri to rolldown_plugin_data_url#8421
hyf0 merged 1 commit intomainfrom
02-22-refactor_rust_rename_rolldown_plugin_data_uri_to_rolldown_plugin_data_url_

Conversation

@hyf0
Copy link
Member

@hyf0 hyf0 commented Feb 22, 2026

For context on the naming: the WHATWG/RFC terminology distinguishes URI (identifier — may not be locatable) from URL (locator — always locatable). data: schemes are locatable resources (they embed the content inline), so data_url is the more precise term. Modern specs (WHATWG URL Standard) have converged on "URL" as the everyday term, treating "URI" as a legacy/formal designation. Renaming to data_url aligns with this convention and with how other tools (e.g. esbuild's dataurl loader) refer to it.
#8421 (comment)

Copy link
Member Author

hyf0 commented Feb 22, 2026


How to use the Graphite Merge Queue

Add the label graphite: merge-when-ready to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 22, 2026

Benchmarks Rust

  • target: 02-22-feat_rust_data-url_use_hash_as_id_for_data_url_modules_to_prevent_long_string_overhead(d18a000)
  • pr: 02-22-refactor_rust_rename_rolldown_plugin_data_uri_to_rolldown_plugin_data_url_(148664e)
group                                                        pr                                     target
-----                                                        --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol              1.01     64.8±2.05ms        ? ?/sec    1.00     64.0±1.91ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap    1.00     70.5±1.94ms        ? ?/sec    1.00     70.8±3.24ms        ? ?/sec
bundle/bundle@rome_ts                                        1.00     96.1±3.01ms        ? ?/sec    1.00     95.9±1.95ms        ? ?/sec
bundle/bundle@rome_ts-sourcemap                              1.00    105.7±2.45ms        ? ?/sec    1.00    105.7±1.79ms        ? ?/sec
bundle/bundle@threejs                                        1.00     34.2±2.07ms        ? ?/sec    1.01     34.5±2.09ms        ? ?/sec
bundle/bundle@threejs-sourcemap                              1.00     37.9±0.65ms        ? ?/sec    1.02     38.5±1.18ms        ? ?/sec
bundle/bundle@threejs10x                                     1.01    354.4±3.34ms        ? ?/sec    1.00    350.4±5.15ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                           1.00    401.2±5.28ms        ? ?/sec    1.00    400.9±5.72ms        ? ?/sec
scan/scan@rome_ts                                            1.01     75.6±1.47ms        ? ?/sec    1.00     75.2±1.75ms        ? ?/sec
scan/scan@threejs                                            1.00     26.8±1.77ms        ? ?/sec    1.00     26.7±1.73ms        ? ?/sec
scan/scan@threejs10x                                         1.00    271.3±3.81ms        ? ?/sec    1.00    271.3±4.88ms        ? ?/sec

@hyf0
Copy link
Member Author

hyf0 commented Feb 22, 2026

For context on the naming: the WHATWG/RFC terminology distinguishes URI (identifier — may not be locatable) from URL (locator — always locatable). data: schemes are locatable resources (they embed the content inline), so data_url is the more precise term. Modern specs (WHATWG URL Standard) have converged on "URL" as the everyday term, treating "URI" as a legacy/formal designation. Renaming to data_url aligns with this convention and with how other tools (e.g. esbuild's dataurl loader) refer to it.

@graphite-app graphite-app bot force-pushed the 02-22-feat_rust_data-url_use_hash_as_id_for_data_url_modules_to_prevent_long_string_overhead branch 2 times, most recently from 503c837 to d18a000 Compare February 24, 2026 08:06
Copilot AI review requested due to automatic review settings February 24, 2026 08:06
@graphite-app graphite-app bot force-pushed the 02-22-refactor_rust_rename_rolldown_plugin_data_uri_to_rolldown_plugin_data_url_ branch from 9bbc8d1 to 148664e Compare February 24, 2026 08:06
@hyf0 hyf0 review requested due to automatic review settings February 24, 2026 08:06
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 24, 2026

Merging this PR will improve performance by 9.72%

⚡ 8 improved benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
bundle@multi-duplicated-top-level-symbol 262.3 ms 244.4 ms +7.3%
bundle@rome_ts 474.7 ms 450.9 ms +5.28%
bundle@multi-duplicated-top-level-symbol-sourcemap 295.6 ms 269.4 ms +9.72%
bundle@rome_ts-sourcemap 543.3 ms 516.8 ms +5.13%
bundle@threejs 186.3 ms 179.4 ms +3.84%
bundle@threejs-sourcemap 220.3 ms 212.2 ms +3.79%
scan@rome_ts 386.7 ms 364.4 ms +6.11%
scan@threejs 146.7 ms 140.6 ms +4.36%

Comparing 02-22-refactor_rust_rename_rolldown_plugin_data_uri_to_rolldown_plugin_data_url_ (148664e) with 02-22-feat_rust_data-url_use_hash_as_id_for_data_url_modules_to_prevent_long_string_overhead (6549a05)1

Open in CodSpeed

Footnotes

  1. No successful run was found on 02-22-feat_rust_data-url_use_hash_as_id_for_data_url_modules_to_prevent_long_string_overhead (d18a000) during the generation of this report, so 688b4d9 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@hyf0
Copy link
Member Author

hyf0 commented Feb 24, 2026

How come the rename PR get performance improvement.

@hyf0 hyf0 requested a review from sapphi-red February 24, 2026 12:09
@hyf0 hyf0 force-pushed the 02-22-feat_rust_data-url_use_hash_as_id_for_data_url_modules_to_prevent_long_string_overhead branch from d18a000 to e8c3e87 Compare February 24, 2026 13:11
@hyf0 hyf0 force-pushed the 02-22-refactor_rust_rename_rolldown_plugin_data_uri_to_rolldown_plugin_data_url_ branch from 148664e to df51634 Compare February 24, 2026 13:22
@graphite-app
Copy link
Contributor

graphite-app bot commented Feb 24, 2026

Merge activity

  • Feb 24, 1:22 PM UTC: Graphite rebased this pull request, because this pull request is set to merge when ready.
  • Feb 24, 1:39 PM UTC: Graphite rebased this pull request, because this pull request is set to merge when ready.
  • Feb 24, 2:48 PM UTC: The merge label 'graphite: merge-when-ready' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Feb 24, 2:49 PM UTC: The merge label 'graphite: merge-when-ready' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.

@graphite-app graphite-app bot changed the base branch from 02-22-feat_rust_data-url_use_hash_as_id_for_data_url_modules_to_prevent_long_string_overhead to main February 24, 2026 13:22
@graphite-app graphite-app bot changed the base branch from main to graphite-base/8421 February 24, 2026 13:28
@hyf0 hyf0 force-pushed the 02-22-refactor_rust_rename_rolldown_plugin_data_uri_to_rolldown_plugin_data_url_ branch from df51634 to dc75998 Compare February 24, 2026 13:38
Copilot AI review requested due to automatic review settings February 24, 2026 13:38
@graphite-app graphite-app bot changed the base branch from graphite-base/8421 to main February 24, 2026 13:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR renames the rolldown_plugin_data_uri plugin to rolldown_plugin_data_url throughout the Rust codebase to align with modern web standards terminology. The WHATWG URL Standard treats "URL" as the standard term for locatable resources like data: schemes, making this rename more precise and consistent with tools like esbuild.

Changes:

  • Renamed Rust structs and types from DataUri* to DataUrl* variants
  • Updated the plugin name from "builtin:data-uri" to "builtin:data-url"
  • Updated Cargo.toml package names and workspace dependencies across the codebase

Reviewed changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
crates/rolldown_plugin_data_url/src/lib.rs Renamed structs ResolvedDataUriResolvedDataUrl, DataUriPluginDataUrlPlugin, and updated internal field names and plugin identifier string
crates/rolldown_plugin_data_url/README.md New README added documenting the plugin's purpose and usage
crates/rolldown_plugin_data_url/Cargo.toml Updated package name from rolldown_plugin_data_uri to rolldown_plugin_data_url
crates/rolldown/src/utils/apply_inner_plugins.rs Updated plugin import and instantiation to use new rolldown_plugin_data_url::DataUrlPlugin
crates/rolldown/Cargo.toml Updated dependency reference from rolldown_plugin_data_uri to rolldown_plugin_data_url
Cargo.toml Updated workspace member definition with new package name and path
Cargo.lock Automatically updated to reflect new package name

@hyf0 hyf0 merged commit b10740d into main Feb 24, 2026
51 of 61 checks passed
@hyf0 hyf0 deleted the 02-22-refactor_rust_rename_rolldown_plugin_data_uri_to_rolldown_plugin_data_url_ branch February 24, 2026 14:48
shulaoda added a commit that referenced this pull request Feb 26, 2026
## [1.0.0-rc.6] - 2026-02-26

### 💥 BREAKING CHANGES

- css: remove `css_entry_filenames` , `css_chunk_filenames` and related code (#8402) by @hyf0
- css: drop builtin CSS bundling to explore alternative solutions (#8399) by @hyf0

### 🚀 Features

- rust/data-url: use hash as id for data url modules to prevent long string overhead (#8420) by @hyf0
- validate bundle stays within output dir (#8441) by @sapphi-red
- rust: support `PluginOrder::PinPost` (#8417) by @hyf0
- support `ModuleType:Copy` (#8407) by @hyf0
- expose `ESTree` types from `rolldown/utils` (#8400) by @sapphi-red

### 🐛 Bug Fixes

- incorrect sourcemap when postBanner/postFooter is used with shebang (#8459) by @Copilot
- resolver: disable node_path option to align ESM resolver behavior (#8472) by @sapphi-red
- parse `.js` within `"type": "commonjs"` as ESM for now (#8470) by @sapphi-red
- case-insensitive filename conflict detection for chunk deduplication (#8458) by @Copilot
- prevent inlining CJS exports that are mutated by importers (#8456) by @IWANABETHATGUY
- parse `.cjs` / `.cts` / `.js` within `"type": "commonjs"` as CommonJS (#8455) by @sapphi-red
- plugin/copy-module: correct hooks' priority (#8423) by @hyf0
- plugin/chunk-import-map: ensure `render_chunk_meta` run after users plugin (#8422) by @hyf0
- rust: correct hooks order of `DataUriPlugin` (#8418) by @hyf0
- `jsx.preserve` should also considering tsconfig json preserve (#8324) by @IWANABETHATGUY
- `deferred_scan_data.rs "Should have resolved id: NotFound"` error (#8379) by @sapphi-red
- cli: require value for `--dir`/`-d` and `--file`/`-o` (#8378) by @Copilot
- dev: avoid mutex deadlock caused by inconsistent lock order (#8370) by @sapphi-red

### 🚜 Refactor

- watch: rename TaskStart/TaskEnd to BundleStart/BundleEnd (#8463) by @hyf0
- rust: rename `rolldown_plugin_data_uri` to `rolldown_plugin_data_url` (#8421) by @hyf0
- bindingify-build-hook: extract helper for PluginContextImpl (#8438) by @ShroXd
- give source loading a proper name (#8436) by @IWANABETHATGUY
- ban holding DashMap refs across awaits (#8362) by @sapphi-red

### 📚 Documentation

- add glob pattern usage example to input option (#8469) by @IWANABETHATGUY
- remove `https://rolldown.rs` from links in reference docs (#8454) by @sapphi-red
- mention execution order issue in `output.codeSplitting` docs (#8452) by @sapphi-red
- clarify `output.comments` behavior a bit (#8451) by @sapphi-red
- replace npmjs package links with npmx.dev (#8439) by @Boshen
- reference: add `Exported from` for values / types exported from subpath exports (#8394) by @sapphi-red
- add JSDocs for APIs exposed from subpath exports (#8393) by @sapphi-red
- reference: generate reference pages for APIs exposed from subpath exports (#8392) by @sapphi-red
- avoid pipe character in codeSplitting example to fix broken rendering (#8391) by @IWANABETHATGUY

### ⚡ Performance

- avoid redundant PathBuf allocations in resolve paths (#8435) by @Brooooooklyn
- bump to `sugar_path@2` (#8432) by @hyf0
- use flag-based convergence detection in include_statements (#8412) by @Brooooooklyn

### 🧪 Testing

- execute `_test.mjs` even if `executeOutput` is false (#8398) by @sapphi-red
- add retry to tree-shake/module-side-effects-proxy4 as it is flaky (#8397) by @sapphi-red
- avoid `expect.assertions()` as it is not concurrent test friendly (#8383) by @sapphi-red
- disable `mockReset` option (#8382) by @sapphi-red
- fix flaky failure caused by concurrent resolveId calls (#8381) by @sapphi-red

### ⚙️ Miscellaneous Tasks

- deps: update dependency rollup to v4.59.0 [security] (#8471) by @renovate[bot]
- ai/design: add design doc about watch mode (#8453) by @hyf0
- deps: update oxc resolver to v11.19.0 (#8461) by @renovate[bot]
- ai: introduce progressive spec-driven development pattern (#8446) by @hyf0
- deprecate output.legalComments (#8450) by @sapphi-red
- deps: update dependency oxlint-tsgolint to v0.15.0 (#8448) by @renovate[bot]
- ai: make CLAUDE.md a symlink of AGENTS.md (#8445) by @hyf0
- deps: update rollup submodule for tests to v4.59.0 (#8433) by @sapphi-red
- deps: update test262 submodule for tests (#8434) by @sapphi-red
- deps: update oxc to v0.115.0 (#8430) by @renovate[bot]
- deps: update oxc apps (#8429) by @renovate[bot]
- deps: update npm packages (#8426) by @renovate[bot]
- deps: update rust crate owo-colors to v4.3.0 (#8428) by @renovate[bot]
- deps: update github-actions (#8424) by @renovate[bot]
- deps: update rust crates (#8425) by @renovate[bot]
- deps: update oxc resolver to v11.18.0 (#8406) by @renovate[bot]
- deps: update dependency oxlint-tsgolint to v0.14.2 (#8405) by @renovate[bot]
- ban `expect.assertions` in all fixture tests (#8395) by @sapphi-red
- deps: update oxc apps (#8389) by @renovate[bot]
- ban `expect.assertions` in fixture tests (#8387) by @sapphi-red
- enable lint for `_config.ts` files (#8386) by @sapphi-red
- deps: update dependency oxlint-tsgolint to v0.14.1 (#8385) by @renovate[bot]

Co-authored-by: shulaoda <165626830+shulaoda@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants