Skip to content

Add riscv64 (linux-gnu) prebuilt binary#20201

Open
gounthar wants to merge 4 commits into
tailwindlabs:mainfrom
gounthar:riscv64
Open

Add riscv64 (linux-gnu) prebuilt binary#20201
gounthar wants to merge 4 commits into
tailwindlabs:mainfrom
gounthar:riscv64

Conversation

@gounthar

@gounthar gounthar commented Jun 5, 2026

Copy link
Copy Markdown

Adds riscv64gc-unknown-linux-gnu to the oxide release matrix so a prebuilt @tailwindcss/oxide-linux-riscv64-gnu package gets published. There is no riscv64 binary today, so on riscv64 Linux boards @tailwindcss/oxide can't load its native module, and anything pulling Tailwind v4 (the CLI, the Vite plugin, PostCSS) is stuck there.

Changes

  • .github/workflows/release.yml: a new matrix entry mirroring the aarch64 cross entry. napi-cross (@napi-rs/cross-toolchain) doesn't ship a riscv64 toolchain, so this one uses the system gcc-riscv64-linux-gnu plus the matching linker env instead of --use-napi-cross, and strips with riscv64-linux-gnu-strip.
  • crates/node/package.json: register riscv64gc in napi.targets and add the optionalDependency.
  • crates/node/npm/linux-riscv64-gnu: the new platform package, mirroring linux-arm64-gnu.
  • pnpm-lock.yaml: the new workspace package.

Verification

  • Cross-compile on ubuntu-latest with the recipe in this PR produces tailwindcss-oxide.linux-riscv64-gnu.node (ELF 64-bit RISC-V).
  • A native build on a real riscv64 board produces the same artifact, loads it (the Scanner export is there), and runs.

One thing worth flagging: napi-cross supports arm/arm64/x64/s390x/ppc64le but not riscv64 yet, which is why this entry uses the system cross toolchain rather than --use-napi-cross like your other Linux targets. If you'd rather it followed the napi-cross path once that gains riscv64, or want it done another way, happy to adjust.

gounthar added 2 commits June 5, 2026 15:09
Add riscv64gc-unknown-linux-gnu to the oxide release matrix so a prebuilt
@tailwindcss/oxide-linux-riscv64-gnu package is published. Cross-compiles
with gcc-riscv64-linux-gnu (napi-cross does not ship a riscv64 toolchain),
mirroring the existing aarch64 entry otherwise.

Signed-off-by: Bruno Verachten <gounthar@gmail.com>
Signed-off-by: Bruno Verachten <gounthar@gmail.com>
@gounthar gounthar requested a review from a team as a code owner June 5, 2026 15:53
@greptile-apps

greptile-apps Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

Safe to merge. All changes are additive and isolated to the new riscv64 platform target; no existing build paths are altered.

The new matrix entry, platform package, and dependency wiring all mirror the proven linux-arm64-gnu pattern with only the necessary deviations (system GCC instead of napi-cross, explicit linker env vars). No existing targets, build steps, or publish logic are changed.

No files require special attention.

Reviews (3): Last reviewed commit: "Merge branch 'tailwindlabs:main' into ri..." | Re-trigger Greptile

Comment thread .github/workflows/release.yml Outdated
@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e4d0df0c-477f-4735-aa1f-df1c602c62f0

📥 Commits

Reviewing files that changed from the base of the PR and between 745440b and 2630fc0.

📒 Files selected for processing (1)
  • .github/workflows/release.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/release.yml

Walkthrough

This pull request adds support for the RISC-V 64-bit architecture (riscv64gc-unknown-linux-gnu) to the Tailwind CSS Node.js binding build pipeline. The release workflow is extended with a new Linux build matrix entry, conditional RISC-V toolchain installation, and architecture-specific environment variables for the Rust compiler. A new npm package (@tailwindcss/oxide-linux-riscv64-gnu) is introduced to distribute the compiled RISC-V binary, and the root workspace package is updated to register the target and declare the optional dependency.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding riscv64 Linux GNU prebuilt binary support to the release pipeline.
Description check ✅ Passed The description is detailed and directly related to the changeset, explaining the motivation, specific changes made, and verification performed.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Signed-off-by: Bruno Verachten <gounthar@gmail.com>

@sharaddh sharaddh left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

fine

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.

2 participants