25 releases

new 0.6.0-alpha.5 Nov 16, 2024
0.6.0-alpha.3 Oct 14, 2024
0.5.6 Jul 18, 2024
0.5.0 Mar 28, 2024
0.1.1 Feb 28, 2021

#2272 in Procedural macros

Download history 3896/week @ 2024-07-29 3672/week @ 2024-08-05 4163/week @ 2024-08-12 3533/week @ 2024-08-19 4441/week @ 2024-08-26 4449/week @ 2024-09-02 3725/week @ 2024-09-09 3673/week @ 2024-09-16 4732/week @ 2024-09-23 3416/week @ 2024-09-30 2525/week @ 2024-10-07 4056/week @ 2024-10-14 4461/week @ 2024-10-21 3697/week @ 2024-10-28 3098/week @ 2024-11-04 2647/week @ 2024-11-11

14,269 downloads per month
Used in 24 crates (6 directly)

MIT/Apache

280KB
6K 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

~0.6–1.1MB
~22K SLoC