1*15b69138SJoel Dice mod bindings { 2*15b69138SJoel Dice wit_bindgen::generate!({ 3*15b69138SJoel Dice path: "../misc/component-async-tests/wit", 4*15b69138SJoel Dice world: "closed-stream-guest", 5*15b69138SJoel Dice }); 6*15b69138SJoel Dice 7*15b69138SJoel Dice use super::Component; 8*15b69138SJoel Dice export!(Component); 9*15b69138SJoel Dice } 10*15b69138SJoel Dice 11*15b69138SJoel Dice use {bindings::exports::local::local::closed_stream::Guest, wit_bindgen::StreamReader}; 12*15b69138SJoel Dice 13*15b69138SJoel Dice struct Component; 14*15b69138SJoel Dice 15*15b69138SJoel Dice impl Guest for Component { get() -> StreamReader<u8>16*15b69138SJoel Dice fn get() -> StreamReader<u8> { 17*15b69138SJoel Dice bindings::wit_stream::new().1 18*15b69138SJoel Dice } 19*15b69138SJoel Dice } 20*15b69138SJoel Dice 21*15b69138SJoel Dice // Unused function; required since this file is built as a `bin`: main()22*15b69138SJoel Dicefn main() {} 23