mirror of
https://github.com/Noratrieb/portability.git
synced 2026-01-15 00:05:02 +01:00
18 lines
329 B
Rust
18 lines
329 B
Rust
#![no_std]
|
|
#![no_main]
|
|
#![windows_subsystem = "console"]
|
|
|
|
#[link(name = "small_dll", kind = "raw-dylib")]
|
|
unsafe extern "C" {
|
|
safe fn my_export() -> u32;
|
|
}
|
|
|
|
#[panic_handler]
|
|
fn handle_panic(_: &core::panic::PanicInfo<'_>) -> ! {
|
|
loop {}
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "stdcall" fn mainCRTStartup() -> u32 {
|
|
my_export()
|
|
}
|