Fri Mar 01 2024 15:05:02 GMT+0000 (Coordinated Universal Time)
Saved by @@Bicky0
use core {*} // Using #dyncall dynamically loads the library at runtime. #foreign #dyncall "libc.so" { write :: (fd: i32, data: [&] u8, count: i32) -> i32 --- } main :: () { msg: [] u8 = "Hello, libc!"; write(1, msg.data, msg.length); }
Copy this HTML code:
Preview:
open_in_newInstructions on embedding in Medium
Comments