| Copyright | (c) 2026 Tushar Adhatrao |
|---|---|
| License | MIT |
| Stability | internal |
| Safe Haskell | None |
| Language | GHC2021 |
WasmEdge.Internal.FFI.Value
Description
Do not import this module in user code.
Synopsis
- c_ValTypeGenI32 :: Ptr CValType_ -> IO ()
- c_ValTypeGenI64 :: Ptr CValType_ -> IO ()
- c_ValTypeGenF32 :: Ptr CValType_ -> IO ()
- c_ValTypeGenF64 :: Ptr CValType_ -> IO ()
- c_ValTypeGenV128 :: Ptr CValType_ -> IO ()
- c_ValTypeGenFuncRef :: Ptr CValType_ -> IO ()
- c_ValTypeGenExternRef :: Ptr CValType_ -> IO ()
- c_ValTypeIsEqual :: Ptr CValType_ -> Ptr CValType_ -> IO CBool
- c_ValTypeIsI32 :: Ptr CValType_ -> IO CBool
- c_ValTypeIsI64 :: Ptr CValType_ -> IO CBool
- c_ValTypeIsF32 :: Ptr CValType_ -> IO CBool
- c_ValTypeIsF64 :: Ptr CValType_ -> IO CBool
- c_ValTypeIsV128 :: Ptr CValType_ -> IO CBool
- c_ValTypeIsFuncRef :: Ptr CValType_ -> IO CBool
- c_ValTypeIsExternRef :: Ptr CValType_ -> IO CBool
- c_ValTypeIsRef :: Ptr CValType_ -> IO CBool
- c_ValTypeIsRefNull :: Ptr CValType_ -> IO CBool
- c_ValueGenI32 :: Ptr CValue_ -> Int32 -> IO ()
- c_ValueGenI64 :: Ptr CValue_ -> Int64 -> IO ()
- c_ValueGenF32 :: Ptr CValue_ -> CFloat -> IO ()
- c_ValueGenF64 :: Ptr CValue_ -> CDouble -> IO ()
- c_ValueGenV128 :: Ptr CValue_ -> Word64 -> Word64 -> IO ()
- c_ValueGenFuncRef :: Ptr CValue_ -> Ptr FunctionInstanceTag -> IO ()
- c_ValueGenExternRef :: Ptr CValue_ -> Ptr () -> IO ()
- c_ValueGenNullFuncRef :: Ptr CValue_ -> IO ()
- c_ValueGenNullExternRef :: Ptr CValue_ -> IO ()
- c_ValueGetI32 :: Ptr CValue_ -> IO Int32
- c_ValueGetI64 :: Ptr CValue_ -> IO Int64
- c_ValueGetF32 :: Ptr CValue_ -> IO CFloat
- c_ValueGetF64 :: Ptr CValue_ -> IO CDouble
- c_ValueGetV128 :: Ptr CValue_ -> Ptr Word64 -> Ptr Word64 -> IO ()
- c_ValueIsNullRef :: Ptr CValue_ -> IO CBool
- c_ValueGetFuncRef :: Ptr CValue_ -> IO (Ptr FunctionInstanceTag)
- c_ValueGetExternRef :: Ptr CValue_ -> IO (Ptr ())
- c_ValueGetType :: Ptr CValue_ -> Ptr CValType_ -> IO ()
- c_ValueArrayAlloc :: Word32 -> IO (Ptr CValue_)
- c_ValueArrayFree :: Ptr CValue_ -> IO ()
- c_ValueArraySet :: Ptr CValue_ -> Word32 -> Ptr CValue_ -> IO ()
- c_ValueArrayGet :: Ptr CValue_ -> Word32 -> Ptr CValue_ -> IO ()
ValType generators (via shims)
c_ValTypeGenI32 :: Ptr CValType_ -> IO () #
c_ValTypeGenI64 :: Ptr CValType_ -> IO () #
c_ValTypeGenF32 :: Ptr CValType_ -> IO () #
c_ValTypeGenF64 :: Ptr CValType_ -> IO () #
c_ValTypeGenV128 :: Ptr CValType_ -> IO () #
c_ValTypeGenFuncRef :: Ptr CValType_ -> IO () #
c_ValTypeGenExternRef :: Ptr CValType_ -> IO () #
ValType predicates
Value generators (via shims)
c_ValueGenV128 :: Ptr CValue_ -> Word64 -> Word64 -> IO () #
Generate a V128 value from two Word64 (hi, lo).
c_ValueGenFuncRef :: Ptr CValue_ -> Ptr FunctionInstanceTag -> IO () #
Generate a FuncRef value from a FunctionInstance pointer.
Passing nullPtr generates a null FuncRef.
c_ValueGenExternRef :: Ptr CValue_ -> Ptr () -> IO () #
Generate an ExternRef value from an arbitrary Haskell pointer.
c_ValueGenNullFuncRef :: Ptr CValue_ -> IO () #
Generate a null FuncRef value.
c_ValueGenNullExternRef :: Ptr CValue_ -> IO () #
Generate a null ExternRef value.
Value extractors
c_ValueGetV128 :: Ptr CValue_ -> Ptr Word64 -> Ptr Word64 -> IO () #
Retrieve V128 as two Word64 (hi, lo) written to output pointers.
c_ValueGetFuncRef :: Ptr CValue_ -> IO (Ptr FunctionInstanceTag) #
Get the FunctionInstance pointer from a FuncRef value.
Returns nullPtr for a null FuncRef.
c_ValueGetExternRef :: Ptr CValue_ -> IO (Ptr ()) #
Get the ExternRef pointer from an ExternRef value.
c_ValueGetType :: Ptr CValue_ -> Ptr CValType_ -> IO () #
Get the ValType of a value (written to out pointer).
Value array helpers
c_ValueArrayAlloc :: Word32 -> IO (Ptr CValue_) #
Allocate a C heap array of n WasmEdge_Value structs. Caller must free.
c_ValueArrayFree :: Ptr CValue_ -> IO () #
Free an array allocated by c_ValueArrayAlloc.