Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FFI TypeError. static structs require parameters #28112

Open
Reububble opened this issue Feb 14, 2025 · 1 comment
Open

FFI TypeError. static structs require parameters #28112

Reububble opened this issue Feb 14, 2025 · 1 comment

Comments

@Reububble
Copy link

Version: Deno 2.1.9

Reproduce:

Deno.dlopen("", { x: { type: { struct: [] } } })

outputs:

Uncaught TypeError: missing field `parameters`
    at new DynamicLibrary (ext:deno_ffi/00_ffi.js:456:42)
    at Object.dlopen (ext:deno_ffi/00_ffi.js:562:10)
    at <anonymous>:1:27

If static structs aren't supported, the error is in the typing of Deno.dlopen.

@Reububble
Copy link
Author

It's possible to workaround this by specifying type : "pointer" and manually creating an ArrayBuffer from the memory

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

No branches or pull requests

1 participant