Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
O

open-rs

> 编程语言
Open source

Open a path or URL with the system-defined program

396 stars0 likes1 views
WebsiteGitHub

About

Open a path or URL with the system-defined program

Use this library to open a path or URL using the program configured on the system. It is equivalent to running one of the following:

bash
# macOS
$ open 
# Windows
$ start 
# Linux
$ xdg-open  || gio open  || gnome-open  || kde-open 
# WSL
$ powershell.exe -NoProfile -Command "Start-Process -FilePath ''" || xdg-open  || gio open  || gnome-open  || kde-open 

To open a web browser, see the webbrowser crate, which offers functionality for that specific case.

Library Usage

Add this to your Cargo.toml

toml
[dependencies]
open = "5"

…and open something using…

rust
open::that("https://rust-lang.org");

…or, open something with an application of your choice

rust
open::with("https://rust-lang.org", "firefox");

Follow this link for the API docs.

Binary Usage

This crate also implements a binary that acts like an opener itself.

bash
cargo run 'file to open'

Credits

The implementation is based on the respective functionality of Cargo, but was improved to allow some error handling.

Issues· 13 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rust

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言