Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Rust extractor #2436

Open
Open
@timofei-iatsenko

Description

@timofei-iatsenko

I’m pretty close to building a Rust version of the extractor using SWC.

Therecent changes finally closed the gap between the Babel macro and SWC, so they’re now at feature parity. That was the hardest part, since most of the heavy lifting actually happens inside the macro itself.

When I say “extractor”, I don’t mean a full CLI rewrite. I’m talking only about the part that analyzes source files and extracts messages — the bit that’s currently done by Babel.

The idea is to ship the Rust extractor as a separate package at first, alongside the existing Babel one. After some real-world testing, it could become the default, while keeping the Babel extractor around for Vue and other JS-based setups.

To get there, we’d need to port@lingui/babel-plugin-extract-messages to Rust. The plugin is pretty small (~400 LOC), and I think an LLM could handle most of that work without much trouble.

After that, we can build a small Rust program on top of SWC, bake in all the required transforms, compile it into a single binary, and expose it to Node.js usingnapi-rs. In the end, this would just be a prebuilt binary with one job: extract messages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2026 Movatter.jp