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
desktopbuild target registered withjac-client's target registry, sojac build --client desktopandjac start --client desktopwork once this package is installed. - The build pipeline:
- builds your
clcodespace with the standard Vite pipeline (viaWebTarget), - 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), - produces a single self-contained binary under
.jac/client/desktop/.
- builds your
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c809c7204419014dd67d38608bf8745ddd7348978169863725987399cc5a3b64
|
|
| MD5 |
af16a39e25251f4bc970836c185b321a
|
|
| BLAKE2b-256 |
864238f10fb0216c04682a823d161f12d3d9cb1b1cca4ffbaea557d091df3a38
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55f2070ac24bfb71e514db0d15b4f6672e9619d6e4f176b55f6d698d84f3dee0
|
|
| MD5 |
06939e8a4bd1a6b0e3e30d5a41531739
|
|
| BLAKE2b-256 |
18392b3fdfc622829c8d2ecd2758a62b25edb0ddaefdb828b05fdb87599f4fc4
|