mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 16:29:24 +02:00
+ write the WebAssembly header in the WASM resource writer
This commit is contained in:
parent
142c851b58
commit
025282ccb9
@ -48,6 +48,10 @@ type
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
const
|
||||||
|
WasmModuleMagic: array [0..3] of byte = ($00,$61,$73,$6D);
|
||||||
|
WasmVersion: array [0..3] of byte = ($01,$00,$00,$00);
|
||||||
|
|
||||||
{ TWasmResourceWriter }
|
{ TWasmResourceWriter }
|
||||||
|
|
||||||
function TWasmResourceWriter.GetExtensions: string;
|
function TWasmResourceWriter.GetExtensions: string;
|
||||||
@ -62,7 +66,8 @@ end;
|
|||||||
|
|
||||||
procedure TWasmResourceWriter.Write(aResources: TResources; aStream: TStream);
|
procedure TWasmResourceWriter.Write(aResources: TResources; aStream: TStream);
|
||||||
begin
|
begin
|
||||||
|
aStream.WriteBuffer(WasmModuleMagic,SizeOf(WasmModuleMagic));
|
||||||
|
aStream.WriteBuffer(WasmVersion,SizeOf(WasmVersion));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TWasmResourceWriter.Create;
|
constructor TWasmResourceWriter.Create;
|
||||||
|
Loading…
Reference in New Issue
Block a user