diff --git a/Cargo.lock b/Cargo.lock index 7c206283ec97b..d8f184642fe09 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -216,9 +216,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.13" +version = "1.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7777341816418c02e033934a09f20dc0ccaf65a5201ef8a450ae0105a573fda" +checksum = "0c3d1b2e905a3a7b00a6141adb0e4c0bb941d11caf55349d863942a1cc44e3c9" dependencies = [ "shlex", ] @@ -258,13 +258,15 @@ dependencies = [ [[package]] name = "codspeed" -version = "2.7.2" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "450a0e9df9df1c154156f4344f99d8f6f6e69d0fc4de96ef6e2e68b2ec3bce97" +checksum = "25d2f5a6570db487f5258e0bded6352fa2034c2aeb46bb5cc3ff060a0fcfba2f" dependencies = [ "colored", "libc", + "serde", "serde_json", + "uuid", ] [[package]] @@ -439,9 +441,18 @@ dependencies = [ [[package]] name = "ctor" -version = "0.3.0" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "035a5c3c87da8be7a0e5ebd6fbabcccd8651a59c27197096d1dfd74f312aaee5" +dependencies = [ + "ctor-proc-macro", +] + +[[package]] +name = "ctor-proc-macro" +version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f06b1425736ba96096116f063c9d10be2352a7cde0cbea829a717008e114aec9" +checksum = "107adb396b2d8e7766e79151083ce1cc624b51dfd1c23e0429c50226bba693eb" [[package]] name = "darling" @@ -568,9 +579,9 @@ dependencies = [ [[package]] name = "document-features" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6969eaabd2421f8a2775cfd2471a2b634372b4a25d41e3bd647b79912850a0" +checksum = "95249b50c6c185bee49034bcb378a49dc2b5dff0be90ff6616d31d64febab05d" dependencies = [ "litrs", ] @@ -633,9 +644,9 @@ dependencies = [ [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" @@ -1904,6 +1915,7 @@ dependencies = [ name = "oxc_minify_napi" version = "0.30.3" dependencies = [ + "ctor", "napi", "napi-build", "napi-derive", @@ -1939,6 +1951,7 @@ dependencies = [ name = "oxc_napi" version = "0.51.0" dependencies = [ + "ctor", "napi", "napi-build", "napi-derive", @@ -1972,6 +1985,7 @@ dependencies = [ name = "oxc_parser_napi" version = "0.51.0" dependencies = [ + "ctor", "napi", "napi-build", "napi-derive", @@ -2046,9 +2060,9 @@ dependencies = [ [[package]] name = "oxc_resolver" -version = "4.0.1" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52920a49f079f3207212bce49943395c8aa78638ed5258386136d237057e56fc" +checksum = "2ebc46f1d5b6be61afc868187dd5ee30829fb681f34643dabfbc5a6067e2fc49" dependencies = [ "cfg-if", "indexmap", @@ -2180,6 +2194,7 @@ dependencies = [ name = "oxc_transform_napi" version = "0.51.0" dependencies = [ + "ctor", "napi", "napi-build", "napi-derive", @@ -2565,15 +2580,14 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "ring" -version = "0.17.8" +version = "0.17.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +checksum = "e75ec5e92c4d8aede845126adc388046234541629e76029599ed35a003c7ed24" dependencies = [ "cc", "cfg-if", "getrandom 0.2.15", "libc", - "spin", "untrusted", "windows-sys 0.52.0", ] @@ -2694,9 +2708,9 @@ checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" [[package]] name = "ryu-js" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad97d4ce1560a5e27cec89519dc8300d1aa6035b099821261c651486a19e44d5" +checksum = "dd29631678d6fb0903b69223673e122c32e9ae559d0960a38d574695ebc0ea15" [[package]] name = "same-file" @@ -2954,9 +2968,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.2" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" [[package]] name = "smawk" @@ -2974,12 +2988,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -3055,9 +3063,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.16.0" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38c246215d7d24f48ae091a2902398798e05d978b24315d6efbc00ede9a8bb91" +checksum = "a40f762a77d2afa88c2d919489e390a12bdd261ed568e60cfa7e48d4e20f0d33" dependencies = [ "cfg-if", "fastrand", @@ -3476,6 +3484,15 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" +[[package]] +name = "uuid" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced87ca4be083373936a67f8de945faa23b6b42384bd5b64434850802c6dccd0" +dependencies = [ + "getrandom 0.3.1", +] + [[package]] name = "valuable" version = "0.1.1" diff --git a/Cargo.toml b/Cargo.toml index f397027be379d..a64c8a5259b51 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -145,6 +145,7 @@ console_error_panic_hook = "0.1.7" convert_case = "0.7.1" cow-utils = "0.1.3" criterion2 = { version = "2.0.0", default-features = false } +ctor = "0.3.4" encoding_rs = "0.8.35" encoding_rs_io = "0.1.7" env_logger = { version = "0.11.6", default-features = false } @@ -202,7 +203,7 @@ walkdir = "2.5.0" wasm-bindgen = "0.2.100" [workspace.metadata.cargo-shear] -ignored = ["napi", "oxc_transform_napi", "oxc_parser_napi", "prettyplease"] +ignored = ["napi", "oxc_transform_napi", "oxc_parser_napi", "prettyplease", "ctor"] [profile.dev] # Disabling debug info speeds up local and CI builds, diff --git a/crates/oxc_napi/Cargo.toml b/crates/oxc_napi/Cargo.toml index f645cd8dfa04e..579399df47304 100644 --- a/crates/oxc_napi/Cargo.toml +++ b/crates/oxc_napi/Cargo.toml @@ -21,6 +21,7 @@ doctest = false crate-type = ["lib", "cdylib"] [dependencies] +ctor = { workspace = true } napi = { workspace = true } napi-derive = { workspace = true } oxc_diagnostics = { workspace = true } diff --git a/napi/minify/Cargo.toml b/napi/minify/Cargo.toml index 497b4e6311b6d..eb0cabf8c9f45 100644 --- a/napi/minify/Cargo.toml +++ b/napi/minify/Cargo.toml @@ -29,6 +29,7 @@ oxc_sourcemap = { workspace = true, features = ["napi", "rayon"] } oxc_span = { workspace = true } oxc_syntax = { workspace = true } +ctor = { workspace = true } napi = { workspace = true } napi-derive = { workspace = true } diff --git a/napi/parser/Cargo.toml b/napi/parser/Cargo.toml index a4a00b17aa56d..b8c1783f6db89 100644 --- a/napi/parser/Cargo.toml +++ b/napi/parser/Cargo.toml @@ -32,6 +32,7 @@ self_cell = { workspace = true } serde_json = { workspace = true } string_wizard = { workspace = true, features = ["sourcemap", "serde"] } +ctor = { workspace = true } napi = { workspace = true, features = ["async"] } napi-derive = { workspace = true } diff --git a/napi/transform/Cargo.toml b/napi/transform/Cargo.toml index f3e060917d8ee..3b1e2c851b219 100644 --- a/napi/transform/Cargo.toml +++ b/napi/transform/Cargo.toml @@ -27,6 +27,7 @@ oxc_sourcemap = { workspace = true, features = ["napi", "rayon"] } rustc-hash = { workspace = true } +ctor = { workspace = true } napi = { workspace = true } napi-derive = { workspace = true }