thin_trait_object 1.1.2

One pointer wide trait objects which are also FFI safe, allowing traits to be passed to/from and implemented by C ABI code
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
extern crate thin_trait_object;
use thin_trait_object::*;

#[thin_trait_object(inline_vtable = true)]
pub trait Foo {
    fn fooify(&self);
}
impl Foo for String {
    fn fooify(&self) {
        println!("Fooified a string: {}", self);
    }
}

fn main() {
    BoxedFoo::new("Hello World!".to_string()).fooify();
}