janela 0.10.1 → 0.12.0

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.
package/README.md CHANGED
@@ -2,11 +2,26 @@
2
2
 
3
3
  > *janela* — Portuguese for **window**.
4
4
 
5
- Desktop apps in pure TypeScript, compiled to native. No Rust, no Node, no
6
- Electron. The backend is TypeScript compiled to a native binary by
5
+ Desktop and mobile apps in pure TypeScript, compiled to native. No Rust, no
6
+ Node, no Electron. The backend is TypeScript compiled to a native binary by
7
7
  [scriptc](https://scriptc.dev); the window is the OS webview via
8
- [webview/webview](https://github.com/webview/webview) (WKWebView on macOS,
9
- WebKitGTK on Linux). Binaries come out ~500 KB.
8
+ [webview/webview](https://github.com/webview/webview). Binaries come out
9
+ around 400–500 KB, with no bundled browser and no bundled runtime.
10
+
11
+ Five targets, one runtime — the same `main.ts`, the same typed contract and the
12
+ same frontend build for each:
13
+
14
+ | Platform | Webview | Build | Output |
15
+ |---|---|---|---|
16
+ | macOS | WKWebView | `janela build` | binary + `.app` |
17
+ | Linux | WebKitGTK | `janela build` | binary |
18
+ | Windows | WebView2 | `janela build` | `.exe` (GUI subsystem) |
19
+ | iOS | UIKit + WKWebView | `janela build --target ios` | simulator `.app` |
20
+ | Android | `android.webkit.WebView` | `janela build --target android` | `.apk` |
21
+
22
+ Commands, the typed contract, events, async commands and file I/O behave the
23
+ same on all five. Native file dialogs and runtime window control are
24
+ desktop-only for now; on mobile they report clearly when called.
10
25
 
11
26
  ## Quick start
12
27
 
@@ -31,8 +46,10 @@ framework, `janela dev` runs your Vite dev server and points the window at it,
31
46
  and `janela build` flattens the production bundle into the binary — see
32
47
  [docs/frontend.md](../../docs/frontend.md).
33
48
 
34
- Requirements: Node 18+, a C++ compiler (Xcode CLT on macOS; g++ +
35
- `libwebkit2gtk-4.1-dev` on Linux; see [Windows](#windows) below). A worked
49
+ Requirements: Node 24+ and a C++ toolchain for the platform you are building —
50
+ Xcode CLT on macOS; `g++` + `libwebkit2gtk-4.1-dev` on Linux; an llvm-mingw
51
+ clang on Windows (see [Windows](#windows) below). iOS additionally needs Xcode
52
+ and `zig`; Android needs a JDK, the Android SDK, the NDK and `zig`. A worked
36
53
  example lives in [`examples/demo`](examples/demo) — commands, events, and a
37
54
  file reader.
38
55
 
@@ -552,22 +569,47 @@ janela build --target ios # -> .janela/out-ios/<name>.app (simulator)
552
569
  janela dev --target ios # build, boot a simulator, install, launch
553
570
  ```
554
571
 
555
- It is **not part of a release yet** and is simulator-only. Commands, the typed
572
+ It is **simulator-only** so far device builds and code signing are not
573
+ wired up yet. Commands, the typed
556
574
  contract, events, Vite frontends, async commands (`commandAsync`, `defer`,
557
575
  `sleep`) and file I/O all work the same as on desktop — the shell owns the
558
576
  clock and the file queue on both. File dialogs are not on iOS yet and report
559
577
  clearly when called; window control is a no-op there by nature. See
560
578
  [docs/ios.md](../../docs/ios.md).
561
579
 
580
+ ## Android
581
+
582
+ Same again: same `main.ts`, same contract, same frontend.
583
+
584
+ ```bash
585
+ janela build --target android # -> .janela/out-android/<name>.apk
586
+ janela dev --target android # build, boot an emulator, install, launch, follow logcat
587
+ ```
588
+
589
+ Needs a JDK, the Android SDK, the NDK and zig; there is no Gradle in the build.
590
+ Commands, events, `commandAsync`/`sleep`/`defer` and file I/O all behave as
591
+ they do on desktop and iOS — the shell owns the clock on each. Native dialogs
592
+ are not on Android yet and report clearly when called; `setTitle` sets the
593
+ Activity label and the other window controls are no-ops by nature. See
594
+ [docs/android.md](../../docs/android.md).
595
+
596
+ Unlike every other platform an APK also carries a little Java: the webview
597
+ backend needs a companion class, because `android.webkit.WebView` is a Java API
598
+ whose callbacks native code cannot receive on its own.
599
+
562
600
  ## Status
563
601
 
564
- Early proof of concept, on macOS (arm64), Linux (WebKitGTK) and Windows
565
- (WebView2), with iOS on a branch (above). The design notes and scriptc
566
- findings behind it are in
567
- [docs/findings.md](../../docs/findings.md). Not yet: async commands that run in
568
- parallel (host code is single-threaded; `commandAsync` interleaves instead),
569
- tray icons and menus, multi-window, directory picking on Windows,
570
- `app.center()`, and icons/installers/notarization.
602
+ Young and pre-1.0. Desktop (macOS arm64, Linux/WebKitGTK, Windows/WebView2) is
603
+ the most exercised path; iOS and Android are newer, and iOS is simulator-only.
604
+ The design notes and scriptc findings behind it are in
605
+ [docs/findings.md](../../docs/findings.md), with per-platform notes in
606
+ [docs/ios.md](../../docs/ios.md) and [docs/android.md](../../docs/android.md).
607
+
608
+ Not yet: native dialogs and window control on mobile; device builds and code
609
+ signing; icons, installers and notarization; async commands that run in
610
+ parallel (host code is single-threaded, so `commandAsync` interleaves and a
611
+ CPU-bound handler still needs slicing); an async HTTP client; tray icons and
612
+ menus; multi-window; directory picking on Windows; and `app.center()`.
571
613
 
572
614
  ## Releasing
573
615