{"id":15031551,"url":"https://github.com/amodm/webbrowser-rs","last_synced_at":"2025-04-11T03:27:42.176Z","repository":{"id":2861508,"uuid":"47645762","full_name":"amodm/webbrowser-rs","owner":"amodm","description":"Rust library to open URLs in the web browsers available on a platform","archived":false,"fork":false,"pushed_at":"2025-03-17T19:49:03.000Z","size":298,"stargazers_count":278,"open_issues_count":1,"forks_count":46,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-03T20:38:24.846Z","etag":null,"topics":["rust","rust-crate","rust-lang","rust-library","rustlang","webbrowser"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amodm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-08T19:50:07.000Z","updated_at":"2025-03-22T03:39:00.000Z","dependencies_parsed_at":"2024-04-20T16:46:24.678Z","dependency_job_id":"b8116c69-b1fb-4d91-a500-dfe97225b7e0","html_url":"https://github.com/amodm/webbrowser-rs","commit_stats":{"total_commits":346,"total_committers":31,"mean_commits":"11.161290322580646","dds":"0.17341040462427748","last_synced_commit":"b5d62879832f72676c7b2d5b4be9b606f443c086"},"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amodm%2Fwebbrowser-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amodm%2Fwebbrowser-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amodm%2Fwebbrowser-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amodm%2Fwebbrowser-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amodm","download_url":"https://codeload.github.com/amodm/webbrowser-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248335011,"owners_count":21086491,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["rust","rust-crate","rust-lang","rust-library","rustlang","webbrowser"],"created_at":"2024-09-24T20:16:01.317Z","updated_at":"2025-04-11T03:27:42.153Z","avatar_url":"https://github.com/amodm.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webbrowser\n\n[![Current Crates.io Version](https://img.shields.io/crates/v/webbrowser.svg)](https://crates.io/crates/webbrowser)\n[![Crates.io Downloads](https://img.shields.io/crates/d/webbrowser.svg)](https://crates.io/crates/webbrowser)\n[![License](https://img.shields.io/crates/l/webbrowser.svg)](#license)\n\n![Linux Build](https://github.com/amodm/webbrowser-rs/workflows/Linux/badge.svg?branch=main\u0026x=1)\n![Windows Build](https://github.com/amodm/webbrowser-rs/workflows/Windows/badge.svg?branch=main\u0026x=1)\n![MacOS Build](https://github.com/amodm/webbrowser-rs/workflows/MacOS/badge.svg?branch=main\u0026x=1)\n![iOS Build](https://github.com/amodm/webbrowser-rs/workflows/iOS/badge.svg?branch=main\u0026x=1)\n![Android Build](https://github.com/amodm/webbrowser-rs/workflows/Android/badge.svg?branch=main\u0026x=1)\n![WASM Build](https://github.com/amodm/webbrowser-rs/workflows/WASM/badge.svg?branch=main\u0026x=1)\n\nRust library to open URLs and local files in the web browsers available on a platform, with guarantees of [Consistent Behaviour](#consistent-behaviour).\n\nInspired by the [webbrowser](https://docs.python.org/2/library/webbrowser.html) python library\n\n## Documentation\n\n- [API Reference](https://docs.rs/webbrowser)\n- [Release Notes](CHANGELOG.md)\n\n## Examples\n\n```rust\nuse webbrowser;\n\nif webbrowser::open(\"http://github.com\").is_ok() {\n    // ...\n}\n```\n\n## Platform Support\n\n| Platform | Supported | Browsers | Test status |\n|----------|-----------|----------|-------------|\n| macos    | ✅        | default + [others](https://docs.rs/webbrowser/latest/webbrowser/enum.Browser.html) | ✅ |\n| windows  | ✅        | default only | ✅ |\n| linux/wsl | ✅       | default only (respects $BROWSER env var, so can be used with other browsers) | ✅ |\n| android  | ✅        | default only | ✅ |\n| ios/tvOS/visionOS    | ✅        | default only | ✅ |\n| wasm     | ✅        | default only | ✅ |\n| unix (*bsd, aix etc.) | ✅        | default only (respects $BROWSER env var, so can be used with other browsers) | Manual |\n\n## Consistent Behaviour\n`webbrowser` defines consistent behaviour on all platforms as follows:\n* **Browser guarantee** - This library guarantees that the browser is opened, even for local files - the only crate to make such guarantees\nat the time of this writing. Alternative libraries rely on existing system commands, which may lead to an editor being opened (instead\nof the browser) for local html files, leading to an inconsistent behaviour for users.\n* **Non-Blocking** for GUI based browsers (e.g. Firefox, Chrome etc.), while **Blocking** for text based browser (e.g. lynx etc.)\n* **Suppressed output** by default for GUI based browsers, so that their stdout/stderr don't pollute the main program's output. This can be\noverridden by `webbrowser::open_browser_with_options`.\n\n## Crate Features\n`webbrowser` optionally allows the following features to be configured:\n* `hardened` - this disables handling of non-http(s) urls (e.g. `file:///`) as a hard security precaution\n* `disable-wsl` - this disables WSL `file` implementation (`http` still works)\n* `wasm-console` - this enables logging to wasm console (valid only on wasm platform)\n\n## Looking to contribute?\n\nPRs invited for\n\n* Bugs\n* Supporting non-default browser invocation on any platform\n\nImportant note (while testing):\n\n* This library requires availability of browsers and a graphical environment during runtime\n* `cargo test` will actually open the browser locally\n\nWhen contributing, please note that your work will be dual licensed as MIT + Apache-2.0 (see below).\n\n## License\n\n`SPDX-License-Identifier: Apache-2.0 OR MIT`\n\nLicensed under either of\n\n* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any\nadditional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famodm%2Fwebbrowser-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famodm%2Fwebbrowser-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famodm%2Fwebbrowser-rs/lists"}