TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Rust-sitter: Define your entire tree-sitter grammar in Rust code

127 pointsby sbt567over 2 years ago

5 comments

hardwaregeekover 2 years ago
I&#x27;m super excited about the ability to get good quality bindings to tree-sitter! Tree-sitter is a very cool project but it needs a little love in a few regards. A better WebAssembly story, good bindings, and the ability to construct trees synthetically (to facilitate code generation) would make it a really remarkable tool.<p>As for rust-sitter, it&#x27;s a very promising direction. The error story needs a little work. I found it pretty hard to debug issues with my grammar. And it is slightly annoying having all those extra () fields in the struct, but that&#x27;s really a minor complaint.
评论 #34906899 未加载
shilangyuover 2 years ago
Are there any benefits for users that tree-sitter is used under the hood? Can we benefit from the killer features of tree-sitter? Namely incremental parsing, fallible parsing, lossless syntax tree, or being embeddable into editors supporting tree-sitter syntax highlighting?
评论 #34899029 未加载
shadajover 2 years ago
Hi! Rust Sitter creator here, happy to answer any questions about the project and where it&#x27;s going!
评论 #34898893 未加载
评论 #34903349 未加载
IshKebabover 2 years ago
What&#x27;s the advantage of defining the grammar in Rust? JavaScript is admittedly an odd choice, but it works, there are a ton of grammars out there and it isn&#x27;t needed at runtime.<p>Changing the <i>runtime</i> to Rust is very useful though - I&#x27;ve wanted that for a long time to make WASM and cross compilation easier.
评论 #34902768 未加载
dlahodaover 2 years ago
does it support callbacks to handle semantic space languages like haskell and python?
评论 #34906910 未加载