#open #browser #launcher #default

opener

Open a file or link using the system default program

17 releases

new 0.8.1 May 21, 2025
0.7.2 Aug 6, 2024
0.7.1 May 18, 2024
0.7.0 Mar 23, 2024
0.3.2 Nov 15, 2018

#14 in Operating systems

Download history 150723/week @ 2025-02-01 150180/week @ 2025-02-08 132090/week @ 2025-02-15 132373/week @ 2025-02-22 129031/week @ 2025-03-01 124962/week @ 2025-03-08 133040/week @ 2025-03-15 126090/week @ 2025-03-22 130031/week @ 2025-03-29 126250/week @ 2025-04-05 122492/week @ 2025-04-12 127113/week @ 2025-04-19 121136/week @ 2025-04-26 125791/week @ 2025-05-03 119647/week @ 2025-05-10 125625/week @ 2025-05-17

512,378 downloads per month
Used in 455 crates (86 directly)

MIT/Apache

27KB
505 lines

This crate provides the open function, which opens a file or link with the default program configured on the system:

// open a website
opener::open("https://www.rust-lang.org")?;

// open a file
opener::open("../Cargo.toml")?;

An open_browser function is also provided, for when you intend on opening a file or link in a browser, specifically. This function works like the open function, but explicitly allows overriding the browser launched by setting the $BROWSER environment variable.

Crate features

  • reveal - Enables usage of the reveal function.

Opener

This crate provides the ability to open a file or link with the default program configured on the system.

See the docs for more details:

Docs

License

Licensed under either of

at your option.

Third party software

See LICENSE-THIRD-PARTY

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~0–12MB
~147K SLoC