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.

First Post! Switch mode

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

bluzky
You may know https://ui.shadcn.com/, a UI component library for React. I really love it’s design style and components. I’ve built some co...
387 15136 120
New
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
restlessronin
The repo is at GitHub - cyberchitta/openai_ex: Community maintained Elixir library for OpenAI API · GitHub. Docs are at OpenaiEx User Gu...
152 11030 135
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
shahryarjb
The Chelekom project is a library of Phoenix and LiveView components generated via Mix tasks to fit developer needs seamlessly. One of i...
New
woylie
Phoenix components for pagination, sortable tables and filter forms with Flop and (optionally) Ecto. pagination cursor pagination sorta...
New
kip
Please say hi to a new lib, Astro that aims to deliver easy-to-consume astronomy calculations of practical use. For now it only calculat...
New

Other Trending Topics Top

akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
alexslade
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog It says that Fly is going all-in on sprites, which is a worry ...
New
Herve37
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using. We’re particularly inte...
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
matt-savvy
Is there a word for the ~> symbol used in Version strings? Do you also just call it a Squiggle Arrow™ ?!
New

We're in Beta

About us Mission Statement