SaaSHub helps you find the best software and product alternatives Learn more →
Top 23 Rust Parser Projects
-
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.
-
boa
Boa is an embeddable and experimental Javascript engine written in Rust. Currently, it has support for some of the language.
-
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.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
First, we switched the default compiler for new projects from Babel to SWC (Speedy Web Compiler). SWC is dramatically faster than Babel and requires zero configuration. We’ll continue to support Babel in any project currently using it.
Project mention: Lezer: A Parsing System for CodeMirror, Inspired by Tree-Sitter | news.ycombinator.com | 2024-03-24I 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...)
Project mention: Docker Log Observability: Analyzing Container Logs in HashiCorp Nomad with Vector, Loki, and Grafana | dev.to | 2024-04-19job "vector" { datacenters = ["dc1"] # system job, runs on all nodes type = "system" group "vector" { count = 1 network { port "api" { to = 8686 } } ephemeral_disk { size = 500 sticky = true } task "vector" { driver = "docker" config { image = "timberio/vector:0.30.0-debian" ports = ["api"] volumes = ["/var/run/docker.sock:/var/run/docker.sock"] } env { VECTOR_CONFIG = "local/vector.toml" VECTOR_REQUIRE_HEALTHY = "false" } resources { cpu = 100 # 100 MHz memory = 100 # 100MB } # template with Vector's configuration template { destination = "local/vector.toml" change_mode = "signal" change_signal = "SIGHUP" # overriding the delimiters to [[ ]] to avoid conflicts with Vector's native templating, which also uses {{ }} left_delimiter = "[[" right_delimiter = "]]" data=<
Just in case you are not familiar with nom, it is a parser combinator written in Rust. The most basic thing you can do with it is import one of its parsing functions, give it some byte or string input and then get a Result as output with the parsed value and the rest of the input or an error if the parser failed. tag for example is used to recognize literal character/byte sequences.
Would you consider using some libraries in your project? There are lots of good ones in the Rust ecosystem, and many of them are not part of any existing browsers.
For example:
- https://github.com/servo/html5ever (HTML parsing - note: this is used in Servo)
- https://github.com/parcel-bundler/lightningcss (CSS parsing)
- https://github.com/DioxusLabs/taffy (web layout)
- https://github.com/pop-os/cosmic-text (text layout and rendering)
Obviously you should be free to work on whatever you like, but just as a benchmark on the scope of your project: I spent ~6 months implementing just the CSS Grid algorithm in Taffy last year. An entire browser from literal scratch is probably a 10 year project for one person.
Project mention: A list of JavaScript engines, runtimes, interpreters | /r/learnjavascript | 2023-12-10boa
And some related parser tools: - https://github.com/kevinmehall/rust-peg - https://github.com/pest-parser/pest - https://github.com/lalrpop/lalrpop
Project mention: Lezer: A Parsing System for CodeMirror, Inspired by Tree-Sitter | news.ycombinator.com | 2024-03-24I attempted to use this but was disheartened but the fact that it doesn't statically type node names. Tree Sitter doesn't either but it has much more of an excuse given that it targets C.
https://github.com/lezer-parser/lezer/issues/8
The dev seems mildly hostile to outside involvement too, so I moved on. These days I use Chumsky which is Rust rather than Typescript, but also way more awesome, if you can deal with the often incomprehensible compilation errors at least!
https://github.com/zesterer/chumsky
And some related parser tools: - https://github.com/kevinmehall/rust-peg - https://github.com/pest-parser/pest - https://github.com/lalrpop/lalrpop
This is mighty impressive! I've been trying to get some motivation for the mythical rewrite of the proc macro in Logos, and this might just do it for me :D. I'll have a proper look later today and see if any of your findings have something that can be generalized. Also really surprised to see aarch64 doing better than x86_64 since the latter is what I've been optimizing for!
sqlparser to parse SQL queries and detect variable bindings
Project mention: CryptoFlow: Building a secure and scalable system with Axum and SvelteKit - Part 3 | dev.to | 2024-01-08As a platform that allows expressiveness, we want our users to be bold enough to ask and answer questions with either plain text or some markdowns. Compiling markdown to HTML in Rust can be done via the pulldown-cmark crate. We used it in this utility function:
Project mention: What languages have the best error message rendering styles in the terminal? | /r/ProgrammingLanguages | 2023-07-12To complement, Nushell's error rendering is done with miette (whose name is a reference to this cute meme AFAIK). There is also another notable Rust error rendering lib: ariadne. So you can get the same beautiful error rendering in your own projects :D
Project mention: AST-grep(sg) is a CLI tool for code structural search, lint, and rewriting | news.ycombinator.com | 2023-12-10Or https://github.com/afnanenayet/diffsitter. I've tried both and I like them. No preference or notable opinions on them yet!
Project mention: An alternative implementation of Golang specs, written in Rust | news.ycombinator.com | 2023-05-07
And some related parser tools: - https://github.com/kevinmehall/rust-peg - https://github.com/pest-parser/pest - https://github.com/lalrpop/lalrpop
Rust Parser related posts
- Difftastic, a structural diff tool that understands syntax
- Pratt Parsers: Expression Parsing Made Easy
- The JavaScript Oxidation Compiler
- Oxlint – written in Rust – 50-100 Times Faster than ESLint
- Oxidation Compiler – JavaScript Tools in Rust
- nom > regex
- Planespotting with Rust: using nom to parse ADS-B messages
-
A note from our sponsor - SaaSHub
www.saashub.com | 25 Apr 2024
Index
What are some of the best open-source Parser projects in Rust? This list will help you:
Project | Stars | |
---|---|---|
1 | swc | 29,952 |
2 | tree-sitter | 16,450 |
3 | vector | 16,427 |
4 | nom | 9,007 |
5 | oxc | 8,812 |
6 | lightningcss | 5,929 |
7 | boa | 4,679 |
8 | pest | 4,351 |
9 | chumsky | 3,316 |
10 | lalrpop | 2,873 |
11 | rslint | 2,661 |
12 | logos | 2,620 |
13 | sqlparser-rs | 2,422 |
14 | pulldown-cmark | 1,923 |
15 | rust-csv | 1,603 |
16 | ariadne | 1,556 |
17 | diffsitter | 1,517 |
18 | goscript | 1,515 |
19 | calamine | 1,512 |
20 | rust-peg | 1,390 |
21 | lol-html | 1,388 |
22 | combine | 1,262 |
23 | termimad | 840 |
Sponsored