Class WasmBinaryInfo
java.lang.Object
ai.tegmentum.webassembly4j.runtime.component.WasmBinaryInfo
Detects whether a WASM binary is a core module or a component.
Both use the \0asm magic prefix. Core modules have version bytes
01 00 00 00 at offset 4. Components have a layer byte of 0x0d
at offset 4 per the component model binary format.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisComponent(byte[] bytes) static booleanisCoreModule(byte[] bytes)
-
Method Details
-
isComponent
public static boolean isComponent(byte[] bytes) -
isCoreModule
public static boolean isCoreModule(byte[] bytes)
-