MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / readFile

Function readFile

examples/serialize.cc:20–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18using namespace wasmtime;
19
20std::string readFile(const char *name) {
21 std::ifstream watFile;
22 watFile.open(name);
23 std::stringstream strStream;
24 strStream << watFile.rdbuf();
25 return strStream.str();
26}
27
28std::vector<uint8_t> serialize() {
29 std::cout << "Initializing...\n";

Callers 1

serializeFunction · 0.70

Calls 2

strMethod · 0.80
openMethod · 0.45

Tested by

no test coverage detected