From b62a295ad93e7eb9f739cc87cf34b8ec7811d190 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Sat, 6 Apr 2024 14:05:48 -0600 Subject: [PATCH] resolved issues with rust bindings --- .gitignore | 3 +- Cargo.lock | 71 +++++++++++++++++++++++++++++++++++++++++ bindings/rust/build.rs | 4 +-- tree_sitter/tree-sitter | 1 - 4 files changed, 75 insertions(+), 4 deletions(-) create mode 100644 Cargo.lock delete mode 160000 tree_sitter/tree-sitter diff --git a/.gitignore b/.gitignore index f60a51a..6709c93 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,5 @@ pubspec.lock *.dll *.dylib doc -.vscode \ No newline at end of file +.vscode +target \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..538d893 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,71 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "cc" +version = "1.0.90" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" + +[[package]] +name = "memchr" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" + +[[package]] +name = "regex" +version = "1.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" + +[[package]] +name = "tree-sitter" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e747b1f9b7b931ed39a548c1fae149101497de3c1fc8d9e18c62c1a66c683d3d" +dependencies = [ + "cc", + "regex", +] + +[[package]] +name = "tree-sitter-dart" +version = "0.0.1" +dependencies = [ + "cc", + "tree-sitter", +] diff --git a/bindings/rust/build.rs b/bindings/rust/build.rs index c6061f0..f65ea63 100644 --- a/bindings/rust/build.rs +++ b/bindings/rust/build.rs @@ -13,11 +13,11 @@ fn main() { // If your language uses an external scanner written in C, // then include this block of code: - /* + let scanner_path = src_dir.join("scanner.c"); c_config.file(&scanner_path); println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap()); - */ + c_config.compile("parser"); println!("cargo:rerun-if-changed={}", parser_path.to_str().unwrap()); diff --git a/tree_sitter/tree-sitter b/tree_sitter/tree-sitter deleted file mode 160000 index be79158..0000000 --- a/tree_sitter/tree-sitter +++ /dev/null @@ -1 +0,0 @@ -Subproject commit be79158f7ed916190524348bebef252dcfe15d44