Skip to content

Commit eb035b9

Browse files
committed
Readme update for Tauri and version bump
1 parent a4c13c7 commit eb035b9

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
**Cross-Runtime Environment Detection for JavaScript and TypeScript**
66

7-
This package provides a well defined, cross runtime, way to determine details about the current runtime environment (Deno, Bun, Node.js, or browser) along with detailed browser detection. Since version `1.1.0`, it can also parse a User Agent string to extract OS, Product and Version in a reliable way.
7+
This package provides a well defined, cross runtime, way to determine details about the current runtime environment (Deno, Bun, Node.js, Tauri, or browser) along with detailed browser detection. Since version `1.1.0`, it can also parse a User Agent string to extract OS, Product and Version in a reliable way.
88

99
Try it out at [https://jsfiddle.net/hexag0n/x9568nmy/](https://jsfiddle.net/hexag0n/x9568nmy/).
1010

@@ -91,6 +91,7 @@ bunx jsr add @cross/runtime # Bun
9191
* Deno
9292
* Bun
9393
* Node.js
94+
* Tauri
9495
* Web browsers (Chrome, Firefox, Edge, Safari, Opera, Brave)
9596
* Edge Functions (Cloudflare Workers, Netlify Edge Functions, Fastly Compute@Edge)
9697

@@ -115,3 +116,5 @@ bunx jsr add @cross/runtime # Bun
115116
**Important Notes:**
116117

117118
* **Additional Functionality:** Beyond detection, the `dumpSystemInfo` function logs the information, and the `getsystemInfo` function provides a JSON representation.
119+
* **Tauri Detection:** Tauri applications are detected by the presence of the `__TAURI__` global object. Since Tauri runs in a webview, it uses the same OS and architecture detection logic as browsers.
120+
* **Tauri detailed Information:** For detailed Tauri-specific information (app name, version, identifier, Tauri framework version), use the `getTauriInfo()` function. This requires the `@tauri-apps/api` dependency to be installed in your Tauri project.

deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cross/runtime",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"exports": "./mod.ts",
55
"fmt": {
66
"lineWidth": 200,

0 commit comments

Comments
 (0)