| Crates.io | tauri-plugin-windows-version |
| lib.rs | tauri-plugin-windows-version |
| version | 2.0.0 |
| created_at | 2025-04-09 08:09:27.406372+00 |
| updated_at | 2025-04-09 08:09:27.406372+00 |
| description | Get the version number of the current Windows OS. |
| homepage | |
| repository | https://github.com/ayangweb/tauri-plugin-windows-version |
| max_upload_size | |
| id | 1626367 |
| size | 221,583 |
This plugin only works on tauri v2, if you need the v1 plugin, feel free to submit a PR!
Get the version number of the current Windows OS.
cargo add tauri-plugin-windows-version
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
pnpm add tauri-plugin-windows-version-api
src-tauri/src/lib.rs
pub fn run() {
tauri::Builder::default()
+ .plugin(tauri_plugin_windows_version::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
src-tauri/capabilities/default.json
{
...
"permissions": [
...
+ "windows-version:default"
]
}
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
import { getWindowsVersion } from "tauri-plugin-windows-version-api";
const version = await getWindowsVersion();
console.log(version); // 11
| Method | Description |
|---|---|
getWindowsVersion |
Get the version number of the current Windows OS. |
isWindows7 |
Check if the current OS is Windows 7. |
isWindows8 |
Check if the current OS is Windows 8. |
isWindows10 |
Check if the current OS is Windows 10. |
isWindows11 |
Check if the current OS is Windows 11. |
git clone https://github.com/ayangweb/tauri-plugin-windows-version.git
pnpm install
pnpm build
cd examples/tauri-app
pnpm install
pnpm tauri dev