mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-02 18:10:23 +02:00
+ started the wasmbase unit (similar to elfbase and omfbase)
This commit is contained in:
parent
fc41306c45
commit
59ea39ce75
@ -32,6 +32,8 @@ interface
|
||||
systems,
|
||||
{ assembler }
|
||||
aasmbase,assemble,
|
||||
{ WebAssembly module format definitions }
|
||||
wasmbase,
|
||||
{ output }
|
||||
ogbase,
|
||||
owbase;
|
||||
|
50
compiler/wasmbase.pas
Normal file
50
compiler/wasmbase.pas
Normal file
@ -0,0 +1,50 @@
|
||||
{
|
||||
Copyright (c) 2021 by Nikolay Nikolov
|
||||
|
||||
Contains WebAssembly binary module format definitions
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
****************************************************************************
|
||||
}
|
||||
unit wasmbase;
|
||||
|
||||
{$i fpcdefs.inc}
|
||||
|
||||
interface
|
||||
|
||||
const
|
||||
WasmModuleMagic: array [0..3] of byte = ($00,$61,$73,$6D);
|
||||
WasmVersion: array [0..3] of byte = ($01,$00,$00,$00);
|
||||
|
||||
type
|
||||
TWasmSectionID = (
|
||||
wsiCustom = 0,
|
||||
wsiType = 1,
|
||||
wsiImport = 2,
|
||||
wsiFunction = 3,
|
||||
wsiTable = 4,
|
||||
wsiMemory = 5,
|
||||
wsiGlobal = 6,
|
||||
wsiExport = 7,
|
||||
wsiStart = 8,
|
||||
wsiElement = 9,
|
||||
wsiCode = 10,
|
||||
wsiData = 11,
|
||||
wsiDataCount = 12);
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
Loading…
Reference in New Issue
Block a user