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

wojtekmach
Hey everyone! Req is an HTTP client for Elixir that I’ve been working on for quite some time. There is already a lot of HTTP clients out...
New
handnot2
Samly can be used to enable SAML 2.0 Single Sign On in a Plug/Phoenix application. This library uses Erlang esaml to provide plug enabl...
New
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
MRdotB
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
fuelen
Hi all! I want to present a small library which provides a mix task for generating an Entity-Relationship Diagram for Ecto schemas. You...
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
mudasobwa
I am seeing a lot of aplications of Argumentum ad Vericundiam in software discussions. They do link some piece of writing and point us to...
New
AstonJ
This showed up on my feed.. anyone heard of it? Just hype? Ox Alpha is a reasoning model designed for coding, sustained ag...
New
sergio
It’s not that it’s vocabulary is too advanced. It’s something worse. I get lost trying to follow even a paragraph written by Claude. It’...
New
sorenone
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
akoutmos
@hugobarauna, Dr. Dimitrios Koutmos (my brother) and I (Alex Koutmos) have been hard at work on writing a book on how you can use Elixir ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews