package owi
OCaml toolchain to work with WebAssembly, including an interpreter
Install
dune-project
Dependency
Authors
Maintainers
Sources
0.2.tar.gz
sha256=ae5f43a855d35e3362d7ae4f5d26a2e99f5abbbafceb9e970a9ac9ec48eca791
sha512=2cbd28275e1c65aa8f16d945d8ed679f070e1409f45796a272c8d58eb806890ad686184c95e1b6b16b96734c3d2c1d885c9894b3386f55cc0fd3fb4a40d68a8d
doc/src/owi/v.ml.html
Source file v.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
(* SPDX-License-Identifier: AGPL-3.0-or-later *) (* Copyright © 2021-2024 OCamlPro *) (* Written by the Owi programmers *) include ( struct type vbool = bool type int32 = Int32.t type int64 = Int64.t type float32 = Float32.t type float64 = Float64.t let const_i32 x = x let const_i64 x = x let const_f32 x = x let const_f64 x = x include Concrete_value module Ref = struct let get_func (r : ref_value) : Func_intf.t Value_intf.get_ref = match r with | Funcref (Some f) -> Ref_value f | Funcref None -> Null | _ -> Type_mismatch let get_externref (type t) (r : ref_value) (t : t Type.Id.t) : t Value_intf.get_ref = match r with | Externref (Some (E (ety, v))) -> ( match Type.Id.provably_equal t ety with | None -> assert false | Some Equal -> Ref_value v ) | _ -> assert false end module Bool = struct let const c = c let not = not let and_ = ( && ) let or_ = ( || ) let int32 = function true -> 1l | false -> 0l let pp = Format.pp_bool end module I32 = struct include Int32 include Convert.Int32 let to_bool i = Int32.ne i 0l end module I64 = struct include Int64 include Convert.Int64 end module F32 = struct include Float32 include Convert.Float32 end module F64 = struct include Float64 include Convert.Float64 end end : Value_intf.T with type vbool = Bool.t and type int32 = Int32.t and type int64 = Int64.t and type float32 = Float32.t and type float64 = Float64.t and type ref_value = Concrete_value.ref_value and type t = Concrete_value.t )
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>