Skip to content

DX7: Java, .NET, C++, mobile (Swift and Dart), and the tier-3 kit #18

Description

@tamnd

Lands with M8. The last of the tier-1 set, plus the tier-2, mobile and tier-3 machinery.

Scope

  • yo-java, Java 25 LTS with FFM, Arena.ofConfined(), Linker.Option.critical(true) chosen per function from api.model.json
  • --enable-native-access detected at Db.open with a message that says exactly what to add to the command line
  • A JNI provider for Java 17 and 21 as a second artifact, with its numbers published even though they are worse
  • yo-dotnet, net10.0, [LibraryImport], SuppressGCTransition, NativeAOT
  • yo.hpp, header-only over the C ABI, YO_SHAPE and &User::score
  • yo-kit: the generator, 7 emitted items, 10 named templates
  • The agent conformance suite, roughly 40 tasks, published including the failures
  • The full 2300-case conformance corpus green in all six tier-1 languages

Mobile, tier 2

Swift and Dart were tier-3 templates. dx/14-swift.md and dx/15-dart.md promote them to tier 2 on one argument: mobile is the only place where "no server" is a constraint rather than a preference, so an embedded typed database fits a phone better than it fits a server — and a template maintained by nobody is not a mobile story, it is a checkbox. Tier 2 and not tier 1 because the API may lag one minor, which is what keeps the release-train barrier affordable when Apple or Flutter ships in a release week.

Swift (tamnd/yo-swift)

  • SwiftPM package: CYo system/binary target, Yodb idiom layer, YodbMacros
  • libyo.xcframework as a .binaryTarget with a SHA-256 SwiftPM verifies itself
  • Key paths are the typed surface. \.score is a KeyPath<User, Double>; order(by:) and the comparison operators are checked by the compiler with no macro, no string, no generated constant. The strongest realisation of P3 in the tree
  • @Document / @Value / @ID / @Index macros, emitting only what a key path cannot: the canonical shape description and the field-index map
  • swift-macro-testing snapshots for every expansion and every diagnostic, with fix-its. Swift's trybuild
  • Typed throws: throws(YoError), Code generated and deliberately not @frozen
  • Sendability stated per type; Transaction is ~Copyable so consuming func commit() makes use-after-commit a compile error
  • Span/RawSpan for the borrowed view — the reason the floor is Swift 6.2
  • Async only where the cost class admits unbounded work, on a dedicated TaskExecutor, never blanket-async
  • Swift 6 language mode only, -strict-concurrency=complete, warnings as errors

iOS, and it is the point

  • File protection set to completeUntilFirstUserAuthentication at creation. NSFileProtectionComplete + mmap is a SIGBUS, not an error, so protection: .complete disables mmap instead of crashing
  • Checkpoint on background inside a beginBackgroundTask window; release cache on memory warning; opt-out, not opt-in
  • PrivacyInfo.xcprivacy declaring FileTimestamp (C617.1) and DiskSpace (E174.1). A wrong manifest is an App Store rejection for the user's app caused by our package. CI diffs it against a symbol scan
  • Static linking only; no JIT anywhere, asserted at build time
  • Size budget as a hard gate: <= 1.6 MB KV+docs, <= 3.2 MB default, per thinned arm64 slice

Dart / Flutter (tamnd/yo-dart)

  • FFI plugin covering iOS, Android, macOS, Windows, Linux, plus Dart standalone
  • Binaries vendored, not downloaded at build time. ~30 MB package, accepted under P9. A post-install download is the top reason a Flutter native plugin fails in CI or behind a proxy
  • build_runner + source_gen shapes. Dart has no macros — the proposal was cancelled — so the shape is a part file and the spec says so instead of claiming parity
  • yodb_lint custom-lint so an un-generated @YoDocument gets one sentence naming the command, not an analyzer riddle
  • @Native(isLeaf: true) on every O(1) function, marked from the cost class in api.model.json. ~10 ns overhead is what makes a synchronous get on the UI isolate defensible
  • One long-lived worker isolate per Db, not Isolate.run per query. Scans never touch the root isolate, and that is not configurable
  • sealed class YoException for exhaustive switch; NativeFinalizer + Yo.use closure + a debug leak detector, because Dart has no scoping construct
  • Android: API 24, arm64-v8a and x86_64 only. armeabi-v7a dropped — a 32-bit address space caps a mapped .yo file, and silent failure past a size is worse than absence
  • 16 KB page alignment and extractNativeLibs=false, CI-checked: a misaligned .so is a Play Console rejection for the user's app
  • Web via the wasm build, conditional export, labelled tier 3 on every web-only member
  • Flutter frame-budget test: 60 fps over a 100,000-row scan, as a release gate

Shared

  • Static libs for aarch64-apple-ios, -ios-sim, x86_64-apple-ios, aarch64-linux-android, x86_64-linux-android in the release matrix
  • Corpus per PR on desktop, per merge on the simulator and emulator, weekly on physical devices
  • dx/01 snippet budgets: Swift 14 lines, Dart 16
  • Predictions registered under Y26: Swift 200 ns, Dart 250 ns

On publishing failures

The agent suite publishes tasks agents get wrong. That is the point of it. A suite that only shows successes measures nothing, and the failures are the list of things to fix in the next release.

Exit

Six-language interop green across all 30 ordered pairs, and a .yo file written in Rust read correctly from Swift and from Dart. Mobile size budgets and the Flutter frame-budget test pass. The agent suite baseline is published, failures included.

Reference: dx/08-jvm-and-dotnet.md, dx/09-c-and-tier3.md, dx/10-agent-dx.md section 6, dx/14-swift.md, dx/15-dart.md.

Activity

  1. added this to the M8 Full compatibility milestone on Aug 25, 2026
  2. added
    milestoneMilestone tracking issue
    conformanceConformance corpus and scoreboards
    dxDeveloper experience: SDKs, install, ergonomics
    agentMCP server, llms.txt, machine-readable surfaces
    jvmJava, Kotlin and Scala SDKs
    cC and C++ developer kit
    on Aug 25, 2026
  3. changed the title [-]DX7: Java, .NET, C++, and the tier-3 kit[/-] [+]DX7: Java, .NET, C++, mobile (Swift and Dart), and the tier-3 kit[/+] on Aug 28, 2026
  4. added
    swiftSwift SDK and the iOS story
    dartDart and Flutter SDK, and Android
    mobileiOS and Android targets, artifacts and budgets
    on Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentMCP server, llms.txt, machine-readable surfacescC and C++ developer kitconformanceConformance corpus and scoreboardsdartDart and Flutter SDK, and Androiddotnet.NET SDKdxDeveloper experience: SDKs, install, ergonomicsjvmJava, Kotlin and Scala SDKsmilestoneMilestone tracking issuemobileiOS and Android targets, artifacts and budgetsswiftSwift SDK and the iOS story

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions