Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using system tree-sitter #274

Open
barcharcraz opened this issue Apr 29, 2021 · 6 comments
Open

using system tree-sitter #274

barcharcraz opened this issue Apr 29, 2021 · 6 comments

Comments

@barcharcraz
Copy link

Is it possible to tell nimterop to use the system version of tree-sitter and avoid connecting to the internet when it first goes to generate a binding?

@genotrance
Copy link
Collaborator

Nimterop actually compiles in the tree-sitter library during install. It does not need tree-sitter when generating a binding.

@barcharcraz
Copy link
Author

Yes, it downloads and builds tree-sitter when nimterop is compiled. This is a problem if you want to compile things from sources without internet access. It also makes it impossible to package nimterop (or any derived library) on most linux distributions, since they want to mirror all source code and prohibit network access during builds).

Indeed fedora has pretty much given up on packaging nim apps for this reason (along with others)

@genotrance
Copy link
Collaborator

I'm open to a PR that adds tree-sitter as a sub-module instead of being pulled via nimterop itself.

@barcharcraz
Copy link
Author

that should be easy enough, hopefully I'll have time to make it happen soon.

@arkanoid87
Copy link

I'm also interested in using tree-sitter with nim for another project, it would be nice to turn the wrapping/binding part into an independent project available in nimble packages.

It would also be nice to see it available into tree-sitter github readme under "bindings"

@genotrance
Copy link
Collaborator

I'm also interested in using tree-sitter with nim for another project, it would be nice to turn the wrapping/binding part into an independent project available in nimble packages.

It would also be nice to see it available into tree-sitter github readme under "bindings"

There is https://github.com/genotrance/nimtreesitter which is in Nimble. I don't know if it still works though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants