wit-bindgen-cli 0.56.0

CLI tool to generate bindings for WIT documents and the component model.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
include!(env!("BINDINGS"));

struct Component;

export!(Component);

impl Guest for Component {
    fn run() {
        use test::dep0_1_0::test as v1;
        assert_eq!(v1::x(), 1.0);
        assert_eq!(v1::y(1.0), 2.0);

        use test::dep0_2_0::test as v2;
        assert_eq!(v2::x(), 2.0);
        assert_eq!(v2::z(1.0, 1.0), 4.0);
    }
}