Rust tree-sitter

Open-source Rust projects categorized as tree-sitter

Top 14 Rust tree-sitter Projects

  • difftastic

    a structural diff that understands syntax 🟥🟩

  • Project mention: Linus Torvalds adds arbitrary tabs to kernel code | news.ycombinator.com | 2024-04-17

    i want a diff tool that shows me exactly which tokens have changed, and which haven't, regardless of how they are laid out.

    These already exist: https://github.com/Wilfred/difftastic

    when we get that, then we should get even less merge conflicts.

    Counterintuitively, that is not the case. AST-merge is a much, much, much, much, much harder problem than AST-diff.

    https://github.com/Wilfred/difftastic?tab=readme-ov-file#can...

    The fact that diffs can be used to drive a 3-way merge is in fact an accidental property that arises due to the sheer crudeness of the diff format. As soon as you start using more-sophisticated diff formats, solutions to "the diff problem" no longer lead directly to solutions to "the merge problem".

  • tree-sitter

    An incremental parsing system for programming tools

  • Project mention: Lezer: A Parsing System for CodeMirror, Inspired by Tree-Sitter | news.ycombinator.com | 2024-03-24

    I learned from a google search that these days upstream tree-sitter provides WebAssembly bindings.

    Source: https://github.com/tree-sitter/tree-sitter/tree/master/lib/b...

    NPM: https://www.npmjs.com/package/web-tree-sitter

    Download from the latest Github release: js file (https://github.com/tree-sitter/tree-sitter/releases/download...) and wasm file (https://github.com/tree-sitter/tree-sitter/releases/download...)

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • ast-grep

    ⚡A CLI tool for code structural search, lint and rewriting. Written in Rust

  • Project mention: AST-grep(sg) AST grep based on Treesitter | news.ycombinator.com | 2024-04-01
  • gritql

    GritQL is a query language for searching, linting, and modifying code.

  • Project mention: ClangQL: A tool to run SQL-like query on C/C++ Code | news.ycombinator.com | 2024-04-07

    Cool to see another query language for source code! Yours is definitely closer to SQL than GritQL is.[0] I particularly like the count semantics.

    [0] https://github.com/getgrit/gritql

  • diffsitter

    A tree-sitter based AST difftool to get meaningful semantic diffs

  • Project mention: AST-grep(sg) is a CLI tool for code structural search, lint, and rewriting | news.ycombinator.com | 2023-12-10

    Or https://github.com/afnanenayet/diffsitter. I've tried both and I like them. No preference or notable opinions on them yet!

  • zee

    A modern text editor for the terminal written in Rust

  • Project mention: Micro – A Modern Alternative to Nano | news.ycombinator.com | 2023-08-17
  • srgn

    A code surgeon for precise text and code transplantation. A marriage of `tr`/`sed`, `rg` and `tree-sitter`.

  • Project mention: Show HN: Srgn, AST-aware text manipulation | news.ycombinator.com | 2024-01-27
  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • loxcraft

    Language tooling for the Lox programming language.

  • Project mention: Implementing Crafting-Interpreters in Rust - Chapter 18 - Strings | /r/learnrust | 2023-06-24

    There are many solutions for these problems. For an example, see this implementation: https://github.com/ajeetdsouza/loxcraft/blob/main/src/vm/object.rs and https://github.com/ajeetdsouza/loxcraft/blob/main/src/vm/gc.rs:

  • glyph

    My own personal code editor built with Rust + OpenGL (by zackradisic)

  • freya-editor

    Experimental code editor made with Freya 🦀

  • tcount

    Count your code by tokens and patterns in the syntax tree. A tokei/scc/cloc alternative.

  • datadog-static-analyzer

    Datadog Static Analyzer

  • Project mention: Ask HN: Who is hiring? (November 2023) | news.ycombinator.com | 2023-11-01

    Datadog | Senior Software Engineer | NYC/Paris/Madrid | Full-Time | Static Analysis

    We are building a static analysis engine (https://github.com/DataDog/datadog-static-analyzer) that works across the development lifecycle: IDE -> git hook -> git pull request -> git push. Our product is currently in private beta (see https://www.datadoghq.com/static-analysis/) and we are working hard on expanding its capabilities.

    If you work with Rust and/or Tree-Sitter, we would love to talk to you!

    Apply here > https://careers.datadoghq.com/detail/5382867/?gh_jid=5382867

  • treeedb

    Generate Soufflé Datalog types, relations, and facts that represent ASTs from a variety of programming languages.

  • Project mention: GDlog: A GPU-Accelerated Deductive Engine | news.ycombinator.com | 2023-12-03

    https://github.com/topics/datalog?l=rust ... Cozo, Crepe

    Crepe: https://github.com/ekzhang/crepe :

    > Crepe is a library that allows you to write declarative logic programs in Rust, with a Datalog-like syntax. It provides a procedural macro that generates efficient, safe code and interoperates seamlessly with Rust programs.

    Looks like there's not yet a Python grammar for the treeedb tree-sitter: https://github.com/langston-barrett/treeedb :

    > Generate Soufflé Datalog types, relations, and facts that represent ASTs from a variety of programming languages.

    Looks like roxi supports n3, which adds `=>` "implies" to the Turtle lightweight RDF representation: https://github.com/pbonte/roxi

    FWIW rdflib/owl-rl: https://owl-rl.readthedocs.io/en/latest/owlrl.html :

    > simple forward chaining rules are used to extend (recursively) the incoming graph with all triples that the rule sets permit (ie, the “deductive closure” of the graph is computed).

    ForwardChainingStore and BackwardChainingStore implementations w/ rdflib in Python: https://github.com/RDFLib/FuXi/issues/15

    Fast CUDA hashmaps

    Gdlog is built on CuCollections.

    GPU HashMap libs to benchmark: Warpcore, CuCollections,

    https://github.com/NVIDIA/cuCollections

    https://github.com/NVIDIA/cccl

    https://github.com/sleeepyjack/warpcore

    /? Rocm HashMap

    DeMoriarty/DOKsparse:

  • chroma_code

    Make beautiful colored code listings in LaTeX with the power of TreeSitter.

  • Project mention: Introducing "chromacode": tool to generate colored syntax-highlighted listings powered by TreeSitter. | /r/LaTeX | 2023-08-20

    Here is the repo: https://github.com/TomLebeda/chroma_code

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

Rust tree-sitter related posts

Index

What are some of the best open-source tree-sitter projects in Rust? This list will help you:

Project Stars
1 difftastic 19,450
2 tree-sitter 16,450
3 ast-grep 5,863
4 gritql 2,296
5 diffsitter 1,517
6 zee 1,405
7 srgn 385
8 loxcraft 237
9 glyph 146
10 freya-editor 83
11 tcount 65
12 datadog-static-analyzer 64
13 treeedb 47
14 chroma_code 15

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com