MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / hexToFile

Function hexToFile

test/api/APIUnitTest.cpp:226–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224char TPath[] = "apiTestData/test.wasm";
225
226void hexToFile(cxx20::span<const uint8_t> Wasm, const char *Path) {
227 std::ofstream TFile(std::filesystem::u8path(Path), std::ios_base::binary);
228 TFile.write(reinterpret_cast<const char *>(Wasm.data()),
229 static_cast<std::streamsize>(Wasm.size()));
230 TFile.close();
231}
232
233WasmEdge_Result externAdd(void *, const WasmEdge_CallingFrameContext *,
234 const WasmEdge_Value *In, WasmEdge_Value *Out) {

Callers 1

TESTFunction · 0.85

Calls 4

writeMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected