Skip to content

unsupported callback argument type: struct #41

@pekim

Description

@pekim

I'm attempting to use a callback with struct arguments, and I've hit this.

panic("ffi: unsupported callback argument type: " + argType.Kind().String())

  • GOOS=linux
  • GOARCH=amd64
  • github.com/go-webgpu/goffi @ 6330e63

For reference it's clang_visitChildren where I'm running it to this.

Would it be possible to add support for struct arguments? Or are there architectural constraints that prohibit it?

It looks like the callback's argument types are determined through reflection. So I guess that there would not be a need to provide the shape of the structs with *types.TypeDescriptor as the struct size would be available through reflection?

Incidentally, I didn't spot anything in either the README.md or docs/ARCHITECTURE.md that mentioned what argument types are supported for callbacks. So I'm not sure whether this limitation is intentional or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions