Native Linux (GTK3/Cairo) port + CI screenshot tests (x64 + arm64)#5239
Native Linux (GTK3/Cairo) port + CI screenshot tests (x64 + arm64)#5239shai-almog wants to merge 2 commits into
Conversation
…ests Adds a native Linux desktop port, the structural twin of the Windows port: ParparVM "clean" C target with a `linux` app-type, rendering through GTK3/Cairo/Pango/GdkPixbuf, OpenGL ES (EGL) for 3D, GStreamer media/camera, WebKitGTK browser, libsecret/libnotify/GeoClue services, libcurl networking. - ParparVM: @Concrete.linux() selector, `linux` executable CMake target with the GTK link set and .incbin resource embedding. - Ports/LinuxPort: LinuxImplementation + LinuxNative (173 native methods, no stubs) + 15 cn1_linux_*.c native sources. - maven/linux module + LinuxNativeBuilder + CN1BuildMojo local-linux-device. - CI: linux-build-run.yml builds + runs the hellocodenameone screenshot suite on x86_64 and arm64, captured over the cn1ss WebSocket, compared against per-arch baselines (scripts/linux/screenshots[-arm]). - CleanTargetLinuxIntegrationTest drives translate -> native build -> run/capture. - Developer guide chapter: Working-With-Linux.asciidoc. Verified in a Linux container: all native files compile against the real GTK stack; a translated CN1 Form app builds to a native ELF and renders correctly (2D + GLES 3D + bundled icon fonts). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Developer Guide build artifacts are available for download from this workflow run:
Developer Guide quality checks:
|
✅ ByteCodeTranslator Quality ReportTest & Coverage
Benchmark Results
Static Analysis
Generated automatically by the PR CI workflow. |
|
Compared 128 screenshots: 128 matched. Native Android coverage
✅ Native Android screenshot tests passed. Native Android coverage
Benchmark ResultsDetailed Performance Metrics
|
Cloudflare Preview
|
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
|
Compared 125 screenshots: 125 matched. Benchmark ResultsDetailed Performance Metrics
|
|
Compared 125 screenshots: 125 matched. Benchmark ResultsDetailed Performance Metrics
|
… guide chapter CI: the codenameone maven plugin depends on CEF, which has no linux-arm64 build, so the hellocodenameone suite classes only compile on x64. Split the workflow: a prepare-suite job (x64) builds the plugin + suite classes once and shares them; the build-run matrix then builds only core + the Linux port (which build fine on arm64), translates the shared classes and builds/runs the ELF per arch. This unblocks the arm64 screenshot leg. Docs: rewrite the developer guide chapter to be end-user focused -- expand why we link musl (self-contained, glibc-version-independent binary) vs glibc, add a GTK3-vs-GTK4 section (chose 3 for universal reach), frame cross-compiling as a user capability (arm from x64), document the build hints, and drop the internal testing/status notes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Compared 128 screenshots: 128 matched. Benchmark Results
Detailed Performance Metrics
|
|
Compared 128 screenshots: 128 matched. Benchmark Results
Build and Run Timing
Detailed Performance Metrics
|
|
Compared 124 screenshots: 124 matched. Benchmark Results
Build and Run Timing
Detailed Performance Metrics
|
|
Compared 125 screenshots: 125 matched. Benchmark ResultsDetailed Performance Metrics
|
|
Compared 121 screenshots: 121 matched. |
Adds a native Linux desktop port — the structural twin of the native Windows port. The same ParparVM bytecode→C pipeline, here targeting Linux with GTK3 / Cairo / Pango / GdkPixbuf rendering, OpenGL ES (EGL) for 3D, GStreamer media/camera/audio, WebKitGTK browser, libsecret / libnotify / GeoClue services, libcurl networking. Single self-contained ELF (resources
.incbin'd in), musl-linked VM with the GTK stack dynamically linked.What's here
@Concrete.linux()selector; alinuxexecutable CMake target with the GTKpkg-configlink set and.incbinresource embedding.Ports/LinuxPort:LinuxImplementation+LinuxNative(173 native methods, no stubs) + 15cn1_linux_*.cnative sources (window/graphics/text/image/io/net/socket/services/edit/browser/media/peer/gl/print/simd).maven/linuxmodule,LinuxNativeBuilder(zig/musl toolchain),CN1BuildMojolocal-linux-devicedispatch.linux-build-run.yml: builds the framework + thehellocodenameonescreenshot suite, translates + native-builds the ELF, runs it headless under Xvfb, and captures the suite over the cn1ss WebSocket on both x86_64 (ubuntu-latest) and arm64 (ubuntu-24.04-arm) — the same two-arch coverage as the Windows port.CleanTargetLinuxIntegrationTestdrives translate → native build → run/capture.docs/developer-guide/Working-With-Linux.asciidoc.Verification done locally (Linux container)
-Werror=implicit-function-declaration -Werror=int-conversion).Formapp translates with thelinuxapp-type, native-builds to a 12 MB ELF (810 translated C files + the native layer), runs headless and renders correctly — 2D (Cairo/Pango/GdkPixbuf), GLES 3D (offscreen triangle), and the bundled material icon font (FontConfig/FreeType).Purpose of this PR
Run the CI so we can see the hellocodenameone screenshots rendered on Linux for x64 and arm64. The baseline dirs (
scripts/linux/screenshots,scripts/linux/screenshots-arm) start empty — thecompare-commentjob is report-only and posts the rendered screenshots to the PR; baselines get seeded from the first green run (see the READMEs in those dirs).🤖 Generated with Claude Code