├── .gitignore ├── languages └── mojo │ ├── overrides.scm │ ├── brackets.scm │ ├── indents.scm │ ├── textobjects.scm │ ├── embedding.scm │ ├── outline.scm │ ├── config.toml │ └── highlights.scm ├── Cargo.toml ├── extension.toml ├── readme.md ├── test.🔥 ├── src └── mojo.rs └── Cargo.lock /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | grammars 3 | extension.wasm 4 | test.🔥 5 | -------------------------------------------------------------------------------- /languages/mojo/overrides.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment 2 | (string) @string 3 | -------------------------------------------------------------------------------- /languages/mojo/brackets.scm: -------------------------------------------------------------------------------- 1 | ("(" @open ")" @close) 2 | ("[" @open "]" @close) 3 | ("{" @open "}" @close) 4 | -------------------------------------------------------------------------------- /languages/mojo/indents.scm: -------------------------------------------------------------------------------- 1 | (_ "[" "]" @end) @indent 2 | (_ "{" "}" @end) @indent 3 | (_ "(" ")" @end) @indent 4 | -------------------------------------------------------------------------------- /languages/mojo/textobjects.scm: -------------------------------------------------------------------------------- 1 | (comment)+ @comment.around 2 | 3 | (function_definition 4 | body: (_) @function.inside) @function.around 5 | 6 | (class_definition 7 | body: (_) @class.inside) @class.around 8 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "zed-mojo" 3 | version = "0.1.0" 4 | edition = "2021" 5 | license = "MIT" 6 | 7 | [lib] 8 | path = "src/mojo.rs" 9 | crate-type = ["cdylib"] 10 | 11 | [dependencies] 12 | zed_extension_api = "0.1.0" 13 | -------------------------------------------------------------------------------- /languages/mojo/embedding.scm: -------------------------------------------------------------------------------- 1 | (class_definition 2 | "class" @context 3 | name: (identifier) @name 4 | ) @item 5 | 6 | (function_definition 7 | "async"? @context 8 | "def" @context 9 | name: (_) @name) @item 10 | -------------------------------------------------------------------------------- /languages/mojo/outline.scm: -------------------------------------------------------------------------------- 1 | (decorator) @annotation 2 | 3 | (class_definition 4 | "class" @context 5 | name: (identifier) @name 6 | ) @item 7 | 8 | (function_definition 9 | "async"? @context 10 | "def" @context 11 | name: (_) @name) @item 12 | -------------------------------------------------------------------------------- /extension.toml: -------------------------------------------------------------------------------- 1 | id = "mojo" 2 | name = "Mojo" 3 | description = "Mojo Language Support" 4 | version = "0.1.0" 5 | schema_version = 1 6 | authors = ["Raunak Raj "] 7 | repository = "https://github.com/bajrangCoder/zed-mojo" 8 | 9 | [grammars.mojo] 10 | repository = "https://github.com/lsh/tree-sitter-mojo" 11 | commit = "564d5a8489e20e5f723020ae40308888699055c0" 12 | 13 | [language_servers.mojo] 14 | name = "Mojo LSP" 15 | language = "Mojo" 16 | -------------------------------------------------------------------------------- /languages/mojo/config.toml: -------------------------------------------------------------------------------- 1 | name = "Mojo" 2 | grammar = "mojo" 3 | path_suffixes = ["mojo", "🔥"] 4 | line_comments = ["# "] 5 | autoclose_before = ";:.,=}])>" 6 | brackets = [ 7 | { start = "{", end = "}", close = true, newline = true }, 8 | { start = "[", end = "]", close = true, newline = true }, 9 | { start = "(", end = ")", close = true, newline = true }, 10 | { start = "\"", end = "\"", close = true, newline = false, not_in = ["string"] }, 11 | { start = "'", end = "'", close = true, newline = false, not_in = ["string"] }, 12 | ] 13 | 14 | auto_indent_using_last_non_empty_line = false 15 | increase_indent_pattern = ":\\s*$" 16 | decrease_indent_pattern = "^\\s*(else|elif|except|finally)\\b.*:" 17 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Zed Mojo 2 | 3 | A Zed extension to provide Mojo language support with syntax highlighting and LSP integration. 4 | 5 | ## Features 6 | 7 | - Syntax highlighting 8 | - Outlines 9 | - Language Server Protocol (LSP) support 10 | 11 | ## Installation 12 | 13 | 1. Install the [Pixi](https://pixi.sh) 14 | 2. Clone this repository 15 | 3. Open Zed and click "Install Dev Extension" from the extensions page 16 | 4. Select the cloned repository 17 | 18 | ### Formatter Settings 19 | 20 | Enable formatting by adding following in zed setting : 21 | 22 | ```json 23 | { 24 | "languages": { 25 | "mojo": { 26 | "formatter": { 27 | "external": { 28 | "command": "pixi", 29 | "arguments": ["run", "mojo", "format", "-q", "-"] 30 | } 31 | } 32 | } 33 | } 34 | } 35 | ``` 36 | 37 | ## Grammar 38 | 39 | The extension uses [tree-sitter-mojo](https://github.com/lsh/tree-sitter-mojo/) for syntax highlighting. 40 | 41 | ## Contributing 42 | 43 | Feedback and contributions are welcome! Please share your suggestions to help improve this extension. 44 | -------------------------------------------------------------------------------- /test.🔥: -------------------------------------------------------------------------------- 1 | # ===----------------------------------------------------------------------=== # 2 | # Copyright (c) 2023, Modular Inc. All rights reserved. 3 | # 4 | # Licensed under the Apache License v2.0 with LLVM Exceptions: 5 | # https://llvm.org/LICENSE.txt 6 | # 7 | # Unless required by applicable law or agreed to in writing, software 8 | # distributed under the License is distributed on an "AS IS" BASIS, 9 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | # See the License for the specific language governing permissions and 11 | # limitations under the License. 12 | # ===----------------------------------------------------------------------=== # 13 | # RUN: %mojo %s | FileCheck %s 14 | 15 | # This sample implements a simple reduction operation on a 16 | # large array of values to produce a single result. 17 | # Reductions and scans are common algorithm patterns in parallel computing. 18 | 19 | from random import rand 20 | 21 | from algorithm import sum 22 | from benchmark import Unit, benchmark, keep 23 | from buffer import Buffer 24 | from memory import UnsafePointer 25 | from python import Python 26 | 27 | # Change these numbers to reduce on different sizes 28 | alias size_small: Int = 1 << 21 29 | alias size_large: Int = 1 << 27 30 | 31 | # Datatype for Tensor/Array 32 | alias type = DType.float32 33 | alias scalar = Scalar[type] 34 | 35 | 36 | # Use the https://en.wikipedia.org/wiki/Kahan_summation_algorithm 37 | # Simple summation of the array elements 38 | fn naive_reduce_sum[size: Int](buffer: Buffer[type, size]) raises -> scalar: 39 | var my_sum: scalar = 0 40 | var c: scalar = 0 41 | for i in range(buffer.size): 42 | var y = buffer[i] - c 43 | var t = my_sum + y 44 | c = (t - my_sum) - y 45 | my_sum = t 46 | return my_sum 47 | 48 | 49 | fn stdlib_reduce_sum[size: Int](array: Buffer[type, size]) raises -> scalar: 50 | var my_sum = sum(array) 51 | return my_sum 52 | 53 | 54 | def pretty_print(name: String, elements: Int, time: Float64): 55 | py = Python.import_module("builtins") 56 | py.print( 57 | py.str("{:<16} {:>11,} {:>8.2f}ms").format( 58 | name + " elements:", elements, time 59 | ) 60 | ) 61 | 62 | 63 | fn bench[ 64 | func: fn[size: Int] (buffer: Buffer[type, size]) raises -> scalar, 65 | size: Int, 66 | name: String, 67 | ](buffer: Buffer[type, size]) raises: 68 | @parameter 69 | fn runner() raises: 70 | var result = func[size](buffer) 71 | keep(result) 72 | 73 | var ms = benchmark.run[runner](max_runtime_secs=0.5).mean(Unit.ms) 74 | pretty_print(name, size, ms) 75 | 76 | 77 | fn main() raises: 78 | print( 79 | "Sum all values in a small array and large array\n" 80 | "Shows algorithm.sum from stdlib with much better performance\n" 81 | ) 82 | # Allocate and randomize data, then create two buffers 83 | var ptr_small = UnsafePointer[Scalar[type]].alloc(size_small) 84 | var ptr_large = UnsafePointer[Scalar[type]].alloc(size_large) 85 | 86 | rand(ptr_small, size_small) 87 | rand(ptr_large, size_large) 88 | 89 | var buffer_small = Buffer[type, size_small](ptr_small) 90 | var buffer_large = Buffer[type, size_large](ptr_large) 91 | 92 | bench[naive_reduce_sum, size_small, "naive"](buffer_small) 93 | bench[naive_reduce_sum, size_large, "naive"](buffer_large) 94 | bench[stdlib_reduce_sum, size_small, "stdlib"](buffer_small) 95 | # CHECK: stdlib elements 96 | bench[stdlib_reduce_sum, size_large, "stdlib"](buffer_large) 97 | 98 | ptr_small.free() 99 | ptr_large.free() 100 | -------------------------------------------------------------------------------- /languages/mojo/highlights.scm: -------------------------------------------------------------------------------- 1 | (attribute attribute: (identifier) @property) 2 | (type (identifier) @type) 3 | 4 | 5 | ; Function calls 6 | 7 | (decorator) @function 8 | 9 | (call 10 | function: (attribute attribute: (identifier) @function.method)) 11 | (call 12 | function: (identifier) @function) 13 | 14 | ; Function definitions 15 | 16 | (function_definition 17 | name: (identifier) @function) 18 | 19 | ; Identifier naming conventions 20 | 21 | ((identifier) @type 22 | (#match? @type "^[A-Z]")) 23 | 24 | ((identifier) @constant 25 | (#match? @constant "^_*[A-Z][A-Z\\d_]*$")) 26 | 27 | ; Builtin functions 28 | 29 | ((call 30 | function: (identifier) @function.builtin) 31 | (#match? 32 | @function.builtin 33 | "^(abs|all|always_inline|any|ascii|bin|bool|breakpoint|bytearray|bytes|callable|chr|classmethod|compile|complex|constrained|delattr|dict|dir|divmod|enumerate|eval|exec|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|isinstance|issubclass|iter|len|list|locals|map|max|memoryview|min|next|object|oct|open|ord|pow|print|property|range|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unroll|vars|zip|__mlir_attr|__mlir_op|__mlir_type|__import__)$")) 34 | 35 | ; Literals 36 | 37 | [ 38 | (none) 39 | (true) 40 | (false) 41 | ] @constant.builtin 42 | 43 | [ 44 | (integer) 45 | (float) 46 | ] @number 47 | 48 | (comment) @comment 49 | (string) @string 50 | (escape_sequence) @escape 51 | 52 | [ 53 | "(" 54 | ")" 55 | "[" 56 | "]" 57 | "{" 58 | "}" 59 | ] @punctuation.bracket 60 | 61 | (interpolation 62 | "{" @punctuation.special 63 | "}" @punctuation.special) @embedded 64 | 65 | ; Docstrings. 66 | (function_definition 67 | "async"? 68 | "def" 69 | name: (_) 70 | (parameters)? 71 | body: (block (expression_statement (string) @string.doc))) 72 | 73 | [ 74 | "-" 75 | "-=" 76 | "!=" 77 | "*" 78 | "**" 79 | "**=" 80 | "*=" 81 | "/" 82 | "//" 83 | "//=" 84 | "/=" 85 | "&" 86 | "%" 87 | "%=" 88 | "^" 89 | "+" 90 | "->" 91 | "+=" 92 | "<" 93 | "<<" 94 | "<=" 95 | "<>" 96 | "=" 97 | ":=" 98 | "==" 99 | ">" 100 | ">=" 101 | ">>" 102 | "|" 103 | "~" 104 | "and" 105 | "in" 106 | "is" 107 | "not" 108 | "or" 109 | "is not" 110 | "not in" 111 | "!" 112 | ] @operator 113 | 114 | [ 115 | "as" 116 | "alias" 117 | "assert" 118 | "async" 119 | "await" 120 | "borrowed" 121 | "break" 122 | "capturing" 123 | "class" 124 | "continue" 125 | "def" 126 | "del" 127 | "elif" 128 | "else" 129 | "escaping" 130 | "except" 131 | "exec" 132 | "finally" 133 | "fn" 134 | "for" 135 | "from" 136 | "global" 137 | "if" 138 | "import" 139 | "inout" 140 | "lambda" 141 | "nonlocal" 142 | "owned" 143 | "pass" 144 | "print" 145 | "raise" 146 | "raises" 147 | "ref" 148 | "return" 149 | "struct" 150 | "trait" 151 | "try" 152 | "var" 153 | "while" 154 | "with" 155 | "yield" 156 | "match" 157 | "case" 158 | ] @keyword 159 | 160 | (mlir_type "!" @punctuation.special (#set! "priority" 110)) 161 | (mlir_type ">" @punctuation.special (#set! "priority" 110)) 162 | (mlir_type "<" @punctuation.special (#set! "priority" 110)) 163 | (mlir_type "->" @punctuation.special (#set! "priority" 110)) 164 | (mlir_type "(" @punctuation.special (#set! "priority" 110)) 165 | (mlir_type ")" @punctuation.special (#set! "priority" 110)) 166 | (mlir_type "." @punctuation.special (#set! "priority" 110)) 167 | (mlir_type ":" @punctuation.special (#set! "priority" 110)) 168 | (mlir_type "+" @punctuation.special (#set! "priority" 110)) 169 | (mlir_type "-" @punctuation.special (#set! "priority" 110)) 170 | (mlir_type "*" @punctuation.special (#set! "priority" 110)) 171 | (mlir_type "," @punctuation (#set! "priority" 110)) 172 | (mlir_type) @type 173 | ; (argument_convention) @keyword 174 | -------------------------------------------------------------------------------- /src/mojo.rs: -------------------------------------------------------------------------------- 1 | use std::fs; 2 | use zed_extension_api::{self as zed, Result}; 3 | 4 | struct MojoExtension { 5 | cached_binary_path: Option, 6 | } 7 | 8 | impl MojoExtension { 9 | fn language_server_binary_path( 10 | &mut self, 11 | language_server_id: &zed::LanguageServerId, 12 | worktree: &zed::Worktree, 13 | ) -> Result { 14 | if let Some(path) = worktree.which("pixi") { 15 | return Ok(path); 16 | } 17 | 18 | if let Some(path) = &self.cached_binary_path { 19 | if fs::metadata(path).map_or(false, |stat| stat.is_file()) { 20 | return Ok(path.clone()); 21 | } 22 | } 23 | 24 | zed::set_language_server_installation_status( 25 | language_server_id, 26 | &zed::LanguageServerInstallationStatus::CheckingForUpdate, 27 | ); 28 | let release = zed::latest_github_release( 29 | "prefix-dev/pixi", 30 | zed::GithubReleaseOptions { 31 | require_assets: true, 32 | pre_release: false, 33 | }, 34 | )?; 35 | 36 | let (platform, arch) = zed::current_platform(); 37 | let asset_name = format!( 38 | "pixi-{arch}-{os}.{extension}", 39 | arch = match arch { 40 | zed::Architecture::Aarch64 => "aarch64", 41 | zed::Architecture::X8664 => "x86_64", 42 | zed::Architecture::X86 => return Err("unsupported platform x86".into()), 43 | }, 44 | os = match platform { 45 | zed::Os::Mac => "apple-darwin", 46 | zed::Os::Linux => "unknown-linux-musl", 47 | zed::Os::Windows => "windows-msvc", 48 | }, 49 | extension = match platform { 50 | zed::Os::Mac | zed::Os::Linux => "tar.gz", 51 | zed::Os::Windows => "zip", 52 | }, 53 | ); 54 | 55 | let asset = release 56 | .assets 57 | .iter() 58 | .find(|asset| asset.name == asset_name) 59 | .ok_or_else(|| format!("no asset found matching {:?}", asset_name))?; 60 | 61 | let version_dir = format!("pixi-{}", release.version); 62 | let binary_path = format!( 63 | "{version_dir}/bin/pixi{extension}", 64 | extension = match platform { 65 | zed::Os::Mac | zed::Os::Linux => "", 66 | zed::Os::Windows => ".exe", 67 | }, 68 | ); 69 | 70 | if !fs::metadata(&binary_path).map_or(false, |stat| stat.is_file()) { 71 | zed::set_language_server_installation_status( 72 | language_server_id, 73 | &zed::LanguageServerInstallationStatus::Downloading, 74 | ); 75 | 76 | zed::download_file( 77 | &asset.download_url, 78 | &version_dir, 79 | match platform { 80 | zed::Os::Mac | zed::Os::Linux => zed::DownloadedFileType::GzipTar, 81 | zed::Os::Windows => zed::DownloadedFileType::Zip, 82 | }, 83 | ) 84 | .map_err(|e| format!("failed to download file: {e}"))?; 85 | 86 | let entries = 87 | fs::read_dir(".").map_err(|e| format!("failed to list working directory {e}"))?; 88 | for entry in entries { 89 | let entry = entry.map_err(|e| format!("failed to load directory entry {e}"))?; 90 | if entry.file_name().to_str() != Some(&version_dir) { 91 | fs::remove_dir_all(entry.path()).ok(); 92 | } 93 | } 94 | } 95 | 96 | self.cached_binary_path = Some(binary_path.clone()); 97 | Ok(binary_path) 98 | } 99 | } 100 | 101 | impl zed::Extension for MojoExtension { 102 | fn new() -> Self { 103 | Self { 104 | cached_binary_path: None, 105 | } 106 | } 107 | 108 | fn language_server_command( 109 | &mut self, 110 | language_server_id: &zed::LanguageServerId, 111 | worktree: &zed::Worktree, 112 | ) -> Result { 113 | Ok(zed::Command { 114 | command: self.language_server_binary_path(language_server_id, worktree)?, 115 | args: vec![String::from("run"), String::from("mojo-lsp-server")], 116 | env: Default::default(), 117 | }) 118 | } 119 | } 120 | 121 | zed::register_extension!(MojoExtension); 122 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "anyhow" 7 | version = "1.0.86" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" 10 | 11 | [[package]] 12 | name = "bitflags" 13 | version = "2.6.0" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" 16 | 17 | [[package]] 18 | name = "equivalent" 19 | version = "1.0.1" 20 | source = "registry+https://github.com/rust-lang/crates.io-index" 21 | checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" 22 | 23 | [[package]] 24 | name = "hashbrown" 25 | version = "0.14.5" 26 | source = "registry+https://github.com/rust-lang/crates.io-index" 27 | checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" 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.4.0" 47 | source = "registry+https://github.com/rust-lang/crates.io-index" 48 | checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" 49 | dependencies = [ 50 | "equivalent", 51 | "hashbrown", 52 | "serde", 53 | ] 54 | 55 | [[package]] 56 | name = "itoa" 57 | version = "1.0.11" 58 | source = "registry+https://github.com/rust-lang/crates.io-index" 59 | checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" 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.22" 70 | source = "registry+https://github.com/rust-lang/crates.io-index" 71 | checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" 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.86" 82 | source = "registry+https://github.com/rust-lang/crates.io-index" 83 | checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" 84 | dependencies = [ 85 | "unicode-ident", 86 | ] 87 | 88 | [[package]] 89 | name = "quote" 90 | version = "1.0.37" 91 | source = "registry+https://github.com/rust-lang/crates.io-index" 92 | checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" 93 | dependencies = [ 94 | "proc-macro2", 95 | ] 96 | 97 | [[package]] 98 | name = "ryu" 99 | version = "1.0.18" 100 | source = "registry+https://github.com/rust-lang/crates.io-index" 101 | checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" 102 | 103 | [[package]] 104 | name = "semver" 105 | version = "1.0.23" 106 | source = "registry+https://github.com/rust-lang/crates.io-index" 107 | checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" 108 | 109 | [[package]] 110 | name = "serde" 111 | version = "1.0.209" 112 | source = "registry+https://github.com/rust-lang/crates.io-index" 113 | checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" 114 | dependencies = [ 115 | "serde_derive", 116 | ] 117 | 118 | [[package]] 119 | name = "serde_derive" 120 | version = "1.0.209" 121 | source = "registry+https://github.com/rust-lang/crates.io-index" 122 | checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" 123 | dependencies = [ 124 | "proc-macro2", 125 | "quote", 126 | "syn", 127 | ] 128 | 129 | [[package]] 130 | name = "serde_json" 131 | version = "1.0.127" 132 | source = "registry+https://github.com/rust-lang/crates.io-index" 133 | checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" 134 | dependencies = [ 135 | "itoa", 136 | "memchr", 137 | "ryu", 138 | "serde", 139 | ] 140 | 141 | [[package]] 142 | name = "smallvec" 143 | version = "1.13.2" 144 | source = "registry+https://github.com/rust-lang/crates.io-index" 145 | checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" 146 | 147 | [[package]] 148 | name = "spdx" 149 | version = "0.10.6" 150 | source = "registry+https://github.com/rust-lang/crates.io-index" 151 | checksum = "47317bbaf63785b53861e1ae2d11b80d6b624211d42cb20efcd210ee6f8a14bc" 152 | dependencies = [ 153 | "smallvec", 154 | ] 155 | 156 | [[package]] 157 | name = "syn" 158 | version = "2.0.76" 159 | source = "registry+https://github.com/rust-lang/crates.io-index" 160 | checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525" 161 | dependencies = [ 162 | "proc-macro2", 163 | "quote", 164 | "unicode-ident", 165 | ] 166 | 167 | [[package]] 168 | name = "unicode-ident" 169 | version = "1.0.12" 170 | source = "registry+https://github.com/rust-lang/crates.io-index" 171 | checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" 172 | 173 | [[package]] 174 | name = "unicode-segmentation" 175 | version = "1.11.0" 176 | source = "registry+https://github.com/rust-lang/crates.io-index" 177 | checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" 178 | 179 | [[package]] 180 | name = "unicode-xid" 181 | version = "0.2.5" 182 | source = "registry+https://github.com/rust-lang/crates.io-index" 183 | checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" 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-mojo" 315 | version = "0.1.0" 316 | dependencies = [ 317 | "zed_extension_api", 318 | ] 319 | 320 | [[package]] 321 | name = "zed_extension_api" 322 | version = "0.1.0" 323 | source = "registry+https://github.com/rust-lang/crates.io-index" 324 | checksum = "594fd10dd0f2f853eb243e2425e7c95938cef49adb81d9602921d002c5e6d9d9" 325 | dependencies = [ 326 | "serde", 327 | "serde_json", 328 | "wit-bindgen", 329 | ] 330 | --------------------------------------------------------------------------------