-
Notifications
You must be signed in to change notification settings - Fork 154
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
Can't call extern functions #421
Labels
Milestone
Comments
I am going to bring this into the traits milestone as this goal should in theory finish off the type system. There are 3 features in this test case that are not supported yet:
|
Found a crash when trying to dump the AST for this:
|
philberty
added a commit
that referenced
this issue
Jul 26, 2021
This is the initial patch to do the ground work to support extern blocks. Type resolution and Generic output still needs to be done to actually support extern blocks. Addresses #421
philberty
added a commit
that referenced
this issue
Jul 26, 2021
…ons. ``` extern "C" { fn puts(s: *const i8); } fn main() { unsafe { let a = "Hello World\0"; let b = a as *const str; let c = b as *const i8; puts(c); } } ``` Fixes #421
Merged
philberty
added a commit
that referenced
this issue
Jul 27, 2021
This adds extern block compilation support. It currently assumes the C abi and does not perform any name mangling. It does not support varadic arguments yet but its the initial support to get this working. Fixes #421
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
as is this gives
without
unsafe
block it givesThe text was updated successfully, but these errors were encountered: