Skip to content

Commit da70ebe

Browse files
authoredMay 31, 2024··
feat(x): Initialize project (#8999)
**Description:** SWC X will be a cross-module optimizer that utilizes an enormous amount of information. After merging this, I'll experiment with several approaches.
1 parent 993eccb commit da70ebe

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed
 

‎Cargo.lock

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ members = [
2121
"crates/swc_plugin_proxy",
2222
"crates/swc_timer",
2323
"crates/swc_xml",
24+
"crates/swc_x_optimizer",
2425
]
2526
resolver = "2"
2627

‎crates/swc_x_optimizer/Cargo.toml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[package]
2+
authors = ["강동윤 <kdy1997.dev@gmail.com>"]
3+
description = "Cross-module optimizer built on SWC"
4+
edition = "2021"
5+
license = "Apache-2.0"
6+
name = "swc_x_optimizer"
7+
repository = "https://github.com/swc-project/swc.git"
8+
version = "0.1.0"
9+
10+
11+
[dependencies]

‎crates/swc_x_optimizer/src/lib.rs

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
pub fn add(left: usize, right: usize) -> usize {
2+
left + right
3+
}
4+
5+
#[cfg(test)]
6+
mod tests {
7+
use super::*;
8+
9+
#[test]
10+
fn it_works() {
11+
let result = add(2, 2);
12+
assert_eq!(result, 4);
13+
}
14+
}

0 commit comments

Comments
 (0)
Please sign in to comment.