Module Brzo_b0_js_of_ocaml.Js_of_ocaml
js_of_ocaml
compilation.
Js_of_ocaml
val compile : ?args:B0_std.Cmd.t -> B00.Memo.t -> byte_exe:B0_std.Fpath.t -> o:B0_std.Fpath.t -> unit
compile m ~byte_exe ~o
compiles the byte code executablebyte_exe
to the JavaScript fileo
.
val compile_toplevel : ?args:B0_std.Cmd.t -> B00.Memo.t -> byte_exe:B0_std.Fpath.t -> mod_names:B0_std.Fpath.t -> o:B0_std.Fpath.t -> unit
compile m ~byte_exe ~mod_names ~o
compiles the byte code executablebyte_exe
to a toplevel in which the modules mentioned inmod_names
are made visible.
val link : ?args:B0_std.Cmd.t -> B00.Memo.t -> jss:B0_std.Fpath.t list -> o:B0_std.Fpath.t -> unit
link m ~jss ~o
links the JavaScript filesjss
intoo
.
val tty_glue : exe:B0_std.Fpath.t -> cwd:B0_std.Fpath.t -> env:B0_std.Os.Env.t -> args:string list -> string
val write_page : ?toplevel_css:bool -> ?generator:string -> ?lang:string -> ?scripts:string list -> ?styles:string list -> ?title:string -> B00.Memo.t -> o:B0_std.Fpath.t -> unit
write_page m ~title ~o
writes to fileo
a full HTML document whose body contains only aB0_web
.Htmlg.noscript element that entices the user, in english, to enable javascript.title
defaults to the basename ofo
without its extension, for the other arguments and more information seeB0_web
.Htmlg.basic_page.toplevel_css
iftrue
adds a bit of styling for an#ocaml
element that is supposed to hold a toplevel session (defaults tofalse
).
val toplevel_ui_src : string
toplevel_ui_src
a simple toplevel user interface written in OCaml. That can be compiled and linked when usingcompile_toplevel
to get a simple prompt.