Skip to content

cn1-app-kit: a cn1lib of the code the full-stack samples share - #6152

Merged
shai-almog merged 5 commits into
masterfrom
cn1-app-kit
Nov 2, 2026
Merged

shai-almog merged 5 commits into
masterfrom
cn1-app-kit

Conversation

@shai-almog

Copy link
Copy Markdown
Collaborator

Adds maven/cn1-app-kit, a cn1lib with a client half and a server half (the backend-library format from #6139), built in the framework reactor and released with it at the framework's version.

  • Client (com.codename1.appkit): Net (generated-client call to ok/failed callbacks), Skeleton, Chart/Meter.
  • Server (com.codename1.appkit.server): Caller, Text, Grants, AccountSecurity, and the push senders (cloud, console, recording, misconfigured).
  • Nothing in the server half is a bean: a consuming server wires only what it declares.
  • release.yml confirms all three artifacts (-common, -backend, -lib) on R2; pr.yml runs SpotBugs over both halves.
  • Developer guide: "The app kit" under backend libraries.

The samples are deliberately not migrated here; they move onto the kit after a release carries it.

🤖 Generated with Claude Code

shai-almog and others added 3 commits November 1, 2026 18:05
A cn1lib with a server half, built in the framework reactor and released
with it at the framework's version: Net, Skeleton and Chart on the
client; Caller, Text, Grants, AccountSecurity and the push senders on the
server. The samples are not moved onto it here; that follows once a
release carries it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Grants was a component, so every server depending on the kit got it wired
and needed an authorization server. It is now built from a @bean method
like AccountSecurity's pieces. A null issuer no longer throws in
tokenDecoder, the issuer requirement for production is documented, and
the lib pom says what adding CSS or natives would need.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Cloudflare Preview

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Developer Guide build artifacts are available for download from this workflow run:

Developer Guide quality checks:

  • AsciiDoc linter: No issues found (report)
  • Vale: No alerts found (report)
  • Paragraph capitalization: No paragraph capitalization issues (report)
  • LanguageTool: No grammar matches (report)
  • Image references: No unused images detected (report)

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

✅ Continuous Quality Report

Test & Coverage

Static Analysis

  • SpotBugs [Report archive]
    • ✅ ByteCodeTranslator: 0 findings (no issues)
    • ✅ android: 0 findings (no issues)
    • ✅ android-compat: 0 findings (no issues)
    • ✅ android-res-compiler: 0 findings (no issues)
    • ✅ backend: 0 findings (no issues)
    • ✅ backend-test: 0 findings (no issues)
    • ✅ build-engine: 0 findings (no issues)
    • ✅ build-hint-catalog: 0 findings (no issues)
    • ✅ build-hint-tools: 0 findings (no issues)
    • ✅ codenameone-gradle-plugin: 0 findings (no issues)
    • ✅ codenameone-maven-plugin: 0 findings (no issues)
    • ✅ compose-compat: 0 findings (no issues)
    • ✅ core-unittests: 0 findings (no issues)
    • ✅ desktop-compat-runtime: 0 findings (no issues)
    • ✅ fxml-compiler: 0 findings (no issues)
    • ✅ ios: 0 findings (no issues)
    • ✅ javac: 0 findings (no issues)
    • ✅ javafx-compat: 0 findings (no issues)
    • ✅ project-model: 0 findings (no issues)
    • ✅ swing-compat: 0 findings (no issues)
  • ✅ PMD: 0 findings (no issues) [Report archive]
  • ✅ Checkstyle: 0 findings (no issues) [Report archive]

Generated automatically by the PR CI workflow.

@shai-almog

shai-almog commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 231 screenshots: 231 matched.
✅ JavaScript-port screenshot tests passed.

@shai-almog

shai-almog commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 195 screenshots: 195 matched.

Native Android coverage

  • 📊 Line coverage: 19.19% (56041/292047 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 18.15% (270035/1488151), branch 12.41% (19639/158314), complexity 10.37% (15816/152567), method 15.72% (11380/72383), class 27.89% (2236/8017)
    • Lowest covered classes
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2396 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.ClassReader – 0.00% (0/1524 lines covered)
      • androidx.compose.runtime.androidx.compose.runtime.LinkComposer – 0.00% (0/1430 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.MethodWriter – 0.00% (0/922 lines covered)
      • kotlinx.coroutines.channels.kotlinx.coroutines.channels.BufferedChannel – 0.00% (0/863 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/744 lines covered)
      • com.google.common.cache.com.google.common.cache.LocalCache$Segment – 0.00% (0/726 lines covered)
      • okio.okio.Buffer – 0.00% (0/687 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/630 lines covered)
      • com.codename1.androidcompat.rt.com.codename1.androidcompat.rt.TextXmlPullParser – 0.00% (0/623 lines covered)

✅ Native Android screenshot tests passed.

Native Android coverage

  • 📊 Line coverage: 19.19% (56041/292047 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 18.15% (270035/1488151), branch 12.41% (19639/158314), complexity 10.37% (15816/152567), method 15.72% (11380/72383), class 27.89% (2236/8017)
    • Lowest covered classes
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2396 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.ClassReader – 0.00% (0/1524 lines covered)
      • androidx.compose.runtime.androidx.compose.runtime.LinkComposer – 0.00% (0/1430 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.MethodWriter – 0.00% (0/922 lines covered)
      • kotlinx.coroutines.channels.kotlinx.coroutines.channels.BufferedChannel – 0.00% (0/863 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/744 lines covered)
      • com.google.common.cache.com.google.common.cache.LocalCache$Segment – 0.00% (0/726 lines covered)
      • okio.okio.Buffer – 0.00% (0/687 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/630 lines covered)
      • com.codename1.androidcompat.rt.com.codename1.androidcompat.rt.TextXmlPullParser – 0.00% (0/623 lines covered)

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend scalar fallback (no native SIMD)
SIMD int-add (64K x300) java 257ms / native 110ms = 2.3x speedup
SIMD float-mul (64K x300) java 163ms / native 99ms = 1.6x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 96.000 ms
Base64 CN1 decode 83.000 ms
Base64 native encode 401.000 ms
Base64 encode ratio (CN1/native) 0.239x (76.1% faster)
Base64 native decode 265.000 ms
Base64 decode ratio (CN1/native) 0.313x (68.7% faster)
Image encode benchmark status skipped (SIMD unsupported)

@shai-almog

shai-almog commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 196 screenshots: 196 matched.
✅ Native Mac screenshot tests passed.

Benchmark Results

  • VM Translation Time: 0 seconds
  • Compilation Time: 606 seconds

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 59ms / native 7ms = 8.4x speedup
SIMD float-mul (64K x300) java 60ms / native 5ms = 12.0x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 native bridge unavailable (CN1 + SIMD + image benchmarks only)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path active (NEON-accelerated)
Base64 CN1 encode 44.000 ms
Base64 CN1 decode 50.000 ms
Image encode benchmark iterations 100
Image createMask (SIMD off) 6.000 ms
Image createMask (SIMD on) 2.000 ms
Image createMask ratio (SIMD on/off) 0.333x (66.7% faster)
Image applyMask (SIMD off) 41.000 ms
Image applyMask (SIMD on) 46.000 ms
Image applyMask ratio (SIMD on/off) 1.122x (12.2% slower)
Image modifyAlpha (SIMD off) 53.000 ms
Image modifyAlpha (SIMD on) 48.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.906x (9.4% faster)
Image modifyAlpha removeColor (SIMD off) 46.000 ms
Image modifyAlpha removeColor (SIMD on) 33.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.717x (28.3% faster)

ParparVM vs HotSpot (JDK 25): macOS arm64

Runner CPU: Apple M1 (Virtual) (baseline macos-arm64)

Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 20% (time) / 25% (RAM) above its baseline in vm/selfhost/perf-baseline/ is a regression and fails; one that far below is an improvement, reported but not failed (a row whose calibration runs were noisier carries a wider tolerance), and for RAM the change must also exceed 0.05x in absolute terms. Both run unpinned on all of the runner's CPUs, with their own default thread counts.

Benchmark Cores Time RAM Status
hello (HelloCodenameOne) 3 0.76x (base 0.96x, -20.6%) 0.84x (base 0.93x, -9.5%) ok
translator (self) 3 0.65x (base 0.62x, +4.6%) 0.74x (base 0.78x, -4.7%) ok
intArithmetic 3 1.06x (base 1.03x, +2.1%) 0.12x (base 0.12x, +1.3%) ok
longArithmetic 3 0.97x (base 1.03x, -5.7%) 0.12x (base 0.07x, +67.5%) ok
mathTranscendental 3 0.99x (base 1.01x, -1.2%) 0.12x (base 0.12x, +0.6%) ok
arraySequential 3 0.45x (base 0.42x, +6.3%) 0.53x (base 0.53x, +0.2%) ok
arrayRandom 3 1.00x (base 0.99x, +1.0%) 0.32x (base 0.32x, +0.2%) ok
objectAllocation 3 0.96x (base 1.11x, -12.8%) 0.62x (base 0.72x, -13.7%) ok
valueEscape 3 0.51x (base 0.51x, +0.2%) 0.08x (base 0.09x, -7.4%) ok
hashMapChurn 3 1.02x (base 1.18x, -13.6%) 0.07x (base 0.07x, -0.3%) ok
stringBuilding 3 0.93x (base 0.84x, +10.7%) 0.46x (base 0.46x, -0.5%) ok
recursion 3 1.23x (base 1.24x, -0.3%) 0.12x (base 0.12x, -1.6%) ok
quicksort 3 1.00x (base 1.01x, -1.4%) 0.11x (base 0.11x, +0.6%) ok

Result: no regression

@shai-almog
shai-almog merged commit dfb8827 into master Nov 2, 2026
40 of 42 checks passed
@shai-almog
shai-almog deleted the cn1-app-kit branch November 2, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant