cargo-expand
Subcommand to show result of macro expansion (by dtolnay)
rsx
Advanced JSX-like templating for Rust (by victorporof)
cargo-expand | rsx | |
---|---|---|
16 | 3 | |
2,460 | 333 | |
- | - | |
9.0 | 10.0 | |
4 days ago | about 6 years ago | |
Rust | Rust | |
Apache License 2.0 | - |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
cargo-expand
Posts with mentions or reviews of cargo-expand.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-02-04.
-
What is Rust doing behind the scenes?
It's been superseded by https://github.com/dtolnay/cargo-expand
-
Why dereferencing coercion is not used here?
Try installing cargo expand, it's useful to see how macros eventually get expanded. For example, if you run cargo expand on the following code
-
Procedural Macros are really hard to understand
You can use cargo expand to see what your code expands to: https://github.com/dtolnay/cargo-expand
-
[blog] Rust should own its debugger experience
Not too familiar with macros but does cargo-expand do what you want or did you mean something else?
-
Help me understand the borrowing and moving variable concept!
Yes. You can use Tools > Expand Macro on the playground or install and run cargo-expand to see what the macro expands to. It just adds a & before the argument.
- Advanced Metaprogramming in C: A select statement
-
How does declaring variables in macros work
cargo expand
-
How to see macro's source code in crate?
Along with what others are saying, there is also cargo expand which can show you what code a macro generates
-
How does Rust Python ffi work?
Something that may help you understand code with magic proc macros is this utility. It's basically a wrapper around a Rust compiler flag that allows you to expand macros for a file.
-
How does libtest know which functions are marked with #[test]?
You can use https://github.com/dtolnay/cargo-expand to examine how it works.
rsx
Posts with mentions or reviews of rsx.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-06-11.
-
Convert HTML to RSX for using in dioxus
rsx macro is not a standard syntax, it has variants (ex. https://github.com/victorporof/rsx) . May you can define in project name that it refers to Dioxus,
- How do I learn Rust without reading or looking at examples?
-
Any good resources for learning Rust macros?
For me the real cool stuff is made possible through proc macros. They take as input a stream of tokens and output a stream of tokens. For example you can use these to make embedded DSLs in rust (example JSX in rust).
What are some alternatives?
When comparing cargo-expand and rsx you can also consider the following projects:
saito-rust - A high-performance (reference) implementation of Saito in Rust
proc-macro-workshop - Learn to write Rust procedural macros [Rust Latam conference, Montevideo Uruguay, March 2019]
syn - Parser for Rust source code
lol-html - Low output latency streaming HTML parser/rewriter with CSS selector-based API
quote - Rust quasi-quoting
rust - Empowering everyone to build reliable and efficient software.
cargo-llvm-cov - Cargo subcommand to easily use LLVM source-based code coverage (-C instrument-coverage).
rustviz - Interactively Visualizing Ownership and Borrowing for Rust
cargo-edit - A utility for managing cargo dependencies from the command line.
PyO3 - Rust bindings for the Python interpreter