arcanemachine

arcanemachine

I (with the help of an LLM-based agent) put together a Node-backed Tailwind CSS v4.3.1 wrapper for Linux RISC-V GNU systems:

This repo offers a prebuilt binary and a simple tailwindcss CLI wrapper. The binary is reproducible using a simple Docker-based workflow.

This came out of trying to run a Phoenix app on a Scaleway RISC-V server running Ubuntu 24.04. Phoenix’s tailwind package could not download an official Tailwind binary for riscv64-unknown-linux-gnu, and Tailwind’s official standalone binary path depends on Bun. Bun does not currently provide a Linux RISC-V target, so the official single-file Tailwind standalone binary is not available there.

DISCLAIMER: I built this to scratch an itch for a weekend project, and have only run this in a :dev config environment. Everything appears to work, but this is presented as an experimental proof-of-concept, and nothing more. I just thought it was cool and wanted to share it.


This package is not Tailwind’s official standalone binary. It is a self-contained tarball distribution with:

  • A wrapper (bin/tailwindcss) that provides a compatible interface for the :tailwind Mix package.
  • bundled Node
  • pinned @tailwindcss/cli / tailwindcss
  • the Linux RISC-V native addons needed by the Node CLI

It does not need npm at runtime, and it does not require app-local Tailwind node_modules. It does need the extracted package directory to remain intact, because bin/tailwindcss is a wrapper around the bundled runtime.

For Phoenix, the important part is to point the Elixir Tailwind config at the wrapper and disable the version check.

config/config.exs

  config :tailwind,
    version: "4.3.1",
+   path: "/path/to/tailwindcss-riscv64-linux-gnu-v4.3.1/bin/tailwindcss",
+   version_check: false,
    hello_phoenix: [
      args: ~w(
        --input=assets/css/app.css
        --output=priv/static/assets/css/app.css
      ),
      cd: Path.expand("..", __DIR__),
      env: %{"NODE_PATH" => [Path.expand("../deps", __DIR__), Mix.Project.build_path()]}
   ]

Also remove tailwind.install --if-missing, because the Elixir Tailwind downloader does not provide a Linux RISC-V binary.

mix.exs

defp aliases do
  [
-   "assets.setup": ["tailwind.install --if-missing", "esbuild.install --if-missing"],
+   "assets.setup": ["esbuild.install --if-missing"],
    "assets.build": ["compile", "tailwind hello_phoenix", "esbuild hello_phoenix"],
    "assets.deploy": [
      "tailwind hello_phoenix --minify",
      "esbuild hello_phoenix --minify",
      "phx.digest"
    ]
  ]
end

I built and verified this on Ubuntu 24.04 LTS on a Scaleway RISC-V server. Phoenix asset build/deploy worked, and the rendered page was styled correctly in the browser, and works correctly with Phoenix’s built-in hot reload feature.

The long-term upstream fix is still Bun support for Linux RISC-V, or a different official Tailwind standalone build path that does not depend on Bun. Until then, this gives Phoenix apps a technically-usable Tailwind v4 path on Linux RISC-V.

Showing Posts 1 to 1

olivermt

olivermt

Hi,

You could also pr risc support (if zig needs it?) into BeaconCMS’s compiler.

Once Brian merges my pr ( Add streaming candidate extraction by olivermt · Pull Request #2 · BeaconCMS/tailwind_compiler · GitHub ) then you should have all of tailwind in a box without needing node.

— All posts loaded —

Where Next? Top

Trending in Announcing Top

type1fool
WebAuthnLiveComponent WebAuthnComponents See this post about renaming the package. Passwordless authentication for Phoenix LiveView app...
New
GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
woylie
I released Doggo, a collection of unstyled Phoenix components. https://github.com/woylie/doggo Features Unstyled Phoenix components....
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
ahamez
Hi everyone, I’ve been working on this protobuf library for 3 years. We use it in the company I work for, EasyMile, to communicate with ...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
kip
I’ll shortly be launching Text, a nascent text analysis library. Current functionality In this early version (not ready for prime time) ...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
bartblast
Hey folks, I just published a post about Hologram’s funding and where the project goes next - the short version: Curiosum as Main Spons...
New
budgie
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with. But I don’t use it anymore. Serverless was the promis...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews