From d026e33343cdca71274a8be51c3d3fa3d20b7d16 Mon Sep 17 00:00:00 2001 From: Boshen Date: Sat, 11 Feb 2023 12:55:42 +0800 Subject: [PATCH] chore: add rust-toolchain.toml and Cargo.toml --- CONTRIBUTING.md | 8 ++++++++ Cargo.toml | 24 ++++++++++++++++++++++++ crates/oxc_parser/Cargo.toml | 10 ++++++++++ crates/oxc_parser/src/lib.rs | 1 + rust-toolchain.toml | 5 +++++ 5 files changed, 48 insertions(+) create mode 100644 CONTRIBUTING.md create mode 100644 Cargo.toml create mode 100644 crates/oxc_parser/Cargo.toml create mode 100644 crates/oxc_parser/src/lib.rs create mode 100644 rust-toolchain.toml diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..5b8735408 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,8 @@ +# Installation + +```bash +# https://rustup.rs/ +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh + +cargo check +``` diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 000000000..e56cf7999 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,24 @@ +[workspace] +resolver = "2" +members = [ + "crates/*", +] + +[workspace.package] +authors = ["Boshen "] +description = "The JavaScript Oxidation Compiler" +edition = "2021" +homepage = "https://github.com/Boshen/oxc" +keywords = ["JavaScript", "TypeScript", "compiler", "parser"] +license = "MIT" +repository = "https://github.com/Boshen/oxc" +version = "0.0.0" + +[profile.release] +lto = "fat" +codegen-units = 1 +strip = true + +# DO NOT SET PANIC TO ABORT +# we are using catch_unwind for panic recovery +panic = "unwind" diff --git a/crates/oxc_parser/Cargo.toml b/crates/oxc_parser/Cargo.toml new file mode 100644 index 000000000..67ad04a49 --- /dev/null +++ b/crates/oxc_parser/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "oxc_parser" +authors.workspace = true +description.workspace = true +edition.workspace = true +homepage.workspace = true +keywords.workspace = true +license.workspace = true +repository.workspace = true +version.workspace = true diff --git a/crates/oxc_parser/src/lib.rs b/crates/oxc_parser/src/lib.rs new file mode 100644 index 000000000..c1cd84852 --- /dev/null +++ b/crates/oxc_parser/src/lib.rs @@ -0,0 +1 @@ +pub struct Parser; diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 000000000..3021375f0 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,5 @@ +[toolchain] +profile = "default" +# Use nightly for better access to the latest Rust features. +# This date is aligned to stable release dates. +channel = "nightly-2023-01-26"