floem
floem copied to clipboard
Examples cannot be run with `cargo run --example`
Because each example is its own sub-project, running cargo --example example-name
doesn't work.
This maybe makes sense for examples that include assets or special dependencies, but from a quick skim most examples only include a single Rust files and could be normal files in the example/
folder. This would make them more convenient to test.
You can run examples with cargo run -p example-name
Oh, I didn't know that. :smiley:
I think being able to run examples using the usual flow would be better. But it's helpful to know there's a workaround.
It's not really a workaround, both cargo run -p
and cargo --example
are common patterns for doing examples, it really depends on the project preference which is used