@gtkx/native 2.0.0-beta.6 → 2.0.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +43 -40
  2. package/index.js +54 -55
  3. package/package.json +8 -6
package/README.md CHANGED
@@ -5,9 +5,9 @@
5
5
  <h1 align="center">GTKX</h1>
6
6
 
7
7
  <p align="center">
8
- The React framework for Linux, built on GTK.<br />
9
- Write native GTK4 desktop applications with React and TypeScript.
10
- Real GTK widgets, the GNOME stack, and standard web tooling.
8
+ The React framework for Linux.<br />
9
+ Write native GNOME applications with React and TypeScript.
10
+ Real Adwaita and GTK4 widgets with standard web tooling.
11
11
  </p>
12
12
 
13
13
  <p align="center">
@@ -38,11 +38,12 @@
38
38
 
39
39
  ## Demo
40
40
 
41
- The intrinsic elements in this snippet render GTK4 widgets, and ordinary React hooks and events drive them:
41
+ This app starts with an Adwaita application shell, renders native GTK4 widgets inside it, and uses ordinary React hooks and events:
42
42
 
43
43
  ```tsx
44
44
  import * as Gtk from "@gtkx/gi/gtk";
45
- import { GtkApplication, GtkApplicationWindow, GtkBox, GtkButton, GtkLabel } from "@gtkx/jsx/gtk";
45
+ import { AdwApplication, AdwApplicationWindow, AdwHeaderBar, AdwToolbarView } from "@gtkx/jsx/adw";
46
+ import { GtkBox, GtkButton, GtkLabel } from "@gtkx/jsx/gtk";
46
47
  import { createRoot, quit } from "@gtkx/react";
47
48
  import { useState } from "react";
48
49
 
@@ -50,38 +51,40 @@ const Counter = () => {
50
51
  const [count, setCount] = useState(0);
51
52
 
52
53
  return (
53
- <GtkApplicationWindow
54
+ <AdwApplicationWindow
54
55
  title="Hello GTKX"
55
56
  defaultWidth={400}
56
57
  defaultHeight={300}
57
58
  onCloseRequest={quit}
58
59
  >
59
- <GtkBox
60
- orientation={Gtk.Orientation.VERTICAL}
61
- spacing={20}
62
- marginTop={40}
63
- marginBottom={40}
64
- marginStart={40}
65
- marginEnd={40}
66
- valign={Gtk.Align.CENTER}
67
- halign={Gtk.Align.CENTER}
68
- >
69
- <GtkLabel cssClasses={["title-1"]}>Welcome to GTKX!</GtkLabel>
70
- <GtkLabel cssClasses={["title-2"]}>{`Count: ${count}`}</GtkLabel>
71
- <GtkButton
72
- label="Increment"
73
- onClicked={() => setCount((c) => c + 1)}
74
- cssClasses={["suggested-action", "pill"]}
75
- />
76
- </GtkBox>
77
- </GtkApplicationWindow>
60
+ <AdwToolbarView topBar={<AdwHeaderBar />}>
61
+ <GtkBox
62
+ orientation={Gtk.Orientation.VERTICAL}
63
+ spacing={20}
64
+ marginTop={40}
65
+ marginBottom={40}
66
+ marginStart={40}
67
+ marginEnd={40}
68
+ valign={Gtk.Align.CENTER}
69
+ halign={Gtk.Align.CENTER}
70
+ >
71
+ <GtkLabel cssClasses={["title-1"]}>Welcome to GTKX!</GtkLabel>
72
+ <GtkLabel cssClasses={["title-2"]}>{`Count: ${String(count)}`}</GtkLabel>
73
+ <GtkButton
74
+ label="Increment"
75
+ onClicked={() => setCount((c) => c + 1)}
76
+ cssClasses={["suggested-action", "pill"]}
77
+ />
78
+ </GtkBox>
79
+ </AdwToolbarView>
80
+ </AdwApplicationWindow>
78
81
  );
79
82
  };
80
83
 
81
84
  const App = () => (
82
- <GtkApplication>
85
+ <AdwApplication>
83
86
  <Counter />
84
- </GtkApplication>
87
+ </AdwApplication>
85
88
  );
86
89
 
87
90
  createRoot().render(<App />);
@@ -91,9 +94,9 @@ This is the [`hello-world`](https://github.com/gtkx-org/gtkx/tree/main/examples/
91
94
 
92
95
  ## Why GTKX
93
96
 
94
- ### A declarative layer for the GNOME stack
97
+ ### Adwaita-first application development
95
98
 
96
- GTK4 is mature, and GtkBuilder XML can lay out a static interface, but nothing re-renders that interface when your application state changes, and nothing hot-reloads it as you work. GTKX adds that missing layer, and the tooling around it, on top of the stack you already know:
99
+ GTKX uses Adwaita as the foundation for applications, windows, navigation, dialogs, and adaptive layouts, with the complete GTK4 toolkit underneath. It adds a declarative React layer and an integrated TypeScript toolchain to the GNOME platform:
97
100
 
98
101
  - a React reconciler that exposes every GObject as a JSX element,
99
102
  - a CLI for scaffolding, development, and production builds,
@@ -102,17 +105,17 @@ GTK4 is mature, and GtkBuilder XML can lay out a static interface, but nothing r
102
105
  - a Testing Library-style API for querying and driving your widgets in tests,
103
106
  - and a Model Context Protocol (MCP) server that exposes your live app to AI agents.
104
107
 
105
- ### The full GNOME API surface
108
+ ### Native GNOME widgets, without a compatibility layer
106
109
 
107
- React Native and similar frameworks hide the native toolkit so one API can run everywhere. GTKX exposes it: GTK4, Adwaita, and any other GObject-Introspection library on your system. Linux-only by design.
110
+ React Native and similar frameworks hide the native toolkit so one API can run everywhere. GTKX renders real Adwaita and GTK4 widgets and exposes any other GObject-Introspection library on your system. It is GNOME-native and Linux-only by design.
108
111
 
109
112
  ### Why Node.js, and why generated bindings
110
113
 
111
114
  GTKX runs on Node.js, which puts native modules, the npm ecosystem, and the tooling built for Node.js APIs within reach. GJS is GNOME's own runtime, built on SpiderMonkey rather than V8; node-gtk runs on Node.js but is lightly maintained, on the older nan/V8 ABI rather than N-API, and still centered on GTK3. The [Why GTKX guide](https://gtkx.dev/guide/why-gtkx) covers what running on Node.js means day to day.
112
115
 
113
- GTKX generates the TypeScript types and the native FFI calls from the same GObject-Introspection data, so the types cannot drift from the calls they back. Codegen covers the whole GTK4 and Adwaita surface.
116
+ GTKX generates the TypeScript types and native FFI calls from the same GObject-Introspection data, so the types cannot drift from the calls they back. `Adw-1` is the sole default GIR root; its GIR include pulls in `Gtk-4.0`, so codegen covers both complete API surfaces. Neither belongs in a GTKX 2 `libraries` list.
114
117
 
115
- At runtime, the native Rust core calls straight into the system GTK4, Adwaita, and GLib libraries through libffi, without loading libgirepository at all.
118
+ At runtime, the native Rust core calls straight into the system Adwaita, GTK4, and GLib libraries through libffi, without loading libgirepository at all.
116
119
 
117
120
  ## Quick start
118
121
 
@@ -121,10 +124,10 @@ GTKX is Linux-only and needs Node.js 26.7 or later. See [Requirements](#requirem
121
124
  Scaffold a new app with the `create-gtkx` initializer:
122
125
 
123
126
  ```sh
124
- npm create gtkx
127
+ npm create gtkx@beta
125
128
  ```
126
129
 
127
- The same command works with other package managers: `pnpm create gtkx` or `yarn create gtkx`.
130
+ The same command works with other package managers: `pnpm create gtkx@beta` or `yarn create gtkx@beta`.
128
131
 
129
132
  Then run your new app:
130
133
 
@@ -145,7 +148,7 @@ The documentation at **[gtkx.dev](https://gtkx.dev)** includes a step-by-step tu
145
148
 
146
149
  GTKX is Linux-only. You need:
147
150
 
148
- - Linux with the GTK4 (4.20 or later), Adwaita (1.8 or later), and GLib development libraries
151
+ - Linux with the Adwaita (1.8 or later), GTK4 (4.20 or later), and GLib development libraries
149
152
  - Node.js 26.7 or later
150
153
 
151
154
  The `@gtkx/native` addon ships prebuilt for x64 and arm64 glibc Linux; other targets need to build it from the GTKX repository, which requires a Rust toolchain.
@@ -154,10 +157,10 @@ The `@gtkx/native` addon ships prebuilt for x64 and arm64 glibc Linux; other tar
154
157
 
155
158
  Explore the [example apps](https://github.com/gtkx-org/gtkx/tree/main/examples):
156
159
 
157
- - [`hello-world`](https://github.com/gtkx-org/gtkx/tree/main/examples/hello-world): the counter above.
158
- - [`gtk-demo`](https://github.com/gtkx-org/gtkx/tree/main/examples/gtk-demo): a React port of the official GTK4 widget showcase, covering lists, dialogs, gestures, CSS, and OpenGL.
159
- - [`browser`](https://github.com/gtkx-org/gtkx/tree/main/examples/browser): a WebKitWebView-based web browser.
160
- - [`animations`](https://github.com/gtkx-org/gtkx/tree/main/examples/animations): a tour of `@gtkx/animated`, React Spring animations driven by the GTK frame clock.
160
+ - [`hello-world`](https://github.com/gtkx-org/gtkx/tree/main/examples/hello-world): the Adwaita counter above.
161
+ - [`gtk-demo`](https://github.com/gtkx-org/gtkx/tree/main/examples/gtk-demo): the official GTK4 widget showcase in an Adwaita application shell, covering lists, dialogs, gestures, CSS, and OpenGL.
162
+ - [`browser`](https://github.com/gtkx-org/gtkx/tree/main/examples/browser): an Adwaita browser built around `WebKitWebView`.
163
+ - [`animations`](https://github.com/gtkx-org/gtkx/tree/main/examples/animations): an Adwaita showcase for `@gtkx/animated`, with React Spring animations driven by the GTK frame clock.
161
164
  - [`navigation`](https://github.com/gtkx-org/gtkx/tree/main/examples/navigation): a tour of `@gtkx/navigation`, React Navigation's stack, tab, and drawer navigators rendered with libadwaita.
162
165
  - [`tutorial`](https://github.com/gtkx-org/gtkx/tree/main/examples/tutorial): the Tasks app the documentation builds.
163
166
 
package/index.js CHANGED
@@ -5,7 +5,6 @@
5
5
 
6
6
  import { createRequire } from 'module'
7
7
  const require = createRequire(import.meta.url)
8
- const __dirname = new URL('.', import.meta.url).pathname
9
8
 
10
9
  const { readFileSync } = require('fs')
11
10
  let nativeBinding = null
@@ -81,8 +80,8 @@ function requireNative() {
81
80
  try {
82
81
  const binding = require('@gtkx/native-android-arm64')
83
82
  const bindingPackageVersion = require('@gtkx/native-android-arm64/package.json').version
84
- if (bindingPackageVersion !== '2.0.0-beta.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
85
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
83
+ if (bindingPackageVersion !== '2.0.0-beta.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
84
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
86
85
  }
87
86
  return binding
88
87
  } catch (e) {
@@ -97,8 +96,8 @@ function requireNative() {
97
96
  try {
98
97
  const binding = require('@gtkx/native-android-arm-eabi')
99
98
  const bindingPackageVersion = require('@gtkx/native-android-arm-eabi/package.json').version
100
- if (bindingPackageVersion !== '2.0.0-beta.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
101
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
99
+ if (bindingPackageVersion !== '2.0.0-beta.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
100
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
102
101
  }
103
102
  return binding
104
103
  } catch (e) {
@@ -118,8 +117,8 @@ function requireNative() {
118
117
  try {
119
118
  const binding = require('@gtkx/native-win32-x64-gnu')
120
119
  const bindingPackageVersion = require('@gtkx/native-win32-x64-gnu/package.json').version
121
- if (bindingPackageVersion !== '2.0.0-beta.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
122
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
120
+ if (bindingPackageVersion !== '2.0.0-beta.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
121
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
123
122
  }
124
123
  return binding
125
124
  } catch (e) {
@@ -134,8 +133,8 @@ function requireNative() {
134
133
  try {
135
134
  const binding = require('@gtkx/native-win32-x64-msvc')
136
135
  const bindingPackageVersion = require('@gtkx/native-win32-x64-msvc/package.json').version
137
- if (bindingPackageVersion !== '2.0.0-beta.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
138
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
136
+ if (bindingPackageVersion !== '2.0.0-beta.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
137
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
139
138
  }
140
139
  return binding
141
140
  } catch (e) {
@@ -151,8 +150,8 @@ function requireNative() {
151
150
  try {
152
151
  const binding = require('@gtkx/native-win32-ia32-msvc')
153
152
  const bindingPackageVersion = require('@gtkx/native-win32-ia32-msvc/package.json').version
154
- if (bindingPackageVersion !== '2.0.0-beta.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
155
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
153
+ if (bindingPackageVersion !== '2.0.0-beta.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
154
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
156
155
  }
157
156
  return binding
158
157
  } catch (e) {
@@ -167,8 +166,8 @@ function requireNative() {
167
166
  try {
168
167
  const binding = require('@gtkx/native-win32-arm64-msvc')
169
168
  const bindingPackageVersion = require('@gtkx/native-win32-arm64-msvc/package.json').version
170
- if (bindingPackageVersion !== '2.0.0-beta.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
171
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
169
+ if (bindingPackageVersion !== '2.0.0-beta.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
170
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
172
171
  }
173
172
  return binding
174
173
  } catch (e) {
@@ -186,8 +185,8 @@ function requireNative() {
186
185
  try {
187
186
  const binding = require('@gtkx/native-darwin-universal')
188
187
  const bindingPackageVersion = require('@gtkx/native-darwin-universal/package.json').version
189
- if (bindingPackageVersion !== '2.0.0-beta.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
190
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
188
+ if (bindingPackageVersion !== '2.0.0-beta.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
189
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
191
190
  }
192
191
  return binding
193
192
  } catch (e) {
@@ -202,8 +201,8 @@ function requireNative() {
202
201
  try {
203
202
  const binding = require('@gtkx/native-darwin-x64')
204
203
  const bindingPackageVersion = require('@gtkx/native-darwin-x64/package.json').version
205
- if (bindingPackageVersion !== '2.0.0-beta.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
206
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
204
+ if (bindingPackageVersion !== '2.0.0-beta.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
205
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
207
206
  }
208
207
  return binding
209
208
  } catch (e) {
@@ -218,8 +217,8 @@ function requireNative() {
218
217
  try {
219
218
  const binding = require('@gtkx/native-darwin-arm64')
220
219
  const bindingPackageVersion = require('@gtkx/native-darwin-arm64/package.json').version
221
- if (bindingPackageVersion !== '2.0.0-beta.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
222
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
220
+ if (bindingPackageVersion !== '2.0.0-beta.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
221
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
223
222
  }
224
223
  return binding
225
224
  } catch (e) {
@@ -238,8 +237,8 @@ function requireNative() {
238
237
  try {
239
238
  const binding = require('@gtkx/native-freebsd-x64')
240
239
  const bindingPackageVersion = require('@gtkx/native-freebsd-x64/package.json').version
241
- if (bindingPackageVersion !== '2.0.0-beta.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
242
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
240
+ if (bindingPackageVersion !== '2.0.0-beta.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
241
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
243
242
  }
244
243
  return binding
245
244
  } catch (e) {
@@ -254,8 +253,8 @@ function requireNative() {
254
253
  try {
255
254
  const binding = require('@gtkx/native-freebsd-arm64')
256
255
  const bindingPackageVersion = require('@gtkx/native-freebsd-arm64/package.json').version
257
- if (bindingPackageVersion !== '2.0.0-beta.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
258
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
256
+ if (bindingPackageVersion !== '2.0.0-beta.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
257
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
259
258
  }
260
259
  return binding
261
260
  } catch (e) {
@@ -275,8 +274,8 @@ function requireNative() {
275
274
  try {
276
275
  const binding = require('@gtkx/native-linux-x64-musl')
277
276
  const bindingPackageVersion = require('@gtkx/native-linux-x64-musl/package.json').version
278
- if (bindingPackageVersion !== '2.0.0-beta.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
279
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
277
+ if (bindingPackageVersion !== '2.0.0-beta.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
278
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
280
279
  }
281
280
  return binding
282
281
  } catch (e) {
@@ -291,8 +290,8 @@ function requireNative() {
291
290
  try {
292
291
  const binding = require('@gtkx/native-linux-x64-gnu')
293
292
  const bindingPackageVersion = require('@gtkx/native-linux-x64-gnu/package.json').version
294
- if (bindingPackageVersion !== '2.0.0-beta.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
295
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
293
+ if (bindingPackageVersion !== '2.0.0-beta.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
294
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
296
295
  }
297
296
  return binding
298
297
  } catch (e) {
@@ -309,8 +308,8 @@ function requireNative() {
309
308
  try {
310
309
  const binding = require('@gtkx/native-linux-arm64-musl')
311
310
  const bindingPackageVersion = require('@gtkx/native-linux-arm64-musl/package.json').version
312
- if (bindingPackageVersion !== '2.0.0-beta.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
313
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
311
+ if (bindingPackageVersion !== '2.0.0-beta.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
312
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
314
313
  }
315
314
  return binding
316
315
  } catch (e) {
@@ -325,8 +324,8 @@ function requireNative() {
325
324
  try {
326
325
  const binding = require('@gtkx/native-linux-arm64-gnu')
327
326
  const bindingPackageVersion = require('@gtkx/native-linux-arm64-gnu/package.json').version
328
- if (bindingPackageVersion !== '2.0.0-beta.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
329
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
327
+ if (bindingPackageVersion !== '2.0.0-beta.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
328
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
330
329
  }
331
330
  return binding
332
331
  } catch (e) {
@@ -343,8 +342,8 @@ function requireNative() {
343
342
  try {
344
343
  const binding = require('@gtkx/native-linux-arm-musleabihf')
345
344
  const bindingPackageVersion = require('@gtkx/native-linux-arm-musleabihf/package.json').version
346
- if (bindingPackageVersion !== '2.0.0-beta.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
347
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
345
+ if (bindingPackageVersion !== '2.0.0-beta.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
346
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
348
347
  }
349
348
  return binding
350
349
  } catch (e) {
@@ -359,8 +358,8 @@ function requireNative() {
359
358
  try {
360
359
  const binding = require('@gtkx/native-linux-arm-gnueabihf')
361
360
  const bindingPackageVersion = require('@gtkx/native-linux-arm-gnueabihf/package.json').version
362
- if (bindingPackageVersion !== '2.0.0-beta.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
363
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
361
+ if (bindingPackageVersion !== '2.0.0-beta.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
362
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
364
363
  }
365
364
  return binding
366
365
  } catch (e) {
@@ -377,8 +376,8 @@ function requireNative() {
377
376
  try {
378
377
  const binding = require('@gtkx/native-linux-loong64-musl')
379
378
  const bindingPackageVersion = require('@gtkx/native-linux-loong64-musl/package.json').version
380
- if (bindingPackageVersion !== '2.0.0-beta.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
381
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
379
+ if (bindingPackageVersion !== '2.0.0-beta.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
380
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
382
381
  }
383
382
  return binding
384
383
  } catch (e) {
@@ -393,8 +392,8 @@ function requireNative() {
393
392
  try {
394
393
  const binding = require('@gtkx/native-linux-loong64-gnu')
395
394
  const bindingPackageVersion = require('@gtkx/native-linux-loong64-gnu/package.json').version
396
- if (bindingPackageVersion !== '2.0.0-beta.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
397
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
395
+ if (bindingPackageVersion !== '2.0.0-beta.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
396
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
398
397
  }
399
398
  return binding
400
399
  } catch (e) {
@@ -411,8 +410,8 @@ function requireNative() {
411
410
  try {
412
411
  const binding = require('@gtkx/native-linux-riscv64-musl')
413
412
  const bindingPackageVersion = require('@gtkx/native-linux-riscv64-musl/package.json').version
414
- if (bindingPackageVersion !== '2.0.0-beta.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
415
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
413
+ if (bindingPackageVersion !== '2.0.0-beta.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
414
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
416
415
  }
417
416
  return binding
418
417
  } catch (e) {
@@ -427,8 +426,8 @@ function requireNative() {
427
426
  try {
428
427
  const binding = require('@gtkx/native-linux-riscv64-gnu')
429
428
  const bindingPackageVersion = require('@gtkx/native-linux-riscv64-gnu/package.json').version
430
- if (bindingPackageVersion !== '2.0.0-beta.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
431
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
429
+ if (bindingPackageVersion !== '2.0.0-beta.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
430
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
432
431
  }
433
432
  return binding
434
433
  } catch (e) {
@@ -444,8 +443,8 @@ function requireNative() {
444
443
  try {
445
444
  const binding = require('@gtkx/native-linux-ppc64-gnu')
446
445
  const bindingPackageVersion = require('@gtkx/native-linux-ppc64-gnu/package.json').version
447
- if (bindingPackageVersion !== '2.0.0-beta.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
448
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
446
+ if (bindingPackageVersion !== '2.0.0-beta.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
447
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
449
448
  }
450
449
  return binding
451
450
  } catch (e) {
@@ -460,8 +459,8 @@ function requireNative() {
460
459
  try {
461
460
  const binding = require('@gtkx/native-linux-s390x-gnu')
462
461
  const bindingPackageVersion = require('@gtkx/native-linux-s390x-gnu/package.json').version
463
- if (bindingPackageVersion !== '2.0.0-beta.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
464
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
462
+ if (bindingPackageVersion !== '2.0.0-beta.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
463
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
465
464
  }
466
465
  return binding
467
466
  } catch (e) {
@@ -480,8 +479,8 @@ function requireNative() {
480
479
  try {
481
480
  const binding = require('@gtkx/native-openharmony-arm64')
482
481
  const bindingPackageVersion = require('@gtkx/native-openharmony-arm64/package.json').version
483
- if (bindingPackageVersion !== '2.0.0-beta.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
484
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
482
+ if (bindingPackageVersion !== '2.0.0-beta.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
483
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
485
484
  }
486
485
  return binding
487
486
  } catch (e) {
@@ -496,8 +495,8 @@ function requireNative() {
496
495
  try {
497
496
  const binding = require('@gtkx/native-openharmony-x64')
498
497
  const bindingPackageVersion = require('@gtkx/native-openharmony-x64/package.json').version
499
- if (bindingPackageVersion !== '2.0.0-beta.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
500
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
498
+ if (bindingPackageVersion !== '2.0.0-beta.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
499
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
501
500
  }
502
501
  return binding
503
502
  } catch (e) {
@@ -512,8 +511,8 @@ function requireNative() {
512
511
  try {
513
512
  const binding = require('@gtkx/native-openharmony-arm')
514
513
  const bindingPackageVersion = require('@gtkx/native-openharmony-arm/package.json').version
515
- if (bindingPackageVersion !== '2.0.0-beta.6' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
516
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
514
+ if (bindingPackageVersion !== '2.0.0-beta.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
515
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
517
516
  }
518
517
  return binding
519
518
  } catch (e) {
@@ -652,8 +651,8 @@ if (!nativeBinding || forceWasi) {
652
651
  if (!candidateFailed) {
653
652
  if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
654
653
  const bindingPackageVersion = require('@gtkx/native-wasm32-wasi/package.json').version
655
- if (bindingPackageVersion !== '2.0.0-beta.6') {
656
- throw new Error(`WASI binding package version mismatch, expected 2.0.0-beta.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
654
+ if (bindingPackageVersion !== '2.0.0-beta.7') {
655
+ throw new Error(`WASI binding package version mismatch, expected 2.0.0-beta.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
657
656
  }
658
657
  }
659
658
  wasiBinding = require('@gtkx/native-wasm32-wasi')
package/package.json CHANGED
@@ -1,11 +1,13 @@
1
1
  {
2
2
  "name": "@gtkx/native",
3
- "version": "2.0.0-beta.6",
4
- "description": "Rust addon for GTK: loads libraries, marshals values, tracks GObjects.",
3
+ "version": "2.0.0-beta.7",
4
+ "description": "Rust FFI addon for the GTKX GNOME stack and GObject libraries.",
5
5
  "keywords": [
6
6
  "gtkx",
7
7
  "gtk",
8
8
  "gtk4",
9
+ "adwaita",
10
+ "gnome",
9
11
  "native",
10
12
  "ffi",
11
13
  "rust",
@@ -137,12 +139,12 @@
137
139
  "node": ">=26.7.0"
138
140
  },
139
141
  "devDependencies": {
140
- "@gtkx/vitest": "2.0.0-beta.6",
141
- "@napi-rs/cli": "^3.8.6"
142
+ "@gtkx/vitest": "2.0.0-beta.7",
143
+ "@napi-rs/cli": "^3.9.0"
142
144
  },
143
145
  "optionalDependencies": {
144
- "@gtkx/native-linux-arm64-gnu": "2.0.0-beta.6",
145
- "@gtkx/native-linux-x64-gnu": "2.0.0-beta.6"
146
+ "@gtkx/native-linux-arm64-gnu": "2.0.0-beta.7",
147
+ "@gtkx/native-linux-x64-gnu": "2.0.0-beta.7"
146
148
  },
147
149
  "scripts": {
148
150
  "artifacts": "napi artifacts",