npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

tauri-plugin-hwinfo

v0.2.3

Published

A cross-platform Tauri plugin to fetch CPU, RAM, GPU, and OS info.

Downloads

82

Readme

🧠 tauri-plugin-hwinfo

License Crates.io Crates.io Downloads npm npm Downloads

A cross-platform Tauri plugin to fetch detailed system hardware information from the user's device, including CPU, RAM, GPU, and OS metadata — all accessible through both Rust and JavaScript/TypeScript APIs.

⚠️ Platform Support: Desktop-only. Mobile returns placeholder values.

⚠️ Testing: Only Windows is tested and confirmed working so far.

🔧 Features

  • ✅ CPU Info (manufacturer, model, threads, max frequency)
  • ✅ RAM Info (total memory in MB)
  • ✅ GPU Info (model, manufacturer, VRAM in MB, CUDA support, Vulkan support)
  • ✅ OS Info (OS name and version)
  • ✅ Full Tauri v2 permissions support
  • ✅ JS/TS bindings via @tauri-apps/api/core::invoke

📦 Installation

From Crates.io (Rust)

cargo add tauri-plugin-hwinfo

From GitHub (bleeding edge)

[dependencies]
tauri-plugin-hwinfo = { git = "https://github.com/nikolchaa/tauri-plugin-hwinfo" }

🛠️ Usage (Rust Backend)

Option 1: Auto-bind commands via invoke_handler (if calling from JS/TS manually)

#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
    tauri::Builder::default()
        .plugin(tauri_plugin_hwinfo::init())
        .invoke_handler(tauri::generate_handler![
            tauri_plugin_hwinfo::get_cpu_info,
            tauri_plugin_hwinfo::get_gpu_info,
            tauri_plugin_hwinfo::get_ram_info,
            tauri_plugin_hwinfo::get_os_info
        ])
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}

Option 2: Plugin-only setup (if using only the frontend API)

#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
    tauri::Builder::default()
        .plugin(tauri_plugin_hwinfo::init())
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}

Use Option 1 if you want to manually expose commands to JS via invoke().

Use Option 2 if you're only using tauri-plugin-hwinfo's built-in TS API.

Add this to your src-tauri/capabilities/default.json:

{
  "permissions": [
    "hwinfo:allow-cpu-info",
    "hwinfo:allow-gpu-info",
    "hwinfo:allow-ram-info",
    "hwinfo:allow-os-info"
  ]
}

📜 Output Format

// CPU Info:
{
  "manufacturer": "AuthenticAMD",
  "model": "AMD Ryzen 9 5900X 12-Core Processor",
  "maxFrequency": 3701,
  "threads": 24
}

// RAM Info:
{
  "sizeMb": 32686
}

// GPU Info:
{
  "manufacturer": "Advanced Micro Devices, Inc.",
  "model": "AMD Radeon RX 6950 XT",
  "vramMb": 16311,
  "supportsCuda": false,
  "supportsVulkan": true
}

// OS Info:
{
  "name": "Windows",
  "version": "10.0.26100"
}

📌 Frontend API (JS/TS)

Install:

npm i tauri-plugin-hwinfo

Usage:

import {
  getCpuInfo,
  getRamInfo,
  getGpuInfo,
  getOsInfo,
} from "tauri-plugin-hwinfo";

async function logSystemInfo() {
  const cpu = await getCpuInfo();
  const ram = await getRamInfo();
  const gpu = await getGpuInfo();
  const os = await getOsInfo();

  console.log("CPU Info:", cpu);
  console.log("RAM Info:", ram);
  console.log("GPU Info:", gpu);
  console.log("OS Info:", os);
}