mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 18:15:07 +03:00
13 lines
212 B
Rust
13 lines
212 B
Rust
// Compiler:
|
|
|
|
extern "C" {
|
|
fn log(message_data: u32, message_size: u32);
|
|
}
|
|
|
|
pub fn main() {
|
|
let message = "Hello, world!";
|
|
unsafe {
|
|
log(message.as_ptr() as u32, message.len() as u32);
|
|
}
|
|
}
|