Skip to content

Commit

Permalink
feat(x): Initialize project (#8999)
Browse files Browse the repository at this point in the history
**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.
  • Loading branch information
kdy1 committed May 31, 2024
1 parent 993eccb commit da70ebe
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ members = [
"crates/swc_plugin_proxy",
"crates/swc_timer",
"crates/swc_xml",
"crates/swc_x_optimizer",
]
resolver = "2"

Expand Down
11 changes: 11 additions & 0 deletions crates/swc_x_optimizer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
authors = ["강동윤 <kdy1997.dev@gmail.com>"]
description = "Cross-module optimizer built on SWC"
edition = "2021"
license = "Apache-2.0"
name = "swc_x_optimizer"
repository = "https://github.com/swc-project/swc.git"
version = "0.1.0"


[dependencies]
14 changes: 14 additions & 0 deletions crates/swc_x_optimizer/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pub fn add(left: usize, right: usize) -> usize {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}

0 comments on commit da70ebe

Please sign in to comment.