Replies: 1 comment 1 reply
-
|
Yeap. It was one of the goals of the project from the start, but
this is not because of the documentation of SWC |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I think SWC is no longer just a simple compiler; it has taken on the responsibility of being a major infrastructure component within the Rust frontend ecosystem.
Babel is not merely a "tool that transforms code from A to B"; it is de facto ecosystem infrastructure. It provides a default AST shape that everyone agrees on, along with a comprehensive suite of plugins, analysis tools, and transformation capabilities surrounding that AST. Many frontend tools directly utilize Babel's parser, traverse, and AST structures.
On the Rust side, my observation is that SWC is, in a sense, already playing a similar role:
Judging by crate usage, SWC has become more than just "a compiler that can replace Babel"—it is a core piece of infrastructure for Rust frontend tooling.
However, in terms of public presentation, the current focus still seems to be primarily on:
For the average frontend developer, this positioning is clear enough. But for those building frontend tools in Rust, the actual usage scenarios have clearly surpassed the baseline of just being a "Speedy Web Compiler."
Therefore, I have a few specific questions and thoughts:
Does SWC have the intention—or is it already in the roadmap—to view itself as "infrastructure for the Rust frontend ecosystem" and a "candidate for the de facto AST standard"? In other words, rather than just being a "Web development tool/compiler in Rust," is there a formal goal to explicitly "provide general-purpose infrastructure for other Rust frontend tools"?
Another observation is that in recent years, some open-source projects using Rust/Go have attempted to build "all-in-one" unified toolchains, implementing a parser, transformer, linter, formatter, test runner, etc., all within a single project. My personal view is that it isn't necessary to bind every link in the chain to the same project. A more reasonable model for the entire ecosystem might be: having a layer of relatively stable, general-purpose infrastructure (e.g., AST, parser), upon which other tools can implement their specific responsibilities (such as linters, formatters, bundlers, analysis tools, etc.).
From this perspective, SWC's position in the Rust frontend tool ecosystem is actually very critical: it has naturally grown into that "infrastructure layer." If the project is willing to embrace this positioning more explicitly—for instance by:
...then it would provide much greater reference value for other Rust frontend tools and help reduce the situation where every project reinvents its own AST/parser "wheels".
Beta Was this translation helpful? Give feedback.
All reactions