tenfourfox/dom/media/gtest/hello.rs

7 lines
164 B
Rust
Raw Normal View History

2017-04-19 07:56:45 +00:00
#[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()
}