github.com/primecitizens/pcz/std@v0.2.1/core/assert/bindings/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 bindings 7 8 import ( 9 "unsafe" 10 11 "github.com/primecitizens/pcz/std/core/mark" 12 ) 13 14 //go:wasmimport core/assert append 15 //go:noescape 16 func append(str unsafe.Pointer, len uint32) 17 18 //go:wasmimport core/assert throw 19 //go:noescape 20 func Throw() 21 22 func Append(s ...string) { 23 for _, a := range s { 24 append(mark.NoEscapeStringDataPointer(a), uint32(len(a))) 25 } 26 }