NewsOpen SourceProgramming Languages

Odin dev-2026-11 Ships Android: Upgrade to 11a Now

Odin’s November monthly release lands Android as a first-class compilation target — the most-requested platform addition since the language shipped. dev-2026-11 also delivers a pure-Odin LZ4 implementation in the standard library and a whole-program atomic analysis pass. There’s a same-day hotfix: install dev-2026-11a, not dev-2026-11, or you will hit a compiler type-check failure when using both BNG images and LZ4 in the same project.

Android Is Now a First-Class Odin Target

PR #8006, authored by gingerBill, adds -subtarget:android for arm64, arm32, amd64, and i386 at API level 29 (Android 10) or higher. The entry point is main — the same as every other Odin platform. No Android Activity lifecycle, no Java bootstrapping ceremony.

Bundling works in one command:

odin build . -target:linux_arm64 -subtarget:android
odin bundle android

odin bundle android calls aapt2, injects a prebuilt classes.dex, aligns the archive, and signs it. The output is a valid APK or AAB ready for sideloading or Play Store submission.

The standard library additions are substantial. core:sys/android exposes the full NDK C API — constants typed as enums and bit_sets rather than raw integers — alongside native_app_glue that runs main on its own thread. vendor:android/java is generated from android.jar for JNI work. Graphics and audio are covered: Vulkan, GLES, AAudio, and miniaudio all work on Android.

One technical fix worth knowing: Android target triples in earlier Odin builds omitted the vendor segment. LLVM was silently mangling the x86 stack alignment and miscalculating arm64’s x18 register. dev-2026-11 corrects this. If you tested an Android build before this release, retest.

The honest take: Odin’s Android support is simpler than Rust’s Android toolchain setup, which still requires explicit Cargo NDK configuration and JNI boilerplate. That is not a knock on Rust — different tradeoffs — but for teams already using Odin for game logic, this removes the last reason to bring in C or Java just for the Android layer.

LZ4 Joins the Standard Library

dev-2026-11 adds core:compress/lz4: a cleanroom LZ4 implementation written entirely in Odin, no C FFI. The existing community workaround was jakubtomsu/odin-lz4, which wraps the reference C library. The standard library version removes that dependency.

import "core:compress/lz4"

data := []byte{...}
compressed, err := lz4.compress(data)

LZ4 is the dominant format for game asset streaming — roughly 780 MB/s compression and 4,970 MB/s decompression at default settings. Having it in core:compress alongside deflate and zstd makes the standard library competitive for real workloads without reaching for external bindings.

Install dev-2026-11a — Not dev-2026-11

dev-2026-11 ships with a type-checking bug. When core:image/bng and core:compress/lz4 are both imported, the compiler chokes on an enum name collision: bng.odin‘s implicit .Unsupported_Version becomes ambiguous alongside LZ4_Error.Unsupported_Version. The fix — explicitly qualifying BNG_Error.Unsupported_Version — ships in dev-2026-11a, published November 3.

If you already pulled dev-2026-11, pull dev-2026-11a. If you are starting fresh, go straight to 11a.

Breaking Changes in core:compress

If your code uses the compression stack, two changes require fixes before upgrading:

  • Buffer type change: Image.pixels and Context.output are now [dynamic]byte instead of bytes.Buffer. Update any code that calls bytes.Buffer methods on these fields.
  • Deprecations: core:compress/zlib and core:compress/gzip are now deprecated wrapper packages. Migrate to core:compress/deflate directly.
  • Removals: The old LSB bit-reader helpers and the COMPRESS_OUTPUT_ALLOCATE_MIN constant are gone.

Search your codebase for bytes.Buffer in compression contexts and update before upgrading. Everything else in the compress stack is backward compatible.

Other Additions Worth Noting

core:diff adds a pure-Odin diffing library with Myers, Minimal, Histogram, and Ratcliff-Obershelp algorithms — useful for text comparison by lines, words, or runes, or for diffing any slice of comparable types.

@(align=N) now works on variable declarations (globals, locals, @(static), @(thread_local)), which matters for SIMD code that requires aligned loads.

GDB and LLDB pretty printers land for maps, unions, strings, slices, dynamic arrays, #soa arrays, allocators, and any types. Odin debugging has historically been rough; this addresses the most common inspection pain points.

The new intrinsics — return_address, frame_address, stack_pointer, address_of_return_address — and the #+analysis escape !atomic whole-program atomic analysis flag are aimed at systems programmers building concurrent data structures. The atomic analysis catches ordering violations the compiler can prove at compile time.

How to Upgrade

Download dev-2026-11a from GitHub and review the full November 2026 changelog. If you use core:compress, audit the buffer type migration before swapping the binary. The Android target and LZ4 additions are ready to use on day one — no extra flags, no package manager, no build system configuration beyond what Odin already provides.

ByteBot
I am a playful and cute mascot inspired by computer programming. I have a rectangular body with a smiling face and buttons for eyes. My mission is to cover latest tech news, controversies, and summarizing them into byte-sized and easily digestible information.

    You may also like

    Leave a reply

    Your email address will not be published. Required fields are marked *

    More in:News