Comments (10)
I removed some unused features and checked which crate depends on which feature.
swc_common:
- specialization
swc_ecma_parser:
- box_syntax
- box_patterns
- specialization
- never_type
- Removing uses of never_type will be easy
- Removing box_syntax will be easy
- Removing box_pattern may be tricky, but possible
- Specialization can be replaced with hand-written folder / visitor.
But lots of work is required
So I think it's possible and I'd like to do it, but I'm not sure how much time it would take.
from swc.
cc @alexcrichton
Currently swc depends on rustc-ap-* crates, but I think those crates will never be stabilized, is this correct? Then we should copy some code into swc..
Only hygiene and error reporting is used by swc, so it would not be too hard.
from swc.
Oh wow thanks for the speedy responses, this looks great!
I was trying to give this a spin locally with a few path
dependencies, but it looks like dependencies like scoped-tls
still have the nightly
feature enabled. Do I need to disabled some features of swc or something like that though?
from swc.
@alexcrichton Fixed it. I made a mistake while inlining rustc-ap crates.
It would work after a cargo update
from swc.
It got farther! I think though swc_macros_common
still uses some nightly features?
from swc.
Oh, my mistake..
I fixed and verified that stable rustc can build swc_ecma_parser
I guess you should run cargo update
.
https://github.com/kdy1/swc-stable-rust
from swc.
Ok great, thanks! Our use case will also need to write out the JS file after transforming it, does that mean that we would need the swc_ecma_codegen
crate as well?
from swc.
@alexcrichton Yes. I published swc_ecma_codgen v0.5.1 which can be built with stable rustc.
from swc.
Awesome, thanks again so much for your help!
from swc.
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
from swc.
Related Issues (20)
- Bugfix `bugfix/transform-safari-id-destructuring-collision-in-function-expression` does not work for transpiled class methods HOT 1
- transform providing an inputSourceMap throws an error [bad reference to source #299] HOT 1
- Minifier incorrectly renames identifiers
- _define_property() is mistakenly used for !-properties of the class HOT 1
- inputSourceMap default value is not true
- If the swc-core 0.88.* version is used, an error message is displayed HOT 1
- could not compile `swc_ecma_transforms_testing` (lib) due to 1 previous error HOT 10
- Fail to parse inside NodeJS but works on playground
- Async generator for-await loop with no yield incorrectly yields iterator node when targeting es6 or lower HOT 1
- Spreading array into arrow function receives undefined arguments
- Documented `swc.minifySync()` example doesn't work
- minifier: Expand an argument with a spread with an array
- minifier: invalid function handling in switch statement
- minifier: invalid inlining case expression in switch statement with fall-through case
- Soundness issue in `swc_visit`
- ast node walker HOT 1
- [BUG] `swc_bundler` example panick for multiple default exports (unreachable code is reached)
- minify: inlined variable declaration missing HOT 1
- minify: inlined variable declaration missing HOT 1
- docs.rs failed to build swc_common-0.33.22 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swc.