@@ -31,25 +31,29 @@ pub(crate) fn extern_wasm_channel_internal(
31
31
get_bindgen_attr ( & input, & input. attrs ) ?;
32
32
33
33
// Extract the type and functions from the foreign module.
34
- // This will also transform the functions to use JsValue as the return type for the extern block.
34
+ // This will also transform the functions to use JsValue as the return type for the extern
35
+ // block.
35
36
let Items { ident, functions } = Items :: process_items ( & mut input) ?;
36
37
37
38
// Prepend the ident with Channel
38
39
let channel_ident = quote:: format_ident!( "Channel{ident}" ) ;
39
40
let channel_command_ident = quote:: format_ident!( "Channel{ident}Command" ) ;
40
41
41
- // Generate the command struct used in the sent messages between the WASM implementation and the IPC implementation
42
+ // Generate the command struct used in the sent messages between the WASM implementation and the
43
+ // IPC implementation
42
44
let command_struct = generate_command_struct ( & channel_command_ident, & functions) ;
43
45
44
- // Generate all the functions in the IPC implementation that will call the WASM impl through channels
46
+ // Generate all the functions in the IPC implementation that will call the WASM impl through
47
+ // channels
45
48
let channel_impl = generate_channel_impl (
46
49
& channel_ident,
47
50
& channel_command_ident,
48
51
& functions,
49
52
& attr_args,
50
53
) ;
51
54
52
- // Generate the function that, given a WASM instance, creates the channel implementation, and starts the message passing task
55
+ // Generate the function that, given a WASM instance, creates the channel implementation, and
56
+ // starts the message passing task
53
57
let channel_init =
54
58
generate_channel_init ( & ident, & channel_ident, & channel_command_ident, & functions) ;
55
59
0 commit comments