1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
(* SPDX-License-Identifier: AGPL-3.0-or-later *)
(* Copyright © 2021-2024 OCamlPro *)
(* Written by the Owi programmers *)
type func =
| Wasm of
{ func : Binary.Func.t
; idx : int
}
| Extern of { idx : int }
let wasm func idx : func = Wasm { func; idx }
let extern idx : func = Extern { idx }
type 'f t =
| Wat of Text.Module.t
| Wast of Wast.script
| Wasm of Binary.Module.t
| Extern of 'f Extern.Module.t