rust: external crates not supported error

I am trying to continue on the rust track after the update to exercism v3 (really nice update 😃 ).

I am getting the following error for a solution that passes tests (with cargo test) on my machine. Is this expected or a glitch? Any idea how to fix? I think I should be allowed to use an external crate as part of my solution, right?

Screenshot from 2021-09-02 22-10-24

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 7
  • Comments: 20 (6 by maintainers)

Most upvoted comments

If anyone have this issue it works now including Cargo.toml e.g. exercism submit Cargo.toml src/lib.rs

Would it make sense to set up the rust containers with a list of common packages

This has been discussed, and in general sentiment favors it, but so far nobody has put in the necessary effort to make it happen. The appropriate repository in which the work would happen is https://github.com/exercism/rust-test-runner/.

An ideal solution has the following properties:

  • Push-button regeneration. We’d want to run a script every month or two to re-generate the container with current versions of the packages, and that regeneration should require no human intervention.
  • Support for at least the set of crates supported by play.rust-lang.org. Ideally more, but that’s a starting point.
  • Continues to conform to the required test runner interface.

I don’t have the time to do that work myself for the forseeable future. However, if anyone wants to contribute a PR adding that feature to the test runner, I’d be very happy to review it.

I’m on it

Wouldn’t https://crates.io/crates/cargo-local-registry be a good fit for this? For the regeneration there could be a different entrypoint that runs it so that it resyncs the local registry with crates.io

Just my 2 cents, and I am by no ways a distinguished rustacean, only a complete newbie, but is not one selling point of rust the integration between cargo, crates, and the community providing packages? If this indeed is one of the selling point, I think the ability to use external crates really should be added… Also from a teaching / CS point of view, this is a good teaching for learners, don’t reinvent the wheel, use well developed and tested packages instead of your little brittle ad hoc solution, etc.

You can still use external crates if you do all your testing locally. Doing so and marking the exercise as complete should let you move forward for now.