Module Webview.Utils

Filesystem helpers for locating on-disk assets (HTML/CSS/JS) relative to the running executable, independently of the current working directory.

val exe_dir : unit -> string

Absolute path to the directory containing the running executable.

val asset_dir : unit -> string

Directory to resolve on-disk assets against. When launched via dune exec, the executable lives under _build/<context>/, where the source assets are not copied; this maps such a path back to the matching source directory. From an installed location the executable directory is used as-is.

val web_dir : unit -> string

Directory to resolve web assets against. This is asset_dir/web.