rust_swig 0.4.0

Tool for connecting libraries written in Rust with other languages
Documentation
1
2
3
4
5
6
7
8
r##"# [ no_mangle ] pub extern "C" fn Foo_f ( this : * mut Foo , a0 : i32 , a1 : i32 , a2 : CRustStrView , ) -> CRustString {
 let a2 : & str = unsafe { let slice : & [ u8 ] = :: std :: slice :: from_raw_parts ( a2 . data as * const u8 , a2 . len ) ;
 :: std :: str :: from_utf8_unchecked ( slice ) } ;
 let mut a2 : String = a2 . swig_into ( ) ;
 let this : & Foo = unsafe { this . as_mut ( ) . unwrap ( ) } ;
 let mut ret : String = Foo :: f ( this , a0 , a1 , a2 ) ;
 let ret : CRustString = CRustString :: from_string ( ret ) ;
 ret }"##;