@gjsify/rolldown-native 0.23.0 → 0.24.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -2
- package/meson.build +9 -1
- package/package.json +4 -4
- package/prebuilds/{linux-aarch64 → linux-arm64}/libgjsify_rolldown.so +0 -0
- package/prebuilds/linux-arm64/libgjsifyrolldown.so +0 -0
- package/prebuilds/{linux-x86_64 → linux-x64}/GjsifyRolldown-1.0.typelib +0 -0
- package/prebuilds/{linux-x86_64 → linux-x64}/libgjsify_rolldown.so +0 -0
- package/prebuilds/linux-x64/libgjsifyrolldown.so +0 -0
- package/src/rust/Cargo.lock +2886 -0
- package/prebuilds/linux-aarch64/libgjsifyrolldown.so +0 -0
- package/prebuilds/linux-x86_64/libgjsifyrolldown.so +0 -0
- /package/prebuilds/{linux-aarch64 → linux-arm64}/GjsifyRolldown-1.0.gir +0 -0
- /package/prebuilds/{linux-aarch64 → linux-arm64}/GjsifyRolldown-1.0.typelib +0 -0
- /package/prebuilds/{linux-x86_64 → linux-x64}/GjsifyRolldown-1.0.gir +0 -0
package/README.md
CHANGED
|
@@ -30,12 +30,46 @@ if (hasNativeRolldown()) {
|
|
|
30
30
|
|
|
31
31
|
Under normal usage `@gjsify/rolldown-native` is consumed automatically by the gjsify CLI (`gjsify build`) — direct use is only needed when embedding the bundler in custom build tooling.
|
|
32
32
|
|
|
33
|
+
## Building from source
|
|
34
|
+
|
|
35
|
+
The Rust shim path-deps into the `refs/rolldown` submodule, pinned to the tag matching the
|
|
36
|
+
workspace's npm `rolldown` version (`package.json#gjsify.refsLockstep` — the two are builds of the
|
|
37
|
+
same bundler and must be the same release):
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
git submodule update --init refs/rolldown
|
|
41
|
+
gjsify workspace @gjsify/rolldown-native build:prebuilds # needs meson + vala + cargo
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Dependency lock
|
|
45
|
+
|
|
46
|
+
`src/rust/Cargo.lock` is **committed**. It pins the crates.io half of the graph the way
|
|
47
|
+
[`scripts/check-refs-pin.mjs`](../../../scripts/check-refs-pin.mjs) pins the `refs/` half, so the
|
|
48
|
+
prebuild in this repository can be re-linked against the exact transitive set it was built from.
|
|
49
|
+
CI builds with `--locked` (`${CI:+--locked}` on the `cargo build` in `meson.build`; every CI leg
|
|
50
|
+
runs with `CI=true`), so a lock that no longer satisfies `Cargo.toml` fails the run instead of
|
|
51
|
+
being silently rewritten. Local builds are unlocked, so editing `Cargo.toml` still just works —
|
|
52
|
+
commit the resulting lock diff with the change.
|
|
53
|
+
|
|
54
|
+
Updating a dependency is a deliberate act:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
cd packages/infra/rolldown-native/src/rust
|
|
58
|
+
cargo update -p <crate> # or plain `cargo update` for the whole registry side
|
|
59
|
+
cargo tree -d # no crate may appear as BOTH a path and a registry entry
|
|
60
|
+
cd -
|
|
61
|
+
gjsify workspace @gjsify/rolldown-native build:prebuilds
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Bumping `refs/rolldown` moves the `rolldown*` path crates' own versions and therefore invalidates
|
|
65
|
+
the lock — regenerate it in the same commit as the submodule pin and the npm `rolldown` bump.
|
|
66
|
+
|
|
33
67
|
## Platform coverage
|
|
34
68
|
|
|
35
69
|
| Platform | Prebuild | Built by |
|
|
36
70
|
|---|---|---|
|
|
37
|
-
| `linux-
|
|
38
|
-
| `linux-
|
|
71
|
+
| `linux-x64` | ✅ `.so` + `.gir` + `.typelib` | native runner |
|
|
72
|
+
| `linux-arm64` | ✅ | native runner |
|
|
39
73
|
| `linux-ppc64`, `linux-s390x`, `linux-riscv64` | ❌ | not built — the rolldown crate graph is too slow under QEMU |
|
|
40
74
|
| macOS (`darwin-arm64`) | ⏳ source-ready, no prebuild yet | pending a green `prebuilds.yml` macOS leg |
|
|
41
75
|
| macOS (`darwin-x64`) | ❌ | — |
|
package/meson.build
CHANGED
|
@@ -74,6 +74,7 @@ cargo = find_program('cargo')
|
|
|
74
74
|
|
|
75
75
|
rust_sources = files(
|
|
76
76
|
'src/rust/Cargo.toml',
|
|
77
|
+
'src/rust/Cargo.lock',
|
|
77
78
|
'src/rust/src/lib.rs',
|
|
78
79
|
'src/rust/src/plugin_proxy.rs',
|
|
79
80
|
'src/rust/src/session.rs',
|
|
@@ -82,11 +83,18 @@ rust_sources = files(
|
|
|
82
83
|
|
|
83
84
|
rust_target_dir = meson.current_build_dir() / 'cargo-target'
|
|
84
85
|
|
|
86
|
+
# `${CI:+--locked}` — on a CI runner (GitHub Actions always exports CI=true) the
|
|
87
|
+
# committed src/rust/Cargo.lock is ENFORCED: cargo fails loudly instead of
|
|
88
|
+
# re-resolving the registry and rewriting the lock, so a lock that no longer
|
|
89
|
+
# satisfies Cargo.toml (or a refs/rolldown bump that moved a path crate's
|
|
90
|
+
# version) reds the run rather than silently shipping a differently-linked
|
|
91
|
+
# prebuild. Locally the flag expands to nothing, so editing Cargo.toml still
|
|
92
|
+
# just works — commit the resulting lock diff together with the change.
|
|
85
93
|
rust_cdylib = custom_target('gjsify-rolldown-rust',
|
|
86
94
|
input: rust_sources,
|
|
87
95
|
output: rust_cdylib_name,
|
|
88
96
|
command: ['sh', '-c',
|
|
89
|
-
'cargo build --release --manifest-path "$1" --target-dir "$2" && cp "$2/release/'
|
|
97
|
+
'cargo build --release ${CI:+--locked} --manifest-path "$1" --target-dir "$2" && cp "$2/release/'
|
|
90
98
|
+ rust_cdylib_name + '" "$3"' + rust_cdylib_post,
|
|
91
99
|
'sh',
|
|
92
100
|
meson.current_source_dir() / 'src/rust/Cargo.toml',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/rolldown-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.2",
|
|
4
4
|
"description": "Phase D-2 POC: Vala/GObject + Rust cdylib bridge to rolldown for GJS. Wraps `rolldown::Bundler::generate()` (async, tokio) in a per-call current-thread runtime so JS sees a sync `bundle()` call. JSON-encoded BundlerOptions in, JSON-encoded BundleOutput out — the boundary stays small even though rolldown's option surface is enormous. POC scope: no JS plugins (Phase B), no watch/HMR, no incremental builds. Companion to `@gjsify/lightningcss-native`; together they remove the last two Rust-crate runtime blockers from the gjsify build pipeline (Phase D-3 unblock).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/esm/index.js",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
],
|
|
22
22
|
"gjsify": {
|
|
23
23
|
"platforms": [
|
|
24
|
-
"linux-
|
|
25
|
-
"linux-
|
|
24
|
+
"linux-x64",
|
|
25
|
+
"linux-arm64"
|
|
26
26
|
],
|
|
27
27
|
"prebuilds": "prebuilds",
|
|
28
28
|
"refsLockstep": {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@girs/gobject-2.0": "^4.1.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@gjsify/cli": "^0.
|
|
61
|
+
"@gjsify/cli": "^0.24.2",
|
|
62
62
|
"@types/node": "^25.9.2",
|
|
63
63
|
"typescript": "^6.0.3"
|
|
64
64
|
},
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|