-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for interfacing with C libraries
This adds support for linking against C libraries and using their types and functions. The FFI is fairly strict and a bit limited, such as not performing automatic type conversions, but this is a deliberate choice: it keeps the compiler's complexity at a reasonable level, and it should (hopefully) further drive home the idea that one should avoid interfacing with C as much as they can, as all of Inko's safety guarantees are thrown out of the window when doing so. As part of this work, the precedence of type casts (`x as Type`) is changed to be the same as binary operators. This means expressions such as `x as Foo + y` are now valid, instead of resulting in a syntax error. This makes working with type casts (something you'll need to use more often when working with C code) less painful. This fixes #290. Changelog: added
- Loading branch information
1 parent
59578a1
commit ed8014c
Showing
48 changed files
with
2,987 additions
and
2,357 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.