Skip to content

Bindings fail to build with Go 1.24 #66

@rdmitr

Description

@rdmitr

The generated bindings implement interface methods on C type aliases, which is disallowed in Go since 1.24.

E.g. the following generated code fails to build:

type RustBuffer = C.RustBuffer

// ...

func (cb RustBuffer) Capacity() int {
	return int(cb.capacity)
}

With errors similar to this:

bindings.go:36:10: cannot define new methods on non-local type RustBuffer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions