Giter Site home page Giter Site logo

oxc's Introduction

The JavaScript Oxidation Compiler (oxc)

Discord chat Build Status npm version Crates.io Docs.rs

Code Coverage Code Size MIT licensed

The Oxidation Compiler is currently creating a suite of tools for the JavaScript/TypeScript language, which comprises:

Goals

The primary objectives for this project include:

  • Create a really fast native program by using the Rust programming language
  • Provide the basic building blocks for creating your own tools by having good API designs
  • Provide good documentation on learning Rust and compiler techniques

Performance issues are considered as bugs in this project.

Contributing

This project is an invitation for you to come and learn Rust with us, We welcome and appreciate all contributions to this project.

To get started, check out CONTRIBUTING.md.

If you are unable to contribute code,, you can still participate by:

Milestone

As of now, Oxc has a fully working parser and a prototype for the linter.

The current objectives are:

  • A MVP (Most Viable Product) for the linter.
  • A prototype for the minifier.

Linter

The linter is fast to the extent that it feels broken.

With a few rules implemented, testing in the VSCode repo:

vscode  main ❯ npx oxidation-compiler@latest lint src
Checked 3479 files in 335ms using 12 cores.
Found 17 errors.

And also in a huge monorepo:

Checked 73660 files in 7415ms using 12 cores.
Found 470 errors.

On my Intel i7 6-core, the linter is around 84 times faster than ESLint. But we'll get slightly slower as we add more features.

See benchmark for details.

Try it out yourself!

The linter is currently usable and it can potentially catch a few mistakes for you:

npx oxidation-compiler@latest lint path

All feedbacks are welcome.

Parser Conformance

The cargo coverage command reports the following conformance summary

Test262 Summary:
AST Parsed     : 44000/44000 (100.00%)
Positive Passed: 44000/44000 (100.00%)
Negative Passed: 3915/3915 (100.00%)

Babel Summary:
AST Parsed     : 2065/2071 (99.71%)
Positive Passed: 2062/2071 (99.57%)
Negative Passed: 1332/1502 (88.68%)

TypeScript Summary:
TypeScript Summary:
AST Parsed     : 2337/2337 (100.00%)
Positive Passed: 2331/2337 (99.74%)
Negative Passed: 673/2535 (26.55%)

Test262 conformance is complete. TypeScript parsing is complete.

Only unstable stage 3 json-modules and stage 3 decorators tests are skipped.

Learning Resources

Credits

This project was incubated with the assistance of these exceptional mentors and their projects:

License

MIT

Third Party Licenses

Licenses are list in THIRD-PARTY-LICENSE

This project partially copies code from the following projects:

Project License
eslint/eslint MIT
typescript-eslint/typescript-eslint MIT
microsoft/TypeScript Apache 2.0
rome/tools MIT
mozilla-spidermonkey/jsparagus MIT Apache 2.0
acorn MIT
miette Apache 2.0
terser BSD

oxc's People

Contributors

amitdahan avatar ashsearle avatar boshen avatar domonji avatar fnll avatar jason89521 avatar kasperzutterman avatar magic-akari avatar mysteryven avatar riesaex avatar shannonrothe avatar thepassle avatar yangchenye323 avatar yesmeck avatar yonifeng avatar

Watchers

 avatar

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.