github.com/primecitizens/pcz/std@v0.2.1/ffi/js/callback/import_wasm.go (about)

     1  // SPDX-License-Identifier: Apache-2.0
     2  // Copyright 2023 The Prime Citizens
     3  
     4  //go:build wasm
     5  
     6  package callback
     7  
     8  import (
     9  	"unsafe"
    10  
    11  	"github.com/primecitizens/pcz/std/ffi/js/bindings"
    12  )
    13  
    14  //go:wasmimport ffi/js/callback func
    15  //go:noescape
    16  func Func(
    17  	dispFnPC,
    18  	handler unsafe.Pointer,
    19  	targetPC uint32,
    20  ) bindings.Ref
    21  
    22  //go:wasmimport ffi/js/callback ctx
    23  //go:noescape
    24  func Context(
    25  	ctx bindings.Ref,
    26  	ptr unsafe.Pointer,
    27  )