4 releases (breaking)

0.4.0 Dec 24, 2025
0.3.0 Aug 26, 2025
0.2.0 Oct 25, 2024
0.1.0 Oct 24, 2024

#564 in Parser implementations

Download history 1101/week @ 2026-01-07 1083/week @ 2026-01-14 1112/week @ 2026-01-21 1430/week @ 2026-01-28 1184/week @ 2026-02-04 1235/week @ 2026-02-11 1806/week @ 2026-02-18 2626/week @ 2026-02-25 4443/week @ 2026-03-04 5566/week @ 2026-03-11 4782/week @ 2026-03-18 4906/week @ 2026-03-25 7967/week @ 2026-04-01 8615/week @ 2026-04-08 9145/week @ 2026-04-15 10703/week @ 2026-04-22

37,427 downloads per month
Used in 8 crates (7 directly)

MIT license

275KB
10K SLoC

C 9K SLoC JavaScript 431 SLoC // 0.1% comments Scheme 47 SLoC Rust 27 SLoC // 0.3% comments

This crate provides Proto language support for the tree-sitter parsing library.

Typically, you will use the [LANGUAGE][] constant to add this language to a tree-sitter Parser, and then use the parser to parse some code:

let code = r#"
"#;
let mut parser = tree_sitter::Parser::new();
let language = tree_sitter_proto::LANGUAGE;
parser
    .set_language(&language.into())
    .expect("Error loading Proto parser");
let tree = parser.parse(code, None).unwrap();
assert!(!tree.root_node().has_error());

tree-sitter-proto

CI crates

Protocol buffer grammer for tree-sitter.

✨ Features

  • ✅ Basic Proto2 support
  • ✅ Proto3 support
  • ✅ Support for editions

Special Thanks

Special thanks to the following people for their amazing work in this grammer.

Dependencies

~250KB