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

Support for Foreign Function Interface (FFI) #157

Open
SnorlaxAssist opened this issue Feb 24, 2024 · 4 comments
Open

Support for Foreign Function Interface (FFI) #157

SnorlaxAssist opened this issue Feb 24, 2024 · 4 comments
Labels
enhancement New feature or request external Issue depends on external factors pending / needs design Awaiting design and/or implementation discussion and decisions

Comments

@SnorlaxAssist
Copy link
Contributor

A more powerful way to access libraries to make lune more extensible. Similar to node-ffi.

  1. Allow Lune to directly call functions defined in libraries. This will enable more complex and high-performance features.
  2. Security should be considered heavily on this solely because execution could be unknown, something like prompting the end user once to allow libraries being used in running scripts via lune run.
  3. Some Use Cases
    • High-performance computing tasks within Lune.
    • Accessing system-level or third-party services.
    • Communicating with the GPU in Lune.
    • And more.
@filiptibell filiptibell added enhancement New feature or request external Issue depends on external factors pending / needs design Awaiting design and/or implementation discussion and decisions labels Feb 24, 2024
@CompeyDev
Copy link
Contributor

This would be great to have as an alternative, considering the ETA for native modules is currently unknown. +1.

@filiptibell filiptibell mentioned this issue May 9, 2024
@nickk431
Copy link

Very interested in this. Any updates?

@CompeyDev
Copy link
Contributor

None. We're dependent on mlua upstream to implement native module supports for all platforms, and hopefully make it safe.

I've tried implementing them by hand, but the problem ends up being we have to practically create #[repr(C)] wrappers around all mlua structs.

@amol234545
Copy link

There is a draft pr for FFI: #243

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request external Issue depends on external factors pending / needs design Awaiting design and/or implementation discussion and decisions
Projects
None yet
Development

No branches or pull requests

5 participants