-
Notifications
You must be signed in to change notification settings - Fork 126
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
Foreign Function Interface #1376
Conversation
This reverts commit 20403c2.
This reverts commit 3456a7d.
Get rid of manual reference counting and fix leak where dlclose is not called if no symbols were successfully loaded
We didn't allow them anyway, but this gives a more precise error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I made a few suggestion for stylistic improvements. On the topic of style, I really prefer the case
expressions that do not use inverted indentation because it is quite a bit easier to see what is being matched where. For example like this:
I like:
function = some long prefix thing
case expr of
A -> thing1
B -> thing2
rather than:
function = some long prefix thing case expr of
A -> thing1
B -> thing2
Bind foreign functions to a Cryptol runtime error instead.
This PR adds a foreign function interface (FFI) to Cryptol. This allows Cryptol to call functions written in C.
For instance, we can declare this foreign function in Cryptol
and implement it in C
and then call it like any other Cryptol function.
See the FFI docs for more information.