You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Hvm added dylib support in HigherOrderCO/HVM#394, but it was never added to Bend.
Describe the solution you'd like
Expose the dylib functions dl_open, dl_call, dl_close with a user friendly interface, like we did for files.
# 'path' is the path to the dl file.
# 'lazy' is a boolean encoded as a u24 that determines if all functions are loaded lazily or upfront.
# Returns an unique id to the dl object encoded as a u24
IO/DyLib/open : (path: String) -> (lazy: u24) -> u24
# Calls a function of a previously opened dylib.
# 'dl' is the id of the dl object
# 'fn' is the name of the function in the dylib
# 'args' are the arguments to the function. The expected values depend on the called function.
# The returned value is determined by the called function.
IO/DyLib/call : (dl: u24) -> (fn: String) -> (args: Any) -> Any
# Closes a previously open dylib.
# 'dl' is the id of the dylib.
# Returns nothing.
IO/DyLib/close : (dl: u24) -> None
We should also include some documentation with an example program to be compiled as a dll an loaded into bend.
The text was updated successfully, but these errors were encountered:
developedby
changed the title
Add IO for loading and calling dynamicly linked libraries
Add IO for loading and calling dynamically linked libraries
Jul 18, 2024
Is your feature request related to a problem? Please describe.
Hvm added dylib support in HigherOrderCO/HVM#394, but it was never added to Bend.
Describe the solution you'd like
Expose the dylib functions dl_open, dl_call, dl_close with a user friendly interface, like we did for files.
We should also include some documentation with an example program to be compiled as a dll an loaded into bend.
The text was updated successfully, but these errors were encountered: