Skip to content

Commit edfccbe

Browse files
chore: update CI actions to v5 and add ecosystem adoption roadmap
Bump actions/checkout, setup-node, upload/download-artifact to v5, fix release-drafter permissions (contents: write), add wasm-opt nontrapping-float-to-int flag, add hermes and ram-bundle crate READMEs, update README feature matrix, and add detailed ecosystem adoption plan.
1 parent bffe43f commit edfccbe

8 files changed

Lines changed: 260 additions & 29 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
os: [ubuntu-latest, macos-latest, windows-latest]
2020

2121
steps:
22-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@v5
2323

2424
- uses: dtolnay/rust-toolchain@stable
2525

@@ -35,7 +35,7 @@ jobs:
3535
name: Clippy
3636
runs-on: ubuntu-latest
3737
steps:
38-
- uses: actions/checkout@v4
38+
- uses: actions/checkout@v5
3939
- uses: dtolnay/rust-toolchain@stable
4040
with:
4141
components: clippy
@@ -46,7 +46,7 @@ jobs:
4646
name: Format
4747
runs-on: ubuntu-latest
4848
steps:
49-
- uses: actions/checkout@v4
49+
- uses: actions/checkout@v5
5050
- uses: dtolnay/rust-toolchain@stable
5151
with:
5252
components: rustfmt
@@ -56,7 +56,7 @@ jobs:
5656
name: Conformance (tc39/source-map-tests)
5757
runs-on: ubuntu-latest
5858
steps:
59-
- uses: actions/checkout@v4
59+
- uses: actions/checkout@v5
6060
- uses: dtolnay/rust-toolchain@stable
6161
- uses: Swatinem/rust-cache@v2
6262
- name: Run conformance tests
@@ -66,7 +66,7 @@ jobs:
6666
name: Examples (compile check)
6767
runs-on: ubuntu-latest
6868
steps:
69-
- uses: actions/checkout@v4
69+
- uses: actions/checkout@v5
7070
- uses: dtolnay/rust-toolchain@stable
7171
- uses: Swatinem/rust-cache@v2
7272
- name: Compile examples
@@ -76,7 +76,7 @@ jobs:
7676
name: Benchmarks (compile check)
7777
runs-on: ubuntu-latest
7878
steps:
79-
- uses: actions/checkout@v4
79+
- uses: actions/checkout@v5
8080
- uses: dtolnay/rust-toolchain@stable
8181
- uses: Swatinem/rust-cache@v2
8282
- name: Compile benchmarks

.github/workflows/coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
name: Coverage
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v5
1919

2020
- uses: dtolnay/rust-toolchain@stable
2121

@@ -24,7 +24,7 @@ jobs:
2424
- uses: taiki-e/install-action@cargo-llvm-cov
2525

2626
- name: Setup Node.js
27-
uses: actions/setup-node@v4
27+
uses: actions/setup-node@v5
2828
with:
2929
node-version: 22
3030

.github/workflows/release-drafter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
types: [opened, reopened, synchronize]
88

99
permissions:
10-
contents: read
10+
contents: write
1111
pull-requests: write
1212

1313
jobs:

.github/workflows/release.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
name: Publish Rust crates
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@v5
2121

2222
- uses: dtolnay/rust-toolchain@stable
2323

@@ -95,9 +95,9 @@ jobs:
9595
target: x86_64-pc-windows-msvc
9696

9797
steps:
98-
- uses: actions/checkout@v4
98+
- uses: actions/checkout@v5
9999

100-
- uses: actions/setup-node@v4
100+
- uses: actions/setup-node@v5
101101
with:
102102
node-version: 22
103103

@@ -147,14 +147,14 @@ jobs:
147147
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER: ${{ matrix.settings.linker || '' }}
148148

149149
- name: Upload codec artifact
150-
uses: actions/upload-artifact@v4
150+
uses: actions/upload-artifact@v5
151151
with:
152152
name: codec-bindings-${{ matrix.settings.target }}
153153
path: packages/codec/*.node
154154
if-no-files-found: error
155155

156156
- name: Upload sourcemap artifact
157-
uses: actions/upload-artifact@v4
157+
uses: actions/upload-artifact@v5
158158
with:
159159
name: sourcemap-bindings-${{ matrix.settings.target }}
160160
path: packages/sourcemap/*.node
@@ -164,7 +164,7 @@ jobs:
164164
name: Build WASM
165165
runs-on: ubuntu-latest
166166
steps:
167-
- uses: actions/checkout@v4
167+
- uses: actions/checkout@v5
168168

169169
- uses: dtolnay/rust-toolchain@stable
170170
with:
@@ -195,28 +195,28 @@ jobs:
195195
run: rm -f packages/sourcemap-wasm/pkg/.gitignore packages/generator-wasm/pkg/.gitignore packages/remapping-wasm/pkg/.gitignore packages/symbolicate-wasm/pkg/.gitignore
196196

197197
- name: Upload sourcemap-wasm artifact
198-
uses: actions/upload-artifact@v4
198+
uses: actions/upload-artifact@v5
199199
with:
200200
name: wasm-sourcemap-package
201201
path: packages/sourcemap-wasm/pkg/
202202
if-no-files-found: error
203203

204204
- name: Upload generator-wasm artifact
205-
uses: actions/upload-artifact@v4
205+
uses: actions/upload-artifact@v5
206206
with:
207207
name: wasm-generator-package
208208
path: packages/generator-wasm/pkg/
209209
if-no-files-found: error
210210

211211
- name: Upload remapping-wasm artifact
212-
uses: actions/upload-artifact@v4
212+
uses: actions/upload-artifact@v5
213213
with:
214214
name: wasm-remapping-package
215215
path: packages/remapping-wasm/pkg/
216216
if-no-files-found: error
217217

218218
- name: Upload symbolicate-wasm artifact
219-
uses: actions/upload-artifact@v4
219+
uses: actions/upload-artifact@v5
220220
with:
221221
name: wasm-symbolicate-package
222222
path: packages/symbolicate-wasm/pkg/
@@ -227,9 +227,9 @@ jobs:
227227
runs-on: ubuntu-latest
228228
needs: [build-napi, build-wasm]
229229
steps:
230-
- uses: actions/checkout@v4
230+
- uses: actions/checkout@v5
231231

232-
- uses: actions/setup-node@v4
232+
- uses: actions/setup-node@v5
233233
with:
234234
node-version: 22
235235

@@ -243,39 +243,39 @@ jobs:
243243
run: npm install -g @napi-rs/cli
244244

245245
- name: Download all codec NAPI artifacts
246-
uses: actions/download-artifact@v4
246+
uses: actions/download-artifact@v5
247247
with:
248248
path: packages/codec/artifacts
249249
pattern: codec-bindings-*
250250
merge-multiple: false
251251

252252
- name: Download all sourcemap NAPI artifacts
253-
uses: actions/download-artifact@v4
253+
uses: actions/download-artifact@v5
254254
with:
255255
path: packages/sourcemap/artifacts
256256
pattern: sourcemap-bindings-*
257257
merge-multiple: false
258258

259259
- name: Download sourcemap-wasm artifact
260-
uses: actions/download-artifact@v4
260+
uses: actions/download-artifact@v5
261261
with:
262262
name: wasm-sourcemap-package
263263
path: packages/sourcemap-wasm/pkg
264264

265265
- name: Download generator-wasm artifact
266-
uses: actions/download-artifact@v4
266+
uses: actions/download-artifact@v5
267267
with:
268268
name: wasm-generator-package
269269
path: packages/generator-wasm/pkg
270270

271271
- name: Download remapping-wasm artifact
272-
uses: actions/download-artifact@v4
272+
uses: actions/download-artifact@v5
273273
with:
274274
name: wasm-remapping-package
275275
path: packages/remapping-wasm/pkg
276276

277277
- name: Download symbolicate-wasm artifact
278-
uses: actions/download-artifact@v4
278+
uses: actions/download-artifact@v5
279279
with:
280280
name: wasm-symbolicate-package
281281
path: packages/symbolicate-wasm/pkg
@@ -331,7 +331,7 @@ jobs:
331331
runs-on: ubuntu-latest
332332
needs: [publish-crates, publish-npm]
333333
steps:
334-
- uses: actions/checkout@v4
334+
- uses: actions/checkout@v5
335335

336336
- name: Create GitHub Release
337337
uses: softprops/action-gh-release@v2

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ srcmap-generator Incremental source map builder
1717
srcmap-remapping Concatenation + composition through transform chains
1818
srcmap-scopes ECMA-426 scopes & variables (first Rust implementation of the draft proposal)
1919
srcmap-symbolicate Stack trace symbolication
20+
srcmap-hermes Hermes/React Native source map extensions
21+
srcmap-ram-bundle React Native RAM bundle parser
2022
srcmap-codec VLQ encode/decode primitives
2123
srcmap-cli CLI with structured JSON output
2224
```
@@ -44,6 +46,8 @@ srcmap-remapping = "0.2" # if you compose/concatenate source maps
4446
| Indexed source maps | **yes** | yes | no | no |
4547
| ECMA-426 scopes | **yes** | no | no | no |
4648
| Stack trace symbolication | **yes** | yes | no | no |
49+
| Hermes/React Native | **yes** | yes | no | no |
50+
| RAM bundle parsing | **yes** | no | no | no |
4751

4852
[sourcemap]: https://crates.io/crates/sourcemap
4953
[oxc_sourcemap]: https://crates.io/crates/oxc_sourcemap

ROADMAP.md

Lines changed: 111 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,118 @@ Environment metadata for source maps. The proposal is minimal at Stage 1 — tra
228228

229229
---
230230

231+
## Ecosystem Adoption
232+
233+
Based on integration testing across 21 projects. Prioritized by impact and dependency chains.
234+
235+
### Adoption Phase 1: Ship What Already Works
236+
237+
**Commit accumulated bug fixes** found during outreach testing:
238+
- Path normalization (`normalizePath()`) — matches jridgewell's `resolve-uri` behavior
239+
- WASM source name resolution through `resolvedSources` in `originalPositionFor`
240+
- `generatedPositionFor` bias handling (GLB/LUB) and same-line constraint
241+
- `allGeneratedPositionsFor` LUB semantics and result sorting
242+
- Reverse index tie-breaking by generated position
243+
- Decoded mappings stride fix (6→7 for `is_range_mapping`)
244+
- `SectionedSourceMapInput` type and callable `AnyMap` type signature
245+
- Dual CJS/ESM exports for `@srcmap/trace-mapping`
246+
247+
**Publish `@srcmap/trace-mapping` v0.3.0**, then open PRs:
248+
249+
| Project | Stars | Downloads/wk | Test Results | Effort |
250+
|---------|-------|-------------|--------------|--------|
251+
| v8-to-istanbul | 220 | ~8M (via c8/Jest) | 3/3 files, all snapshots match | `package.json` swap |
252+
| Jest | 44k | ~30M | 0 regressions (28 pre-existing) | `package.json` swap |
253+
| Vitest | 14k | ~10M | 600/600 files, 6582 tests | Swap + externalize WASM in 3 Rollup configs |
254+
255+
### Adoption Phase 2: Wrapper Packages
256+
257+
Three wrapper packages unlock 10+ major projects:
258+
259+
**`@srcmap/source-map`** — Mozilla `source-map` v0.6 synchronous API compat
260+
- Already prototyped and validated (source-map-support: 33/33 tests pass)
261+
- `SourceMapConsumer`: constructor, `originalPositionFor`, `generatedPositionFor`, `eachMapping`, `sourceContentFor`
262+
- Unlocks: **Next.js** (130k), **PostCSS** (29k), **Terser** (9k), **source-map-support** (3.3k)
263+
264+
**`@srcmap/remapping`**`@ampproject/remapping` API compat
265+
- Default export accepting `(input, loader)` where input is string, object, or array
266+
- Unlocks: **Vite** (71k), **Angular CLI** (27k), **Babel** (43k, also needs gen-mapping)
267+
268+
**`@srcmap/gen-mapping`**`@jridgewell/gen-mapping` API compat
269+
- `GenMapping` constructor, `maybeAddMapping`, `toEncodedMap`, `toDecodedMap`, `setSourceContent`
270+
- Unlocks: **Babel** (43k)
271+
272+
```
273+
trace-mapping v0.3 ──→ Jest PR (44k⭐)
274+
│ Vitest PR (14k⭐)
275+
│ v8-to-istanbul PR (220⭐, 8M dl/wk)
276+
277+
├─→ @srcmap/source-map ──→ Next.js (130k⭐)
278+
│ Terser (9k⭐)
279+
│ source-map-support (3.3k⭐)
280+
│ PostCSS (29k⭐, needs applySourceMap too)
281+
282+
├─→ @srcmap/remapping ───→ Vite (71k⭐)
283+
│ Angular CLI (27k⭐)
284+
│ Babel (43k⭐, needs gen-mapping too)
285+
286+
└─→ @srcmap/gen-mapping ─→ Babel (43k⭐)
287+
```
288+
289+
Total ecosystem reach with Phase 1+2: **~434k GitHub stars** across 10 projects.
290+
291+
### Adoption Phase 3: Rust Performance Gaps
292+
293+
These block adoption in Rust-native tools:
294+
295+
| Gap | Severity | Impact | Details |
296+
|-----|----------|--------|---------|
297+
| VLQ encoding 1.8x slower | High | OXC, SWC, Lightning CSS | Profile + optimize `encode_vlq`, consider SIMD/lookup-table |
298+
| Serialization 2.25x slower | Medium | Rspack | Pre-allocate output buffer, avoid intermediate allocations |
299+
| Composition 8x slower | High | Rolldown | Missing lookup table API for O(1) line/column access |
300+
| No structured SourceMap output | Medium | OXC | Export `SourceMap` struct with typed fields |
301+
302+
### Adoption Phase 4: Extended APIs
303+
304+
| API | Effort | Unlocks |
305+
|-----|--------|---------|
306+
| `ConcatSourceMapBuilder` (Rust) | Medium | OXC (13k) |
307+
| `from_data_url()` / `to_data_url()` (Rust) | Small | Lightning CSS (7k) |
308+
| `fromSourceMap()` / `applySourceMap()` (JS) | Medium | PostCSS (29k) |
309+
| WASM browser target (`--target web`) | Medium | Vitest browser, all browser tools |
310+
311+
### Adoption Phase 5: Long-Term Strategic
312+
313+
| Target | Approach | Stars |
314+
|--------|----------|-------|
315+
| Sentry CLI | Contribute improvements upstream to `rust-sourcemap`, or position for symbolicator | 2k |
316+
| Node.js runtime | Publish benchmarks → contribute algorithm improvements → WASM vendoring proposal | 110k |
317+
| Webpack | Add streaming API matching `StreamChunksOfCombinedSourceMap` pattern | 65k |
318+
| Metro | Low priority — needs multiple wrappers for custom source map extensions | 5.2k |
319+
320+
### Adoption Priority Matrix
321+
322+
| Priority | Item | Effort | Impact |
323+
|----------|------|--------|--------|
324+
| **P0** | Commit bug fixes + publish trace-mapping v0.3 | S ||
325+
| **P0** | PRs to Jest, Vitest, v8-to-istanbul | S | 58k⭐, 48M dl/wk |
326+
| **P1** | `@srcmap/source-map` wrapper | M | 171k⭐ |
327+
| **P1** | `@srcmap/remapping` wrapper | M | 141k⭐ |
328+
| **P1** | WASM browser target | M | All browser tools |
329+
| **P2** | `@srcmap/gen-mapping` wrapper | M | 43k⭐ |
330+
| **P2** | VLQ encoding optimization | M | OXC+SWC+LightningCSS |
331+
| **P2** | Data URL utilities | S | Lightning CSS (7k⭐) |
332+
| **P3** | Serialization performance | M | Rspack (12k⭐) |
333+
| **P3** | Composition performance + lookup table | L | Rolldown (20k⭐) |
334+
| **P3** | Structured SourceMap type + ConcatBuilder | M | OXC (13k⭐) |
335+
| **P3** | `fromSourceMap`/`applySourceMap` | M | PostCSS (29k⭐) |
336+
| **P4** | Node.js benchmarks, Webpack streaming, Metro, Sentry | L | Long-term |
337+
338+
Effort: **S** = days, **M** = 1-2 weeks, **L** = 2+ weeks
339+
340+
---
341+
231342
## Non-goals
232343

233-
- Full compatibility with the `mozilla/source-map` API surface
234344
- Source map v1/v2 format support
235345
- Tight coupling to any specific bundler or compiler

0 commit comments

Comments
 (0)