-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: rewrite compiler in rust, first commit
- Loading branch information
0 parents
commit 66bfe74
Showing
35 changed files
with
4,904 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/target | ||
/Cargo.lock | ||
/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Inject jest's assertion (expect) into global scope for the Mocha | ||
// to use same assertion between node-swc & rest. | ||
global.expect = require("expect"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* https://github.com/swc-project/swc/pull/3009 | ||
* | ||
* There are 2 test runners in this repo: | ||
* - jest is being used for unit testing node-swc packages with javascript test cases | ||
* - mocha is being used for cargo's test requires js runtime to validate its transform. | ||
* | ||
* This config is for the mocha test runner invoked by cargo to resolve its global setup file. | ||
*/ | ||
module.exports = { | ||
require: require.resolve("./.mocha.setup.js"), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nodeLinker: node-modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
[package] | ||
name = "jymfony-compiler" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[lib] | ||
crate-type = ["cdylib", "rlib"] | ||
|
||
[dependencies] | ||
anyhow = { version = "1", features = ["backtrace"] } | ||
base64 = "0.21.4" | ||
getrandom = { version = "0.2.10", features = ["js"] } | ||
js-sys = "0.3" | ||
lazy_static = "1.4.0" | ||
rand = "0.8.5" | ||
rustc-hash = "1.1.0" | ||
serde = { version = "1.0", features = ["derive"] } | ||
serde-wasm-bindgen = "0.6" | ||
sourcemap = "6.4.1" | ||
swc_atoms = "0.6.0" | ||
swc_common = { version = "0.33.0", features = ["anyhow", "sourcemap"] } | ||
swc_ecma_ast = "0.110.0" | ||
swc_ecma_codegen = "0.146.1" | ||
swc_ecma_parser = "0.141.1" | ||
swc_ecma_transforms_base = "0.134.3" | ||
swc_ecma_transforms_compat = "0.160.4" | ||
swc_ecma_transforms_module = "0.177.4" | ||
swc_ecma_transforms_proposal = "0.168.6" | ||
swc_ecma_transforms_typescript = "0.184.6" | ||
swc_ecma_visit = "0.96.0" | ||
swc_ecma_utils = "0.124.3" | ||
url = "2.4" | ||
wasm-bindgen = { version = "0.2", features = ["serde-serialize"] } | ||
wasm-bindgen-derive = "0.2" | ||
|
||
[dev-dependencies] | ||
ansi_term = "0.12.1" | ||
hex = "0.4.3" | ||
sha1 = "0.10.6" | ||
swc_ecma_transforms_testing = "0.137.4" | ||
tempfile = "3.8.0" | ||
testing = "0.35.0" | ||
wasm-bindgen-test = "0.3" | ||
|
||
[profile.release] | ||
opt-level = 3 |
Oops, something went wrong.