18 releases

0.5.1 Apr 5, 2024
0.5.0 Mar 28, 2024
0.5.0-alpha.0 Feb 23, 2024
0.4.3 Dec 7, 2023
0.1.1 Feb 28, 2021

#2042 in Procedural macros

Download history 1509/week @ 2023-12-23 1993/week @ 2023-12-30 2077/week @ 2024-01-06 2334/week @ 2024-01-13 2066/week @ 2024-01-20 2198/week @ 2024-01-27 1581/week @ 2024-02-03 1561/week @ 2024-02-10 2406/week @ 2024-02-17 4058/week @ 2024-02-24 4582/week @ 2024-03-02 4129/week @ 2024-03-09 3932/week @ 2024-03-16 4731/week @ 2024-03-23 4621/week @ 2024-03-30 3684/week @ 2024-04-06

17,300 downloads per month
Used in 18 crates (12 directly)

MIT/Apache

230KB
5K SLoC

dioxus-core-macro

Crates.io MIT licensed Build Status Discord chat

Website | Guides | API Docs | Chat

Overview

dioxus-core-macro provides a handful of helpful macros used by the dioxus crate. These include:

  • The rsx! macro that underpins templates and node creation.
  • The component attribute macro denotes a function as a Dioxus component. Currently, this:
    • Transforms function arguments into an auto-derived struct.
    • Ensures that your component name uses PascalCase.
    • Probably more stuff in the future. This macro allows us to have a way of distinguishing functions and components, which can be quite handy.
  • The format_args_f macro which allows f-string formatting with support for expressions.

Contributing

  • Report issues on our issue tracker.
  • Join the discord and ask questions!

License

This project is licensed under the MIT license.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Dioxus by you shall be licensed as MIT without any additional terms or conditions.

Dependencies

~1.4–2MB
~38K SLoC