Skip to content

Commit 46f45aa

Browse files
committed
feat: add binaries
1 parent 6d23ff3 commit 46f45aa

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

Cargo.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@ publish = false
88
name = "parser"
99
harness = false
1010

11+
[[bin]]
12+
name = "oxc"
13+
path = "src/oxc.rs"
14+
15+
[[bin]]
16+
name = "swc"
17+
path = "src/swc.rs"
18+
19+
[[bin]]
20+
name = "biome"
21+
path = "src/biome.rs"
22+
1123
[profile.release]
1224
opt-level = 3
1325
lto = "fat"

src/biome.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
use std::{env, fs, path::Path};
2+
3+
use bench_parser::biome;
4+
5+
pub fn main() {
6+
let path = env::args().nth(1).unwrap();
7+
let path = Path::new(&path);
8+
let source_text = fs::read_to_string(path).unwrap();
9+
let _ = biome::parse(path, &source_text);
10+
}

src/oxc.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
use std::{env, fs, path::Path};
2+
3+
use bench_parser::oxc;
4+
5+
pub fn main() {
6+
let path = env::args().nth(1).unwrap();
7+
let path = Path::new(&path);
8+
let source_text = fs::read_to_string(path).unwrap();
9+
let _ = oxc::parse(path, &source_text);
10+
}

src/swc.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
use std::{env, fs, path::Path};
2+
3+
use bench_parser::swc;
4+
5+
pub fn main() {
6+
let path = env::args().nth(1).unwrap();
7+
let path = Path::new(&path);
8+
let source_text = fs::read_to_string(path).unwrap();
9+
let _ = biome::swc(path, &source_text);
10+
}

0 commit comments

Comments
 (0)