1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vlib: add a wasm module, implementing a pure V webassembly seralisation library (#17909)

This commit is contained in:
l-m
2023-04-09 14:55:02 +10:00
committed by GitHub
parent 9658d20f03
commit d2f69472b2
14 changed files with 1966 additions and 0 deletions

28
vlib/wasm/functions.v Normal file
View File

@ -0,0 +1,28 @@
module wasm
struct ImportCallPatch {
mod string
name string
pos int
}
struct FunctionCallPatch {
name string
pos int
}
type CallPatch = FunctionCallPatch | ImportCallPatch
struct Function {
tidx int
idx int
mut:
call_patches []CallPatch
label int
export bool
mod &Module
code []u8
locals []ValType
pub:
name string
}