How to use rustlings offline

I am working in an environment where is offline, I install rustlings failed. How I can use rustlings in offline mode?

Try adding --offline flag to your cargo commands.

You will need to build it or cargo fetch at least once when online, so that Cargo will cache required dependencies.

1 Like

Thanks! I have fetch it when online , so I copy rustlings folders to offline environments. Is't OK?

Unfortunately, it's not that easy. You would need to copy ~/.cargo folder too, because that's where the offline cache is, not in your project's folder.

Alternatively, you could try running cargo vendor and then copy vendored dependencies, but I'm not sure if that's entirely sufficient for offline use.

Yes, I did that as you said. I finished it . I will try your second resolution.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.