Giter Site home page Giter Site logo

Comments (10)

kdy1 avatar kdy1 commented on May 7, 2024 1

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.

kdy1 avatar kdy1 commented on May 7, 2024

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.

alexcrichton avatar alexcrichton commented on May 7, 2024

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.

kdy1 avatar kdy1 commented on May 7, 2024

@alexcrichton Fixed it. I made a mistake while inlining rustc-ap crates.
It would work after a cargo update

from swc.

alexcrichton avatar alexcrichton commented on May 7, 2024

It got farther! I think though swc_macros_common still uses some nightly features?

from swc.

kdy1 avatar kdy1 commented on May 7, 2024

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.

alexcrichton avatar alexcrichton commented on May 7, 2024

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.

kdy1 avatar kdy1 commented on May 7, 2024

@alexcrichton Yes. I published swc_ecma_codgen v0.5.1 which can be built with stable rustc.

from swc.

alexcrichton avatar alexcrichton commented on May 7, 2024

Awesome, thanks again so much for your help!

from swc.

swc-bot avatar swc-bot commented on May 7, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.