├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md ├── extension.toml └── src └── oxc.rs /.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | extension.wasm 3 | node_modules 4 | package-lock.json 5 | pnpm-lock.yaml 6 | package.json 7 | .DS_Store 8 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 4 4 | 5 | [[package]] 6 | name = "anyhow" 7 | version = "1.0.97" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" 10 | 11 | [[package]] 12 | name = "bitflags" 13 | version = "2.9.0" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" 16 | 17 | [[package]] 18 | name = "equivalent" 19 | version = "1.0.2" 20 | source = "registry+https://github.com/rust-lang/crates.io-index" 21 | checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" 22 | 23 | [[package]] 24 | name = "hashbrown" 25 | version = "0.15.2" 26 | source = "registry+https://github.com/rust-lang/crates.io-index" 27 | checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" 28 | 29 | [[package]] 30 | name = "heck" 31 | version = "0.4.1" 32 | source = "registry+https://github.com/rust-lang/crates.io-index" 33 | checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" 34 | dependencies = [ 35 | "unicode-segmentation", 36 | ] 37 | 38 | [[package]] 39 | name = "id-arena" 40 | version = "2.2.1" 41 | source = "registry+https://github.com/rust-lang/crates.io-index" 42 | checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" 43 | 44 | [[package]] 45 | name = "indexmap" 46 | version = "2.8.0" 47 | source = "registry+https://github.com/rust-lang/crates.io-index" 48 | checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" 49 | dependencies = [ 50 | "equivalent", 51 | "hashbrown", 52 | "serde", 53 | ] 54 | 55 | [[package]] 56 | name = "itoa" 57 | version = "1.0.15" 58 | source = "registry+https://github.com/rust-lang/crates.io-index" 59 | checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" 60 | 61 | [[package]] 62 | name = "leb128" 63 | version = "0.2.5" 64 | source = "registry+https://github.com/rust-lang/crates.io-index" 65 | checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" 66 | 67 | [[package]] 68 | name = "log" 69 | version = "0.4.27" 70 | source = "registry+https://github.com/rust-lang/crates.io-index" 71 | checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" 72 | 73 | [[package]] 74 | name = "memchr" 75 | version = "2.7.4" 76 | source = "registry+https://github.com/rust-lang/crates.io-index" 77 | checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" 78 | 79 | [[package]] 80 | name = "proc-macro2" 81 | version = "1.0.94" 82 | source = "registry+https://github.com/rust-lang/crates.io-index" 83 | checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" 84 | dependencies = [ 85 | "unicode-ident", 86 | ] 87 | 88 | [[package]] 89 | name = "quote" 90 | version = "1.0.40" 91 | source = "registry+https://github.com/rust-lang/crates.io-index" 92 | checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" 93 | dependencies = [ 94 | "proc-macro2", 95 | ] 96 | 97 | [[package]] 98 | name = "ryu" 99 | version = "1.0.20" 100 | source = "registry+https://github.com/rust-lang/crates.io-index" 101 | checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" 102 | 103 | [[package]] 104 | name = "semver" 105 | version = "1.0.26" 106 | source = "registry+https://github.com/rust-lang/crates.io-index" 107 | checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" 108 | 109 | [[package]] 110 | name = "serde" 111 | version = "1.0.219" 112 | source = "registry+https://github.com/rust-lang/crates.io-index" 113 | checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" 114 | dependencies = [ 115 | "serde_derive", 116 | ] 117 | 118 | [[package]] 119 | name = "serde_derive" 120 | version = "1.0.219" 121 | source = "registry+https://github.com/rust-lang/crates.io-index" 122 | checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" 123 | dependencies = [ 124 | "proc-macro2", 125 | "quote", 126 | "syn", 127 | ] 128 | 129 | [[package]] 130 | name = "serde_json" 131 | version = "1.0.140" 132 | source = "registry+https://github.com/rust-lang/crates.io-index" 133 | checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" 134 | dependencies = [ 135 | "itoa", 136 | "memchr", 137 | "ryu", 138 | "serde", 139 | ] 140 | 141 | [[package]] 142 | name = "smallvec" 143 | version = "1.14.0" 144 | source = "registry+https://github.com/rust-lang/crates.io-index" 145 | checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" 146 | 147 | [[package]] 148 | name = "spdx" 149 | version = "0.10.8" 150 | source = "registry+https://github.com/rust-lang/crates.io-index" 151 | checksum = "58b69356da67e2fc1f542c71ea7e654a361a79c938e4424392ecf4fa065d2193" 152 | dependencies = [ 153 | "smallvec", 154 | ] 155 | 156 | [[package]] 157 | name = "syn" 158 | version = "2.0.100" 159 | source = "registry+https://github.com/rust-lang/crates.io-index" 160 | checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" 161 | dependencies = [ 162 | "proc-macro2", 163 | "quote", 164 | "unicode-ident", 165 | ] 166 | 167 | [[package]] 168 | name = "unicode-ident" 169 | version = "1.0.18" 170 | source = "registry+https://github.com/rust-lang/crates.io-index" 171 | checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" 172 | 173 | [[package]] 174 | name = "unicode-segmentation" 175 | version = "1.12.0" 176 | source = "registry+https://github.com/rust-lang/crates.io-index" 177 | checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" 178 | 179 | [[package]] 180 | name = "unicode-xid" 181 | version = "0.2.6" 182 | source = "registry+https://github.com/rust-lang/crates.io-index" 183 | checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" 184 | 185 | [[package]] 186 | name = "wasm-encoder" 187 | version = "0.201.0" 188 | source = "registry+https://github.com/rust-lang/crates.io-index" 189 | checksum = "b9c7d2731df60006819b013f64ccc2019691deccf6e11a1804bc850cd6748f1a" 190 | dependencies = [ 191 | "leb128", 192 | ] 193 | 194 | [[package]] 195 | name = "wasm-metadata" 196 | version = "0.201.0" 197 | source = "registry+https://github.com/rust-lang/crates.io-index" 198 | checksum = "0fd83062c17b9f4985d438603cde0a5e8c5c8198201a6937f778b607924c7da2" 199 | dependencies = [ 200 | "anyhow", 201 | "indexmap", 202 | "serde", 203 | "serde_derive", 204 | "serde_json", 205 | "spdx", 206 | "wasm-encoder", 207 | "wasmparser", 208 | ] 209 | 210 | [[package]] 211 | name = "wasmparser" 212 | version = "0.201.0" 213 | source = "registry+https://github.com/rust-lang/crates.io-index" 214 | checksum = "84e5df6dba6c0d7fafc63a450f1738451ed7a0b52295d83e868218fa286bf708" 215 | dependencies = [ 216 | "bitflags", 217 | "indexmap", 218 | "semver", 219 | ] 220 | 221 | [[package]] 222 | name = "wit-bindgen" 223 | version = "0.22.0" 224 | source = "registry+https://github.com/rust-lang/crates.io-index" 225 | checksum = "288f992ea30e6b5c531b52cdd5f3be81c148554b09ea416f058d16556ba92c27" 226 | dependencies = [ 227 | "bitflags", 228 | "wit-bindgen-rt", 229 | "wit-bindgen-rust-macro", 230 | ] 231 | 232 | [[package]] 233 | name = "wit-bindgen-core" 234 | version = "0.22.0" 235 | source = "registry+https://github.com/rust-lang/crates.io-index" 236 | checksum = "e85e72719ffbccf279359ad071497e47eb0675fe22106dea4ed2d8a7fcb60ba4" 237 | dependencies = [ 238 | "anyhow", 239 | "wit-parser", 240 | ] 241 | 242 | [[package]] 243 | name = "wit-bindgen-rt" 244 | version = "0.22.0" 245 | source = "registry+https://github.com/rust-lang/crates.io-index" 246 | checksum = "fcb8738270f32a2d6739973cbbb7c1b6dd8959ce515578a6e19165853272ee64" 247 | 248 | [[package]] 249 | name = "wit-bindgen-rust" 250 | version = "0.22.0" 251 | source = "registry+https://github.com/rust-lang/crates.io-index" 252 | checksum = "d8a39a15d1ae2077688213611209849cad40e9e5cccf6e61951a425850677ff3" 253 | dependencies = [ 254 | "anyhow", 255 | "heck", 256 | "indexmap", 257 | "wasm-metadata", 258 | "wit-bindgen-core", 259 | "wit-component", 260 | ] 261 | 262 | [[package]] 263 | name = "wit-bindgen-rust-macro" 264 | version = "0.22.0" 265 | source = "registry+https://github.com/rust-lang/crates.io-index" 266 | checksum = "d376d3ae5850526dfd00d937faea0d81a06fa18f7ac1e26f386d760f241a8f4b" 267 | dependencies = [ 268 | "anyhow", 269 | "proc-macro2", 270 | "quote", 271 | "syn", 272 | "wit-bindgen-core", 273 | "wit-bindgen-rust", 274 | ] 275 | 276 | [[package]] 277 | name = "wit-component" 278 | version = "0.201.0" 279 | source = "registry+https://github.com/rust-lang/crates.io-index" 280 | checksum = "421c0c848a0660a8c22e2fd217929a0191f14476b68962afd2af89fd22e39825" 281 | dependencies = [ 282 | "anyhow", 283 | "bitflags", 284 | "indexmap", 285 | "log", 286 | "serde", 287 | "serde_derive", 288 | "serde_json", 289 | "wasm-encoder", 290 | "wasm-metadata", 291 | "wasmparser", 292 | "wit-parser", 293 | ] 294 | 295 | [[package]] 296 | name = "wit-parser" 297 | version = "0.201.0" 298 | source = "registry+https://github.com/rust-lang/crates.io-index" 299 | checksum = "196d3ecfc4b759a8573bf86a9b3f8996b304b3732e4c7de81655f875f6efdca6" 300 | dependencies = [ 301 | "anyhow", 302 | "id-arena", 303 | "indexmap", 304 | "log", 305 | "semver", 306 | "serde", 307 | "serde_derive", 308 | "serde_json", 309 | "unicode-xid", 310 | "wasmparser", 311 | ] 312 | 313 | [[package]] 314 | name = "zed-oxc" 315 | version = "0.1.4" 316 | dependencies = [ 317 | "zed_extension_api", 318 | ] 319 | 320 | [[package]] 321 | name = "zed_extension_api" 322 | version = "0.3.0" 323 | source = "registry+https://github.com/rust-lang/crates.io-index" 324 | checksum = "5e580c3ea59a92fc876756f3b4612f7a47ec86a34a1b9be099a24bd55401ff31" 325 | dependencies = [ 326 | "serde", 327 | "serde_json", 328 | "wit-bindgen", 329 | ] 330 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "zed-oxc" 3 | version = "0.1.4" 4 | edition = "2024" 5 | license = "MIT" 6 | publish = false 7 | 8 | [lib] 9 | crate-type = ["cdylib"] 10 | path = "src/oxc.rs" 11 | 12 | [dependencies] 13 | zed_extension_api = "0.3.0" 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Biome Developers and Contributors. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 |
3 |