Visually distinguish React Server Components and Client Components directly in your editor.
This repository is a bun workspace plus Cargo workspace monorepo that hosts the shared Rust analysis core and editor integrations for multiple platforms.
React Component Lens has one analysis implementation: packages/core. That Rust core parses JSX/TSX, resolves imports, detects "use client", and is validated against the static fixtures and goldens in conformance/.
Consumers use the same core through platform-specific wrappers:
- VS Code loads
packages/core-wasm, built withwasm-pack --target nodejs, and bundlescore_wasm.jspluscore_wasm_bg.wasminto the extension. - Zed uses the native
rcl-lspbinary from the Cargo workspace.
| Package | Path | Description |
|---|---|---|
| Rust core | packages/core |
Single source of truth for component analysis. |
| WASM wrapper | packages/core-wasm |
Node-targeted WASM package consumed by VS Code. |
| LSP server | packages/lsp |
Native rcl-lsp analysis server for editor clients. |
| Zed extension | packages/zed |
Zed integration that runs the native LSP server. |
| VS Code extension | packages/vscode |
The VS Code / Open VSX extension (devfive.react-component-lens). |
bun install # install all workspace dependencies
bun run build # build every package
bun run typecheck # type-check every package
bun run lint # lint the whole workspace
bun run test # run the test suite
bun run test:coverage # run Rust coverage with a 100% gateTo work on a single package, use bun's filter flag:
bun run --filter react-component-lens buildMIT