Skip to content

v0.11.0

Latest

Choose a tag to compare

@github-actions github-actions released this 02 Dec 20:33
6e475e4

Serial ports, HID and raw USB devices and TCP sockets from JavaScript; context menus that open in about 6 ms on Windows; progress on the taskbar and every display on the desk; files and links macOS opens the app with; prebuilt Linux arm64 hosts; and the JS heap in plain sight, with gc.collect(), heap figures and memory-pressure events.

Read the Skathi 0.11 release post

bun create skathi my-app
bun add @skathi-native/runtime@^0.11.0 && bun add -d @skathi-native/cli@^0.11.0
cargo add skathi@0.11.0

Window positions on macOS are now global (0,0 is the primary display's top-left corner), so a position saved on a second display under 0.10 needs checking against getScreenDetails() before it is restored. Grid tracks in px are now the size written on HiDPI displays. For Rust hosts, the skathi crate's tray re-export is behind the tray feature (on by default).

Hardware

  • skathi:serial (#153): reads with timeout, idle and exact; reads and writes at once; web streams; any baud rate, 5–8 data bits, mark/space parity, hardware and software flow control; RS-485 direction control by the Linux driver; disconnect; serial.list() and onconnect with USB ids and serial numbers; ports opened only by "permissions.serial" rules, by path or by USB id.
  • skathi:hid (#154): input, output and feature reports; "permissions.hid" rules, by usage page too; keyboards, mice, touch screens and security keys never open.
  • skathi:usb (#154): control, bulk and interrupt transfers with timeout and AbortSignal, clearHalt(), connect and disconnect events; "permissions.usb" rules, with protected interfaces closed unless a rule opts in.

Network

  • TcpSocket.connect() in skathi:network: a TCP connection as two web streams, the system resolver with IPv6/IPv4 racing, one timeout and signal over the connect, half-close, noDelay and keepAlive.
  • "permissions.network.tcp": host and port rules with addresses, subnets, names, *. suffixes and port ranges. sk check warns about a literal destination no rule covers (SK6013) and a rule that opens any host (SK6014).

Menus and pop-outs

  • Windows: a context menu opens in about 6 ms instead of about 23 ms, by reusing the menu window.
  • SkContextMenu: backdrop, corner and shadow apply live and submenus inherit them; placement="above"; open at a saved point; rows added or removed while open are measured again; custom rows in keyboard navigation with a cancelable key event; keyboard selection kept through repaints (#214, #215, #219, #220, #222, #226).
  • <SkWindow>: focus(), getBounds() and a move event in Vue and Svelte; bounds kept across monitors with different scales; macOS children kept when the owner swaps into a panel; focus cleared when a pop-out closes (#217, #221, #223, #224, #225).

Windows, launch and system

  • appWindow.setProgressBar() on the Windows taskbar, the macOS Dock and Linux launchers that read the Unity entry (#188).
  • window.getScreenDetails(), the Window Management API; macOS window coordinates are global (#189).
  • moveend and resizeend on appWindow (#195).
  • macOS: files and links the system opens the app with reach appLaunch and launch events; fileAssociations become CFBundleDocumentTypes (#191).
  • File pickers: startIn as an absolute path and a title (#192); tray items, global hotkeys, media-session actions and second launches grant user activation (#193).
  • macOS: navigator.clipboard writes and reads PNG, HTML and text (#190).
  • os.doubleClickInterval in skathi:os (#194).

Memory and time

  • gc in skathi:runtime (#233): collect() young or full, with memory handed back to the OS and optionally compiled code dropped; stats() with heap figures and collection counts and times; pressure events from Windows, macOS and Linux (PSI), with a collection by the host on "critical".
  • runtime.memoryUsage() in Node's shape, and performance.memory.
  • sleep() in skathi:time, with a number, a TimeSpan or a Date, and an AbortSignal (#232).

Linux on Arm

  • Prebuilt Linux arm64 hosts (ARMv8.0-A with NEON, glibc 2.35 or newer).
  • NEON for colour conversion, scaling and VP9 decoding on aarch64 Linux and macOS: on an M-series Mac a 512×512 scale went from 557 to 75 µs, a small VP9 clip from 38 to 17 µs a frame.

For embedders

  • Desktop services are Cargo features, all on by default: tray, notifications, dialogs, share, WebAuthn, media session, badge, capture, network, power, accessibility, the XDG portal and the keyring. The skathi crate forwards them (#216). Without dialogs, camera and microphone requests are answered from "permissions.media".
  • sockets feature and Builder::allow_network for TcpSocket.
  • Builder::on_open_urls for files and links macOS opens the exe with.
  • js::grant_user_activation(cx) for native events that are the user's action.

Fixes

  • Grid tracks in px were laid out at half size on a 2x display (#210).
  • font-family: inherit | initial | unset resets the family again, and transition-property takes those keywords (#198).
  • Text selection and HTML drag and drop use the system's drag threshold; a press on an inactive window no longer raises it before a drag; losing the mouse capture cancels the gesture (#175, #176, #184).
  • Windows: D3D11 shaders and D3D12 pipelines are shared per device instead of built per window (#183); WebGPU encodes render passes faster.
  • sk build --aot: a bundle variable no longer takes the name of a host global (such as gc), which made the native compiler refuse the image.
  • SK_SHELL=record prints its line to stderr in every build (#196).

Known

  • TcpSocket: no TLS yet (tls and startTls() reject with ENOTSUP), and no listening sockets.
  • Under Wayland the clipboard carries text only, displays have no names, and a pop-out's screen position is unknown.
  • pressure on Linux needs PSI that an unprivileged process may watch.
  • Option getters that throw are ignored by some skathi:* functions (#235).

Full Changelog: v0.10.0...v0.11.0