File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
blog/content/second-edition/posts/01-freestanding-rust-binary Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -280,8 +280,6 @@ pub extern "C" fn main() -> ! {
280
280
}
281
281
```
282
282
283
- We just call ` WinMain ` from ` WinMainCRTStartup ` to avoid any ambiguity which function is called.
284
-
285
283
#### macOS
286
284
macOS [ does not support statically linked binaries] , so we have to link the ` libSystem ` library. The entry point is called ` main ` :
287
285
@@ -330,12 +328,12 @@ pub extern "C" fn _start() -> ! {
330
328
331
329
// On Windows:
332
330
#[no_mangle]
333
- pub extern " C" fn WinMainCRTStartup () -> ! {
334
- WinMain ();
331
+ pub extern " C" fn mainCRTStartup () -> ! {
332
+ main ();
335
333
}
336
334
337
335
#[no_mangle]
338
- pub extern " C" fn WinMain () -> ! {
336
+ pub extern " C" fn main () -> ! {
339
337
loop {}
340
338
}
341
339
You can’t perform that action at this time.
0 commit comments