#ast #rustc-auto-publish #pretty-print #syntax-tree #macro-expansion

nightly rustc-ap-syntax

Automatically published version of the package syntax in the rust-lang/rust repository from commit 834bc5650acf7019a53b409db68986857822812c The publishing script for this crate lives at: https://github.com/alexcrichton/rustc-auto-publish

611 major breaking releases

645.0.0 Feb 25, 2020
644.0.0 Feb 18, 2020
643.0.0 Feb 11, 2020
642.0.0 Feb 8, 2020
1.0.0 Jan 11, 2018

#2576 in Procedural macros

Download history 48/week @ 2026-02-06 435/week @ 2026-02-13 276/week @ 2026-02-20 1866/week @ 2026-02-27 7046/week @ 2026-03-06 422/week @ 2026-03-13 384/week @ 2026-03-20 1220/week @ 2026-03-27 2017/week @ 2026-04-03 1641/week @ 2026-04-10 1423/week @ 2026-04-17 475/week @ 2026-04-24 1044/week @ 2026-05-01 1642/week @ 2026-05-08 2989/week @ 2026-05-15 12606/week @ 2026-05-22

18,607 downloads per month
Used in 5 crates (4 directly)

MIT/Apache

1.5MB
30K SLoC

The Rust parser and macro expander.

Note

This API is completely unstable and subject to change.


The syntax crate contains those things concerned purely with syntax – that is, the AST ("abstract syntax tree"), parser, pretty-printer, lexer, macro expander, and utilities for traversing ASTs.

For more information about how these things work in rustc, see the rustc guide:

Dependencies

~7.5MB
~141K SLoC