Skip to content

Support mixed top-level f32 native signatures #1029

Closed

Description

@frostney

Summary

Allow bound native functions to mix top-level f32 arguments with integer, pointer, aggregate, and other top-level argument types.

Why

C ABI types are exact: replacing a C float with f64 changes the signature and is not a valid workaround. The raylib 6.0 binding generator currently skips 109 functions for this reason, leaving 488 callable functions and a post-fix target of 597. See the merged skip report.

Current behavior

On current main (34cc32f):

const lib = FFI.open("./fixtures/ffi/libfixture" + FFI.suffix);
lib.bind("get_answer", {
  args: ["i32", "f32"],
  returns: "i32",
});

Binding throws:

f32 arguments cannot be mixed with other types. Use f64 instead, or keep all arguments f32

Current-source evidence:

The fresh-main FFI suite passes in interpreted and bytecode modes (92 tests, 337 assertions), confirming this is the current documented contract rather than stale release behavior.

Expected behavior

A signature such as ["i32", "f32"] should bind and invoke with the platform's native ABI classification. Add native-fixture coverage for mixed f32 positions and representative integer, pointer, and aggregate neighbors in both execution modes.

Scope notes

Activity

  1. added
    new featureNew feature or request
    runtimeTGocciaRuntime: optional host extensions (console, fetch, JSON5, FFI, test assertions, etc.)
    on Jul 24, 2026
  2. added this to the 0.11.0 milestone on Jul 24, 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

    new featureNew feature or requestruntimeTGocciaRuntime: optional host extensions (console, fetch, JSON5, FFI, test assertions, etc.)

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions