resuma-macros 0.1.0

Procedural macros for Resuma: view!, #[component], #[server], #[island], js!
Documentation

Resuma procedural macros.

These macros are the surface area Resuma exposes to user code:

  • [view!] — JSX-like template syntax that builds a View tree.
  • [#[component]] — turns a function into a Resuma component.
  • [#[server]] — exposes an async fn as a server action / RPC.
  • [#[island]] — marks an interactive island (its handlers ship to JS).
  • [js!] — escape hatch for raw JavaScript handler bodies.

The interesting one is view!: it walks the JSX-ish tokens, recognises onClick={...} style attributes, and feeds the closure body to resuma-rs2js to produce a JS chunk. The Rust side only stores a HandlerRef pointing at that chunk so SSR can emit data-r-on:click=….