mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
3953bd28c0
This is mostly to verify compilation and linkage. The test itself just verifies the contents of an returned string.
7 lines
164 B
Rust
7 lines
164 B
Rust
#[no_mangle]
|
|
pub extern fn test_rust() -> *const u8 {
|
|
// NB: rust &str aren't null terminated.
|
|
let greeting = "hello from rust.\0";
|
|
greeting.as_ptr()
|
|
}
|