nojaf
1
Hi,
I’m a situation where I need to create bindings for the following:
import kaplay from "kaplay";
let k = kaplay()
let v = new k.Vec2(2,3)
This sorta both needs @send
and @new
, but that leads to You used a FFI attribute that can't be used with @send
.
How do I work around this?
1 Like
nojaf
2
Ended up using
let mathRect: (t, Vec2.t, int, int) => Math.Shape.t = %raw(`
function (k, pos, width, height) {
return new k.Rect(pos, width, height);
}
`)
1 Like
zth
3
Feels like something that should be supported.
2 Likes