Skip to main content

Jac-native desktop target: one nacompile'd binary + the OS webview.

Project description

jac-desktop

Jac-native desktop target for Jac: a desktop app is one jac nacompiled binary + the OS's own web engine - no Rust toolchain, no PyInstaller, no separate process.

What you get

  • A desktop build target registered with jac-client's target registry, so jac build --client desktop and jac start --client desktop work once this package is installed.
  • The build pipeline:
    1. builds your cl codespace with the standard Vite pipeline (via WebTarget),
    2. compiles a native host (na) that embeds CPython to serve that bundle on a loopback port and renders it in the OS-native webview (WebKitGTK on Linux / WKWebView on macOS / WebView2 on Windows),
    3. produces a single self-contained binary under .jac/client/desktop/.

The native webview binding + build tooling live under jac_desktop/native/webview/ (see its README for the phase-by-phase design and the dependency-free test suite).

Install

pip install jac-client jac-desktop

Building a desktop app needs the OS web engine + a C toolchain so the native host can link libwebview.so (built on first use). On Debian/Ubuntu:

sudo ./jac_desktop/native/webview/install_webkit_deps.sh
# (build-essential, pkg-config, libgtk-3-dev, libwebkit2gtk-4.1-dev)

Project flow

jac create --use fullstack my-app      # or any project with a cl codespace
cd my-app
jac build --client desktop             # -> .jac/client/desktop/<app>  (single binary)
jac start --client desktop             # build + launch the native window

Window geometry + app identity come from [plugins.desktop] in jac.toml:

[plugins.desktop]
name = "my-app"

[plugins.desktop.window]
title = "My App"
width = 1000
height = 700

Status

jac build --client desktop produces a working, self-contained native desktop binary that renders your cl UI. The host embeds CPython (it serves the bundle and is where sv runs in-process). Remaining: wiring the sv codespace/walkers onto the embedded interpreter, HMR dev mode, and per-OS packaging/signing - see issue #6436.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jac_desktop-0.2.1.tar.gz (103.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jac_desktop-0.2.1-py3-none-any.whl (279.7 kB view details)

Uploaded Python 3

File details

Details for the file jac_desktop-0.2.1.tar.gz.

File metadata

  • Download URL: jac_desktop-0.2.1.tar.gz
  • Upload date:
  • Size: 103.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for jac_desktop-0.2.1.tar.gz
Algorithm Hash digest
SHA256 441261a92c7a9cc1cdf550d853c0e5c63c0c9967bf6f5091ff62fad9a99e62a0
MD5 1a10839981131862e1e66ca7da5c86dd
BLAKE2b-256 bfd9b50063adbd940f4d1ad9cc351be212bca6679a2f14ef3d14ea58645cea19

See more details on using hashes here.

File details

Details for the file jac_desktop-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: jac_desktop-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 279.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for jac_desktop-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8b8f6c651d6e1f171c9dfccef391c2fef75c2f1966212e96c4c88c6b74e0cc2b
MD5 34cc66e88d4750d30a7eb2aa3f7dd922
BLAKE2b-256 c14bf5aa33138a4b7e8c495beb69fbe84fe8d28128fe009240977ba7263a089c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page