Using empty structure is a valid approach. You almost got it, you just don't need to put the struct definition in extern
block. Also you can't use C code inside Rust sources - extern definitions have to follow standard Rust syntax.
use std::ptr;
struct memcached_st;
#[link(name = "memcached")]
extern {
fn memcached_create(ptr: *memcached_st) -> *memcached_st;
}
fn main() {
unsafe {
let memc = memcached_create(ptr::null());
println!("{:?}", memc);
}
}