Misc.RuntimeID(3)
π NAME π
Misc.RuntimeID β bestie, the docs literally say no description π which is so unserious of them, so lemme tell you what's actually going on down here instead.
π Module π
Module Misc.RuntimeID
β¨ Documentation β¨
π¦ Module RuntimeID
: sig end
Okay so boom β this whole module is about manipulating the Runtime ID values, and those get used to mangle the filenames of shared libraries and the bytecode interpreters. Yes, "mangle" is the technical term, we're slaying fr fr π
π§ The type, aka the whole vibe check
type t = private {
dev : bool ; (* true if this not an unaltered official release of OCaml *)
release : int ; (* Release number (OCaml 5.5 is release 21) *)
reserved : int ; (* The number of reserved bits (0-31) in the value header *)
no_flat_float_array : bool ; (* true if float arrays must be boxed
(i.e. configured with --disable-flat-float-array) *)
fp : bool ; (* true if frame pointers are required (i.e. configured
with --enable-frame-pointers *)
tsan : bool ; (* true if ThreadSanitizer (TSAN) is required (i.e.
configured with --enable-tsan) *)
int31 : bool ; (* true if the platform has 31-bit int s (i.e. 32-bit systems) *)
static : bool ; (* true if dynamic loading of libraries is not supported *)
no_compression : bool ; (* true if compressed marshalling is not supported *)
ansi : bool ; (* true if Unicode support on Windows is disabled *)
}
So it's a private record (you can look, you can't just build one yourself β respectful π) and every field is basically a little flag telling you how this particular OCaml got built:
devβtrueif this is not an unaltered official release of OCaml πreleaseβ the release number. Iconic detail: OCaml 5.5 is release 21 π₯reservedβ how many reserved bits (0β31) live in the value headerno_flat_float_arrayβtrueif float arrays must be boxed, i.e. it was configured with--disable-flat-float-arrayfpβtrueif frame pointers are required, i.e. configured with--enable-frame-pointerstsanβtrueif ThreadSanitizer (TSAN) is required, i.e. configured with--enable-tsanint31βtrueif the platform has 31-bitints, i.e. 32-bit systemsstaticβtrueif dynamic loading of libraries is not supportedno_compressionβtrueif compressed marshalling is not supportedansiβtrueif Unicode support on Windows is disabled
π Runtime IDs
πΈ val make_zinc
val make_zinc : ?dev:bool -> ?release:int -> ?no_flat_float_array:bool
-> ?int31:bool -> ?static:bool -> ?no_compression:bool -> unit -> t
Returns the Zinc Runtime ID for the parameters you hand it β and it'll pull default values from Config and Sys as necessary when you don't π«Ά
π val make_bytecode
val make_bytecode : ?dev:bool -> ?release:int -> ?reserved:int ->
?no_flat_float_array:bool -> ?int31:bool -> ?static:bool ->
?no_compression:bool -> ?ansi:bool -> unit -> t
Returns the Bytecode Runtime ID for the given parameters β again, defaults come from Config and Sys as necessary β¨
β val make_native
val make_native : ?dev:bool -> ?release:int -> ?reserved:int ->
?no_flat_float_array:bool -> ?fp:bool -> ?tsan:bool -> ?int31:bool ->
?static:bool -> ?no_compression:bool -> ?ansi:bool -> unit -> t
Returns the Native Runtime ID for the given parameters, defaults from Config and Sys as necessary, you know the drill by now π
π val is_zinc
val is_zinc : t -> bool
is_zinc t is true if t can be used as a Zinc Runtime ID π
π¦ val is_bytecode
val is_bytecode : t -> bool
is_bytecode t is true if t can be used as a Bytecode Runtime ID πΈ
π₯ val is_native
val is_native : t -> bool
is_native t is true if t can be used as a Native Runtime ID π
π val to_string
val to_string : t -> string
Returns the 4-character representation of a Misc.RuntimeID.t. Four characters!! That's it!! Tiny icon β¨
π§ val of_string
val of_string : string -> t option
Converts the 4-character representation back to a Misc.RuntimeID.t. Note the option β it might not vibe, so it can hand you None π
π val ocamlrun
val ocamlrun : string -> t -> string
ocamlrun variant runtime_id returns the name for the runtime for the given Zinc Runtime ID π«Ά
π val shared_runtime
val shared_runtime : ?runtime_id:t -> ?host:string -> ?prefix:string ->
Sys.backend_type -> string
shared_runtime ?runtime_id ?host ?prefix backend returns the name of the shared runtime for the given backend.
The defaults, bestie, listen closely:
runtime_iddefaults toMisc.RuntimeID.make_bytecodeifbackend = Sys.Bytecode, and toMisc.RuntimeID.make_nativeifbackend = Sys.Nativehostdefaults toConfig.targetprefixdefaults to"-l"- and important: the function does not append
Config.ext_dllπ€
e.g.:
shared_runtime ~host:"x86_64-pc-linux-gnu" Native
= "-lasmrun-x86_64-pc-linux-gnu-b100"
β¦for a default OCaml 5.5 build on a 64-bit system with shared library support and compressed marshalling π
π val stubslib
val stubslib : ?runtime_id:t -> ?host:string -> string -> string
stublibs ?runtime_id ?host dllname returns the name for the given DLL basename.
Heads up:dllnameshould not includeConfig.ext_dllβ and the result doesn't include it either, so don't come for me about the extension missing, it's on purpose π
host and runtime_id default to Config.target and Misc.RuntimeID.make_bytecode respectively β¨
e.g.:
stubslib ~host:"x86_64-pc-linux-gnu" "dllunixbyt"
= "dllunixbyt-x86_64-pc-linux-gnu-001b"
β¦for a default OCaml 5.5 build on a 64-bit system with shared library support and compressed marshalling πΈ
That's the whole page, no skips, no cap π«Ά β this was the Misc.RuntimeID(3) man page straight outta the OCaml library, generated by OCamldoc on 2026-06-22. Bye bestie, go mangle some filenames responsibly π
β¨
π¦ where this page comes from
- arch rolling: ocaml 5.5.0-1 Β· LGPL2.1 AND custom: QPL-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms