Skip to content

feat: user predicates and aggregates (#180) - #16

Merged
adityamukho merged 1 commit into
v3from
feat/180-udf-ffi
Oct 25, 2026
Merged

adityamukho merged 1 commit into
v3from
feat/180-udf-ffi

Conversation

@adityamukho

Copy link
Copy Markdown
Contributor

UDF registration for Android, project-minigraf/minigraf#180 PR 5 (plan steps 17–20).

  • src/lib.rs: minigraf-binding-template#9's code, applied unchanged (this lib.rs was identical to the Java binding's before its #180 PR): MiniGrafUdfException (+ From<UnexpectedUniFFICallbackError>), the MiniGrafPredicate / MiniGrafAggregate / MiniGrafAccumulator with_foreign traits, registerPredicate / registerAggregate over try_register_*, handle locks that only clone the Minigraf, and the template's Rust tests (44 pass).
  • Core pin 7c8c5540 → 02243f16 (v3, #180 PR 1 + BrowserDb). #181 and #316 were already in this branch; #306 needs nothing here.
  • Consumer contract (consumer-test/tests/contract.kt, on the emulator): adult? predicate, product aggregate (360), a throwing step → MiniGrafException.Query with [QRY-014] and the exception's message.
  • README: "User functions" (Kotlin example, failures, lifecycle, threading incl. main-thread note, cost, re-entry).

The generated Kotlin was checked for the names used (MiniGrafPredicate.test, MiniGrafAccumulator.step/finish, MiniGrafUdfException.Failed, registerPredicate/registerAggregate).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Urda7FD9CYYoxdeGGJa11x

Copies minigraf-binding-template#9: MiniGrafUdfError, the
MiniGrafPredicate / MiniGrafAggregate / MiniGrafAccumulator foreign
traits, MiniGrafDb.registerPredicate / registerAggregate over the core's
try_register_*, and handle locks that only clone the Minigraf. A throwing
callback fails the query with QRY-014.

Pins core v3 at 02243f16. The consumer contract gains a predicate, an
aggregate and a throwing step (QRY-014); README gains "User functions".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Urda7FD9CYYoxdeGGJa11x
@adityamukho
adityamukho merged commit 110a9dc into v3 Oct 25, 2026
5 checks passed
@adityamukho
adityamukho deleted the feat/180-udf-ffi branch October 25, 2026 06:55
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