| Copyright | (c) 2026 Tushar Adhatrao |
|---|---|
| License | MIT |
| Stability | internal |
| Safe Haskell | None |
| Language | GHC2021 |
WasmEdge.Internal.Storable
Description
Provides Storable instances and allocation helpers for the C structs
that WasmEdge returns by value. These are used internally when calling
the shim layer.
Do not import this module in user code.
Synopsis
- data CString_
- allocaCString :: (Ptr CString_ -> IO a) -> IO a
- peekCStringBuf :: Ptr CString_ -> IO (Ptr Word8)
- peekCStringLen :: Ptr CString_ -> IO Word32
- cStringSize :: Int
- stringSize :: Int
- data CBytes_
- allocaCBytes :: (Ptr CBytes_ -> IO a) -> IO a
- data CResult_
- allocaCResult :: (Ptr CResult_ -> IO a) -> IO a
- peekResultCode :: Ptr CResult_ -> IO Word32
- data CValType_
- allocaCValType :: (Ptr CValType_ -> IO a) -> IO a
- valTypeSize :: Int
- data CValue_
- allocaCValue :: (Ptr CValue_ -> IO a) -> IO a
- valueSize :: Int
- withCValTypeArray :: Int -> (Ptr CValType_ -> IO a) -> IO a
- withCValueArray :: Int -> (Ptr CValue_ -> IO a) -> IO a
WasmEdge_String layout
Opaque placeholder for the WasmEdge_String C struct layout.
Use allocaCString to allocate on the stack.
allocaCString :: (Ptr CString_ -> IO a) -> IO a #
Allocate a stack-allocated WasmEdge_String and pass it to the action.
cStringSize :: Int #
stringSize :: Int #
WasmEdge_Bytes layout
WasmEdge_Result layout
WasmEdge_ValType layout (8 bytes opaque)
valTypeSize :: Int #