Browse Source

* write a WebAssembly header in TWasmExeOutput.writeData

Nikolay Nikolov 1 year ago
parent
commit
54eb8de658
1 changed files with 6 additions and 0 deletions
  1. 6 0
      compiler/ogwasm.pas

+ 6 - 0
compiler/ogwasm.pas

@@ -2215,7 +2215,13 @@ implementation
     function TWasmExeOutput.writeData: boolean;
       begin
         result:=false;
+
         {TODO: implement}
+
+        Writer.write(WasmModuleMagic,SizeOf(WasmModuleMagic));
+        Writer.write(WasmVersion,SizeOf(WasmVersion));
+
+        result := true;
       end;
 
     procedure TWasmExeOutput.DoRelocationFixup(objsec: TObjSection);