Skip to content

perf(android): bridge boxed unsigned values directly through JNI - #1997

Merged
mrousavy merged 1 commit into
mrousavy/v1-kotlin-variant-casesfrom
mrousavy/v1-kotlin-ulongarray
Nov 2, 2026
Merged

mrousavy merged 1 commit into
mrousavy/v1-kotlin-variant-casesfrom
mrousavy/v1-kotlin-ulongarray

Conversation

@mrousavy

@mrousavy mrousavy commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Bridge boxed unsigned values directly as Kotlin ULong, including Array<ULong>, nullable values, maps, and Promise results. Arrays keep their existing public type and need no Kotlin mapping pass or experimental opt-in.

JNI uses the real ULong constructor and unbox-impl, protected by narrow consumer rules. Generated JNI entry points have explicit JVM names where Kotlin value classes would mangle them. The unsigned regression cases from #1999 and #2008 are preserved here.

Second in the stack: #2017 → #1997 → #2009.

Validated Kotlin compilation, Nitrogen output, generated Android JNI compilation, and minified Android runtime roundtrips for unsigned boundaries, arrays, nested nullable arrays, maps, and generic result boxes. Removing the consumer rule reproduces a missing-method failure.

@vercel

vercel Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nitro-docs Ready Ready Preview Oct 28, 2026 11:23am UTC

Request Review

@mrousavy
mrousavy force-pushed the mrousavy/v1-kotlin-ulongarray branch from 1d923a0 to be615e2 Compare October 28, 2026 11:22
@mrousavy
mrousavy removed this pull request from stack #2000 October 28, 2026 11:22
@mrousavy
mrousavy changed the base branch from v1 to mrousavy/v1-kotlin-variant-cases October 28, 2026 11:24
@mrousavy
mrousavy added this pull request to stack #2018 October 28, 2026 11:24
@mrousavy mrousavy changed the title perf(android): bridge UInt64 arrays as ULongArray perf(android): bridge boxed unsigned values directly through JNI Oct 28, 2026
@mrousavy
mrousavy merged commit 3a5b5f8 into v1 Nov 2, 2026
21 of 24 checks passed

This branch was successfully deployed

1 active deployment
Preview — be615e2a Deployed Oct 28, 2026 by vercel[bot]
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