Skip to content

Latest commit

 

History

History
65 lines (43 loc) · 2.02 KB

CONTRIBUTING.md

File metadata and controls

65 lines (43 loc) · 2.02 KB

Contributor License Agreement

Please note that you will be required to sign the Contributor License Agreement before your pull request can be accepted.

Installation

Clone Repo

git clone --recurse-submodules [email protected]:web-infra-dev/oxc.git

The --recurse-submodules flag will install the following submodules:

  • babel registered for path tasks/coverage/babel
  • test262 registered for path tasks/coverage/test262
  • typescript registered for path tasks/coverage/typescript

New to Rust

Install Rust

# https://rustup.rs/
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# move to the cloned repository
cd oxc
# rust toolchain
rustup show

rustup show reads the ./rust-toolchain.toml file and installs the correct Rust toolchain and components for this project.

Cargo Tools

Some additional Cargo tools are required for developing this project, they can be installed via cargo binstall. cargo binstall provides a low-complexity mechanism for installing rust binaries as an alternative to building from source via the slower cargo install.

You can download the pre-compiled binary and save it in ~/.cargo/bin or install it by running cargo install cargo-binstall

Required tools

cargo binstall just -y

just is a handy way to save and run project-specific commands. To initialize all the required tools, run

just init

Commands

Run just for the list of available commands.

Run just r (alias for just ready) to make sure the whole project builds and runs correctly.

Take a look at just new-rule if you need to start porting a new ESLint rule. Make sure the rule is registered in crates/oxc_linter/src/rules.rs.