Hacker News new | past | comments | ask | show | jobs | submit login

Can always-failing-to-compile crates be deployed to the registry?



crates.io doesn't try to build crates. It couldn't do that anyway. Crates can require arbitrary C library dependencies, only run on some specific targets, etc. That's why docs.rs has to make some effort to be able to build crates, and even it doesn't get all of them.


Yes, `cargo publish` has the `--no-verify` flag if you want to force this. I think all the verification is client-side.


There is some server side verification, mostly around checking that the dependencies all exist, the file isn't too large, etc. But 99% of the testing happens on the client.

Eg:

https://github.com/rust-lang/crates.io/blob/58e505f2abdabd6a...

https://github.com/rust-lang/crates.io/blob/58e505f2abdabd6a...

https://github.com/rust-lang/crates.io/blob/58e505f2abdabd6a...

https://github.com/rust-lang/crates.io/blob/58e505f2abdabd6a...


Yes




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: