Skip to content

Commit

Permalink
fix: use extism:host/env
Browse files Browse the repository at this point in the history
  • Loading branch information
zshipko committed Oct 19, 2023
1 parent f39ba75 commit 62d54a6
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions env.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,75 +2,75 @@ package pdk

type extismPointer uint64

//go:wasmimport extism:env input_length
//go:wasmimport extism:host/env input_length
func extism_input_length() uint64

//go:wasmimport extism:env length
//go:wasmimport extism:host/env length
func extism_length(extismPointer) uint64

//go:wasmimport extism:env alloc
//go:wasmimport extism:host/env alloc
func extism_alloc(uint64) extismPointer

//go:wasmimport extism:env free
//go:wasmimport extism:host/env free
func extism_free(extismPointer)

//go:wasmimport extism:env input_load_u8
//go:wasmimport extism:host/env input_load_u8
func extism_input_load_u8_(extismPointer) uint32

func extism_input_load_u8(p extismPointer) uint8 {
return uint8(extism_input_load_u8_(p))
}

//go:wasmimport extism:env input_load_u64
//go:wasmimport extism:host/env input_load_u64
func extism_input_load_u64(extismPointer) uint64

//go:wasmimport extism:env output_set
//go:wasmimport extism:host/env output_set
func extism_output_set(extismPointer, uint64)

//go:wasmimport extism:env error_set
//go:wasmimport extism:host/env error_set
func extism_error_set(extismPointer)

//go:wasmimport extism:env config_get
//go:wasmimport extism:host/env config_get
func extism_config_get(extismPointer) extismPointer

//go:wasmimport extism:env var_get
//go:wasmimport extism:host/env var_get
func extism_var_get(extismPointer) extismPointer

//go:wasmimport extism:env var_set
//go:wasmimport extism:host/env var_set
func extism_var_set(extismPointer, extismPointer)

//go:wasmimport extism:env store_u8
//go:wasmimport extism:host/env store_u8
func extism_store_u8_(extismPointer, uint32)
func extism_store_u8(p extismPointer, v uint8) {
extism_store_u8_(p, uint32(v))
}

//go:wasmimport extism:env load_u8
//go:wasmimport extism:host/env load_u8
func extism_load_u8_(extismPointer) uint32
func extism_load_u8(p extismPointer) uint8 {
return uint8(extism_load_u8_(p))
}

//go:wasmimport extism:env store_u64
//go:wasmimport extism:host/env store_u64
func extism_store_u64(extismPointer, uint64)

//go:wasmimport extism:env load_u64
//go:wasmimport extism:host/env load_u64
func extism_load_u64(extismPointer) uint64

//go:wasmimport extism:env http_request
//go:wasmimport extism:host/env http_request
func extism_http_request(extismPointer, extismPointer) extismPointer

//go:wasmimport extism:env http_status_code
//go:wasmimport extism:host/env http_status_code
func extism_http_status_code() int32

//go:wasmimport extism:env log_info
//go:wasmimport extism:host/env log_info
func extism_log_info(extismPointer)

//go:wasmimport extism:env log_debug
//go:wasmimport extism:host/env log_debug
func extism_log_debug(extismPointer)

//go:wasmimport extism:env log_warn
//go:wasmimport extism:host/env log_warn
func extism_log_warn(extismPointer)

//go:wasmimport extism:env log_error
//go:wasmimport extism:host/env log_error
func extism_log_error(extismPointer)

0 comments on commit 62d54a6

Please sign in to comment.