pub fn new(
    client: ExtensionClient,
    listeners: EventListeners,
    worker_handle: WorkerHandle,
) -> Extension {
    Extension::builder()
        .ops(vec![
            ("send_message_to_core", op_async(send_message_to_core)),
            (
                "listen_messages_from_core",
                op_async(listen_messages_from_core),
            ),
            ("terminate_main_worker", op_async(terminate_main_worker)),
        ])
        .state(move |s| {
            s.put(client.clone());
            s.put(listeners.clone());
            s.put(worker_handle.clone());
            Ok(())
        })
        .build()
}
/// Crate the extension to bridge Graviton Core and the Deno extension
Crate the extension to bridge Graviton Core and the Deno extension
Crate the extension to bridge Graviton Core and the Deno extension
pub fn new(
    client: ExtensionClient,
    listeners: EventListeners,
    worker_handle: WorkerHandle,
) -> Extension {
    Extension::builder()
        .ops(vec![
            ("send_message_to_core", op_async(send_message_to_core)),
            (
                "listen_messages_from_core",
                op_async(listen_messages_from_core),
            ),
            ("terminate_main_worker", op_async(terminate_main_worker)),
        ])
        .state(move |s| {
            s.put(client.clone());
            s.put(listeners.clone());
            s.put(worker_handle.clone());
            Ok(())
        })
        .build()
}
pub fn new ( client : ExtensionClient , listeners : EventListeners , worker_handle : WorkerHandle , ) -> Extension { Extension :: builder ( ) . ops ( vec ! [ ( " " op_async ( send_message_to_core ) ) ( " " op_async ( listen_messages_from_core ) ) ( " " op_async ( terminate_main_worker ) ) ] ) . state ( move | s | { s . put ( client . clone ( ) ) ; s . put ( listeners . clone ( ) ) ; s . put ( worker_handle . clone ( ) ) ; Ok ( ( ) ) } ) . build ( ) }
Crate the extension to bridge Graviton Core and the Deno extension
Crate the extension to bridge Graviton Core and the Deno extension
client
ExtensionClient
listeners
EventListeners
worker_handle
WorkerHandle