Expand description
Snax is JSX for Rust.
More specifically, it’s a library for proc macro authors who want JSX-like syntax in their libraries.
For the current best example of how to use Snax, check out the current source of the ritz crate.
§Requirements
Snax requires Rust 1.32 or newer.
§License
Snax is available under the MIT license. See LICENSE.txt for details.
Structs§
- Snax
Fragment - A fragment, which only contains children.
- Snax
Self Closing Tag - A self-closing tag, which doesn’t have children:
- SnaxTag
- A standard tag, which can have attributes and children.
Enums§
- Parse
Error - Snax
Attribute - An attribute that’s present on either a
SnaxTag
or aSnaxSelfClosingTag
. - Snax
Item - One complete block in the syntax.
Functions§
- parse
- Attempts to parse a
proc_macro2::TokenStream
into aSnaxItem
.