UserNobody14 / tree-sitter-dart

Attempt to make a tree-sitter grammar for dart
MIT License
59 stars 36 forks source link

How to use this as a library in rust? #49

Closed wurikiji closed 1 year ago

wurikiji commented 1 year ago

Hi, I'd like to use this as a rust library. Could give me a guide?

Thanks.

wurikiji commented 1 year ago

I found the solution.

  1. Copy bindings/rust/build.rs to the root of my project
  2. Copy src/ to my project
  3. Add cc crate.
  4. Then run my program.

I could run my program by doing this. Am I right?

TimWhiting commented 1 year ago

If it works then it is a solution. I've never used it with rust.