finite-wasm 0.5.1

Guarantee deterministic limits on execution time and space resources made available to the WebAssembly programs in a runtime-agnostic way.
1
2
3
4
5
6
7
8
9
10
11
12
(* Uses Int32 as the underlying storage. All int16 values will be
 * stored signed-extended. E.g. -1 will be stored with all high bits set.
 *)
include Ixx.Make (struct
  include Int32

  let bitwidth = 16
  let to_hex_string i = Printf.sprintf "%lx" (Int32.logand i 0xffffl)

  let of_int64 = Int64.to_int32
  let to_int64 = Int64.of_int32
end)