Skip to content

Modernize bindings for Mojo 1.2 - #21

Merged
MoSafi2 merged 1 commit into
mainfrom
codex/mojo-1.2-modernization
Oct 31, 2026
Merged

MoSafi2 merged 1 commit into
mainfrom
codex/mojo-1.2-modernization

Conversation

@MoSafi2

@MoSafi2 MoSafi2 commented Oct 31, 2026

Copy link
Copy Markdown
Owner

Generated bindings still used Mojo 1.0 APIs and failed to compile under 1.2 for atomics. Require Mojo 1.2+ and lock development to 1.2.0, with current atomic, char, endian, and pointer APIs.

  • Replace generated raw symbol casts with public, owner-borrowing dynamic FFI callables while preserving non-raising free functions and globals helpers.
  • Add checked direct-call C varargs with fixed-prefix validation and explicit tail promotions.
  • Keep target facts in CIR and expose shared analysis queries instead of storing target fields in passes.
  • Finalize return eligibility and movement policies during analysis, modernize the worked examples, and add a separate runtime CI job.

Validation:

  • pixi run check-light passed, including the commit hook.
  • pixi run test: 338 passed, 8 existing skips.
  • pixi run build: sdist and wheel built.
  • All four examples passed warning-as-error compilation and runtime checks; Cairo used temporary Pixi development dependencies.

Native runtime validation covers Linux x86-64. ARM/Linux and Apple char mapping have Clang target tests, not native variadic ABI acceptance. Dynamic varargs remain explicit stubs, and the private _Global dependency remains isolated in the process-lifetime cache adapter.

@MoSafi2
MoSafi2 merged commit f516960 into main Oct 31, 2026
0 of 2 checks passed
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