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.0.tar.gz (91.3 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.0-py3-none-any.whl (246.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jac_desktop-0.2.0.tar.gz
  • Upload date:
  • Size: 91.3 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.0.tar.gz
Algorithm Hash digest
SHA256 c809c7204419014dd67d38608bf8745ddd7348978169863725987399cc5a3b64
MD5 af16a39e25251f4bc970836c185b321a
BLAKE2b-256 864238f10fb0216c04682a823d161f12d3d9cb1b1cca4ffbaea557d091df3a38

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jac_desktop-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 246.4 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 55f2070ac24bfb71e514db0d15b4f6672e9619d6e4f176b55f6d698d84f3dee0
MD5 06939e8a4bd1a6b0e3e30d5a41531739
BLAKE2b-256 18392b3fdfc622829c8d2ecd2758a62b25edb0ddaefdb828b05fdb87599f4fc4

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