cglue 0.3.5

FFI safe abstractions for making plugins and C-compatible libraries
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use cglue_macro::*;

#[test]
fn use_future() {
    async fn hii() -> u64 {
        42
    }

    let obj = trait_obj!(hii() as Future);

    impl_future(&obj);

    assert_eq!(pollster::block_on(obj), 42);
}

#[cfg(test)]
fn impl_future(_: &impl ::core::future::Future) {}