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
There's no particular reason that we have to match the C types, the Rust compiler just needs to e.g. create a shim function that does the appropriate casts (it's not like the return value of c_int is that correct anyway: e.g. POSIX systems only look at the lower byte).
This is under the assumption that
main
should receive the same arguments and have the same return type as in C if it has the#[start]
attribute:Currently, the
#[start]
function has to have the type:This is not an accurate translation of the C prototype, it has to be
And it's even wrong on
x86_64
, whereisize = i64
andc_int = i32
.The text was updated successfully, but these errors were encountered: