stylex-swc-plugin

(★ 108)

Rust/NAPI-RS/SWC compiler for StyleX CSS-in-JS — a faster, Babel-free replacement for @stylexjs/babel-plugin with plugins for Next.js, Vite, webpack, Rspack, Rollup, Turbopack, PostCSS, and Jest.

Showing a partial file list — download the zip above to see everything.

  • .claude
  • .cursor
  • .czrc
  • .editorconfig
  • .gemini
  • .git-blame-ignore-revs
  • .gitattributes
  • .gitignore
  • .npmrc
  • .oxfmtrc.json
  • .oxlintrc.jsonc
  • .syncpackrc
  • AGENTS.md
  • Cargo.lock
  • Cargo.toml
  • CLAUDE.md
  • clippy.toml
  • CODEX.md
  • commitlint.config.js
  • CONTEXT-MAP.md
  • CONTEXT.md
  • CURSOR.md
  • GEMINI.md
  • LICENSE
  • Makefile
  • NOTICE.md
  • README.md

# Installation Guide

1. Get the code
git clone https://github.com/Dwlad90/stylex-swc-plugin

Downloads the entire project code from GitHub to your computer.

cd stylex-swc-plugin

Moves into the project folder you just downloaded.

2. Node.js

Easy Recommended
Prerequisites
  • Git Needed to download the project code from GitHub.
  • Node.js Node.js must be installed to use npm. The LTS version is recommended.
npm install --save-dev @stylexswc/nextjs-plugin

Downloads and installs the libraries listed in package.json.

npm install @stylexjs/stylex

Downloads and installs the libraries listed in package.json.

npm install --save-dev @stylexswc/unplugin

Downloads and installs the libraries listed in package.json.

After running the command, open the address shown in the terminal (usually something like http://localhost:3000) in your browser.

Pulled directly from this repo's README.

3. Rust

Medium
Prerequisites
  • Git Needed to download the project code from GitHub.
  • Rust (rustup) Installing via rustup also installs cargo.
cargo build --release

Compiles the Rust project.

cargo run

Builds and then immediately runs the program.

If cargo build finishes without errors, it worked. The executable is created under target/.

4. Make

Medium
Prerequisites
  • Git Needed to download the project code from GitHub.
  • Make Usually pre-installed on Linux/macOS. On Windows, install separately (e.g. via MSYS2 or WSL).
make setup

Compiles the code based on the generated build configuration to produce an executable.

make build

Compiles the code based on the generated build configuration to produce an executable.

make test

Compiles the code based on the generated build configuration to produce an executable.

make quick-check

Compiles the code based on the generated build configuration to produce an executable.

If it finishes without errors, it worked. Try running the generated executable directly.

Pulled directly from this repo's README.

// repository documentation