{"id":27644918,"url":"https://github.com/ayangweb/tauri-plugin-windows-version","last_synced_at":"2025-04-24T00:59:04.975Z","repository":{"id":286955745,"uuid":"963083597","full_name":"ayangweb/tauri-plugin-windows-version","owner":"ayangweb","description":"Get the version number of the current Windows OS.","archived":false,"fork":false,"pushed_at":"2025-04-09T08:08:12.000Z","size":250,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-24T00:59:00.650Z","etag":null,"topics":["rust","tauri","tauri-plugin","windows-version"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/tauri-plugin-windows-version","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ayangweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-04-09T06:12:12.000Z","updated_at":"2025-04-18T13:34:43.000Z","dependencies_parsed_at":"2025-04-09T07:36:57.011Z","dependency_job_id":null,"html_url":"https://github.com/ayangweb/tauri-plugin-windows-version","commit_stats":null,"previous_names":["ayangweb/tauri-plugin-windows-version"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayangweb%2Ftauri-plugin-windows-version","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayangweb%2Ftauri-plugin-windows-version/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayangweb%2Ftauri-plugin-windows-version/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayangweb%2Ftauri-plugin-windows-version/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ayangweb","download_url":"https://codeload.github.com/ayangweb/tauri-plugin-windows-version/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250540991,"owners_count":21447427,"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","tauri","tauri-plugin","windows-version"],"created_at":"2025-04-24T00:59:04.403Z","updated_at":"2025-04-24T00:59:04.966Z","avatar_url":"https://github.com/ayangweb.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tauri-plugin-windows-version\n\n\u003e This plugin only works on tauri v2, if you need the v1 plugin, feel free to submit a PR!\n\nGet the version number of the current Windows OS.\n\n## Install\n\n```shell\ncargo add tauri-plugin-windows-version\n```\n\nYou can install the JavaScript Guest bindings using your preferred JavaScript package manager:\n\n```shell\npnpm add tauri-plugin-windows-version-api\n```\n\n## Usage\n\n`src-tauri/src/lib.rs`\n\n```diff\npub fn run() {\n    tauri::Builder::default()\n+       .plugin(tauri_plugin_windows_version::init())\n        .run(tauri::generate_context!())\n        .expect(\"error while running tauri application\");\n}\n```\n\n`src-tauri/capabilities/default.json`\n\n```diff\n{\n    ...\n    \"permissions\": [\n        ...\n+       \"windows-version:default\"\n    ]\n}\n```\n\nAfterwards all the plugin's APIs are available through the JavaScript guest bindings:\n\n```ts\nimport { getWindowsVersion } from \"tauri-plugin-windows-version-api\";\n\nconst version = await getWindowsVersion();\nconsole.log(version); // 11\n```\n\n## Methods\n\n| Method              | Description                                       |\n| ------------------- | ------------------------------------------------- |\n| `getWindowsVersion` | Get the version number of the current Windows OS. |\n| `isWindows7`        | Check if the current OS is Windows 7.             |\n| `isWindows8`        | Check if the current OS is Windows 8.             |\n| `isWindows10`       | Check if the current OS is Windows 10.            |\n| `isWindows11`       | Check if the current OS is Windows 11.            |\n\n## Example\n\n```shell\ngit clone https://github.com/ayangweb/tauri-plugin-windows-version.git\n```\n\n```shell\npnpm install\n\npnpm build\n\ncd examples/tauri-app\n\npnpm install\n\npnpm tauri dev\n```\n\n## Thanks\n\n- Use [windows-version](https://crates.io/crates/windows-version) to get the version number of the current Windows OS.\n\n## Who's Use It\n\n- [Coco AI](https://github.com/infinilabs/coco-app) - Search, Connect, Collaborate, Your Personal AI Search and Assistant, all in one space.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayangweb%2Ftauri-plugin-windows-version","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fayangweb%2Ftauri-plugin-windows-version","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayangweb%2Ftauri-plugin-windows-version/lists"}