rust-lang / rustlings

:crab: Small exercises to get you used to reading and writing Rust code!
https://rustlings.cool
MIT License
52.69k stars 10.02k forks source link

rustlings init in a workspace #2073

Closed senekor closed 1 month ago

senekor commented 1 month ago

I would like to have rustlings part of several kinds of exercises during a workshop. So I'd like to provide students with a template repository they can clone. Is it feasible to have the rustlings exercises as part of a workspace? As of right now, rustlings seems to refuse initializing in a workspace. Well, it just says there is a Cargo.toml. It makes sense that rustlings shouldn't be within another package. But a workspace should be fine, right?

If so, I could try to extend rustlings such that it doesn't refuse initialization in a workspace.

senekor commented 1 month ago

I found the relevant line in the source code. Maybe it could be specified what these problems are? I know that the workspace will need to contain "rustlings" in the members key. I think that should be achievable though.

mo8it commented 1 month ago

Fixed in https://github.com/rust-lang/rustlings/commit/8df66f79918168617da9709c0edcfeb3ca0e53c8

senekor commented 1 month ago

Thanks!