MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / is_wasm

Function is_wasm

tools/building.py:1149–1153  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

1147
1148
1149def is_wasm(filename):
1150 if not os.path.isfile(filename):
1151 return False
1152 header = open(filename, 'rb').read(webassembly.HEADER_SIZE)
1153 return header == webassembly.MAGIC + webassembly.VERSION
1154
1155
1156def is_wasm_dylib(filename):

Callers 1

is_wasm_dylibFunction · 0.85

Calls 2

openFunction · 0.50
readMethod · 0.45

Tested by

no test coverage detected