simple-rsx-macros-0.1.1 has been yanked.
Simple RSX
A lightweight and intuitive JSX-like syntax implementation for Rust, enabling HTML-like templating with the full power of Rust's type system.
Features
- JSX-like syntax support in Rust
- Self-closing tags (
<div />) - Element attributes
- Nested elements
- String literals as children
- Fragment support (
<></>) - Basic error handling and validation
- Tag matching validation
- Procedural macro implementation
- Basic HTML element rendering
- Expression support in braces (
{expr}) - Props validation
- Event handling
- Conditional rendering
- Looping
- List rendering
- Custom components
- State management
- Lifecycle hooks
- Server-side rendering
- Server-side rendering with hydration
Installation
Add this to your Cargo.toml:
[]
= "0.1"
Usage
use *;
// Self-closing tag with attributes
let element = jsx!;
// Nested elements with text content
let nested = jsx!;
// Fragment syntax
let fragment = jsx!;
Project Structure
simple-rsx: Main library cratesimple-rsx-macros: Procedural macros implementation
Development Status
This project is currently in active development. While basic JSX syntax is supported, many advanced features are still in progress. Contributions are welcome!
License
MIT License