Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
afdbcreid
28 days ago
|
parent
|
context
|
favorite
| on:
crustc: entirety of `rustc`, translated to C
E.g. you cannot translate `#[repr(C)] struct Foo { v: i32, u: i32 }` to `typedef struct { int32_t v; int32_t u; } Foo;` because in Rust it's entirely valid to take a `&Foo` and view it as `&[i32; 2]`, while in C this is UB.
1718627440
27 days ago
[–]
Isn't the alignment for the struct and the array the same, because it is determined by the inner type?
Consider applying for YC's Fall 2026 batch!
Applications
are open till July 27.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: