Skip to content

Creating exercises with dependencies #897

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dabreegster opened this issue Dec 26, 2021 · 4 comments
Closed

Creating exercises with dependencies #897

dabreegster opened this issue Dec 26, 2021 · 4 comments

Comments

@dabreegster
Copy link

@Robinlovelace and I are interested in creating a bunch of exercises to teach people how to use some https://github.com/georust/geo crates. Right now, none of the exercises pull in any external dependencies, and adding the dependencies to Cargo.toml in the repo has no effect -- because that's for the rustlings tool itself. I really quickly dug around to figure out how the tool compiles each exercise and found

Mode::Clippy => {
. It looks like we could write a temporary Cargo.toml file for the exercise to glue in some dependencies. I'm curious if anybody here has thought about doing this before (but didn't spot any issues) and if there's an opinion how to support it, possibly as a hack in a fork of this repo, but ideally as some kind of configuration for sets of exercises. Thanks!

@dabreegster
Copy link
Author

#448 may be related

@manyinsects
Copy link
Member

Yeah, #448 is related, and this is a longstanding architectural question. Personally, I don't feel like it's very important, because Rustlings is intentionally not about teaching you Cargo, and not about teaching you your editor integration, but if we managed to come up with a satisfactory implementation for this that's not too backwards-incompatible, I'd be open for pulling it in.

@mo8it
Copy link
Contributor

mo8it commented Mar 30, 2024

Closing because that should be easy after #1935

About geo exercises, that should be covered by #1936

@mo8it mo8it closed this as completed Mar 30, 2024
@Robinlovelace
Copy link

Fanastic, many thank!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants