guest/
guest.rs

1// Use wit_bindgen to generate the bindings from the component model to Rust.
2// For more information see: https://github.com/bytecodealliance/wit-bindgen/
3wit_bindgen::generate!({
4    path: "..",
5    world: "convert",
6});
7
8struct GuestComponent;
9
10export!(GuestComponent);
11
12impl Guest for GuestComponent {
13    fn convert_celsius_to_fahrenheit(x: f32) -> f32 {
14        host::multiply(x, 1.8) + 32.0
15    }
16}