#webdev #wasm #perseus


A plugin for Perseus that automatically builds Tailwind CSS

6 releases

0.4.6 Feb 25, 2023
0.4.5 Feb 21, 2023
0.4.1 Nov 20, 2022

#449 in WebAssembly

Download history 5/week @ 2022-11-26 3/week @ 2022-12-03 1/week @ 2022-12-10 3/week @ 2022-12-17 3/week @ 2022-12-24 4/week @ 2022-12-31 1/week @ 2023-01-07 3/week @ 2023-01-14 6/week @ 2023-01-21 3/week @ 2023-01-28 46/week @ 2023-02-04 23/week @ 2023-02-11 49/week @ 2023-02-18 33/week @ 2023-02-25 4/week @ 2023-03-04 3/week @ 2023-03-11

95 downloads per month


133 lines

Perseus Tailwind Plugin

This is a simple plugin for Perseus that runs the Tailwind CLI at build time. It will automatically download the newest version of the CLI initialize the project to look for class names in Rust files in src and HTML files in static. Further configuration can be done as usual in tailwind.config.js.


Add the plugin to you Perseus App in your Perseus main function.

        perseus_tailwind::TailwindOptions {
            in_file: "src/tailwind.css".into(),
            // Don't put this in /static, it will trigger build loops.
            // Put this in /dist and use a static alias instead.
            out_file: "dist/tailwind.css".into(),
    .static_alias("/tailwind.css", "dist/tailwind.css")

If you're already using plugins just add the plugin to your Plugins as usual.


Major and minor versions will follow the Perseus version for simplicity. This means 0.4 of this plugin will work with Perseus 0.4.x, 0.5 would work with a future 0.5 version of Perseus, etc.

Using a custom binary

If you for some reason want to use a specific version of the CLI or some other CLI with the same command line interface entirely, just place the binary with its default system-specific name (i.e. tailwindcss-linux-arm64) in the project directory.


The plugin is fairly simple and shouldn't break anything since it just executes the Tailwind CLI. The download and installation should work on Linux, macOS and Windows on all architectures that are supported by Tailwind, but is currently only tested on Windows x64.


~406K SLoC