cargo doc
has this code written up already in a way that's cross-platform: https://github.com/rust-lang/cargo/blob/master/src/cargo/ops/cargo_doc.rs
It'd be nice if a cleaner API for this were provided in libstd so that any rust program could open a link to a web page from their app. This is rather common in a lot of situations and considering how cargo already needs this code, it wouldn't be much of an extra maintenance burden.
This would be a fine library for crates.io, but that doesn鈥檛 necessarily mean it should be in the standard library. Remember that versioning of the standard library is tied to that of the language: once something is in there, you can鈥檛 make breaking changes to it until Rust 2.0 (which is something I hope won鈥檛 happen for many years).
I think you are looking for the crate open
Closing this because there's a crate for this.
Most helpful comment
This would be a fine library for crates.io, but that doesn鈥檛 necessarily mean it should be in the standard library. Remember that versioning of the standard library is tied to that of the language: once something is in there, you can鈥檛 make breaking changes to it until Rust 2.0 (which is something I hope won鈥檛 happen for many years).