Module Spoc_webgpu_runtime.Webgpu_js

Low-level js_of_ocaml glue for the WebGPU runtime: promise helpers, JS object/array accessors, typed-array construction, and the WebGPU global enum readers. Kept separate from Webgpu_runtime so each file stays within the project size limits.

val js_to_int : Js_of_ocaml.Js.number_t -> int
val js_of_int : int -> Js_of_ocaml.Js.number_t
val js_of_float : float -> Js_of_ocaml.Js.number_t
val then_ : 'a -> ('b -> 'c) -> unit
val catch_ : 'a -> ('b -> 'c) -> unit
val js_global : string -> 'a
val gpu : 'a
val json_parse : string -> 'a
val js_get : 'a -> string -> 'b
val js_int : 'a -> string -> int
val js_str : 'a -> string -> string
val js_arr_len : 'a -> int
val js_arr_get : 'a -> int -> 'b
val js_is_null_or_undef : 'a -> bool
val make_ta : 'a -> float array -> 'b
val typed_array : string -> float array -> 'a
val bpe : string -> int
val usage : string -> int
val map_read : unit -> int
val shader_compute : unit -> int
val js_err : 'a -> string