Skip to content

Conversation

@ealmloff
Copy link
Member

Rust 1.88 added support for reading the path of a span. This lets us check if a relative paths exists inside the asset macro. This feature is very useful for the component library where we need to link to a style.css file for every component in a way that is easy to move around

Closes #4348

@ealmloff ealmloff requested a review from a team as a code owner September 12, 2025 14:40
@ealmloff ealmloff added enhancement New feature or request manganis Related to the manganis crate labels Sep 12, 2025
Copy link
Contributor

@nicoburns nicoburns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. One question: is this new syntax compatible with include_str!?

@ealmloff
Copy link
Member Author

Looks good. One question: is this new syntax compatible with include_str!?

Yes, both can accept the same syntax, although asset! allows more arguments. Both resolve files relative to the current folder and allow some built-in macros like env! and concat!

@jkelleyrtp jkelleyrtp merged commit 5104644 into DioxusLabs:main Sep 15, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request manganis Related to the manganis crate

3 participants