Misc.RuntimeID(3) OCaml library Misc.RuntimeID(3)

# [NAME](#NAME)

Misc.RuntimeID - no description

# [Module](#Module)

Module Misc.RuntimeID

# [Documentation](#Documentation)

Module **RuntimeID**  
: **sig end**

Manipulation of the Runtime ID values used to mangle the filenames of shared libraries and the bytecode interpreters.

*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  
\*)  
}

Runtime IDs

*val make\_zinc* : **?dev:bool -&gt;** **?release:int -&gt;** **?no\_flat\_float\_array:bool -&gt;** **?int31:bool -&gt;** **?static:bool -&gt; ?no\_compression:bool -&gt; unit -&gt; t**

Returns the Zinc Runtime ID for the given parameters (using default values from **Config** and **Sys** as necessary)

*val make\_bytecode* : **?dev:bool -&gt;** **?release:int -&gt;** **?reserved:int -&gt;** **?no\_flat\_float\_array:bool -&gt;** **?int31:bool -&gt;** **?static:bool -&gt;** **?no\_compression:bool -&gt; ?ansi:bool -&gt; unit -&gt; t**

Returns the Bytecode Runtime ID for the given parameters (using default values from **Config** and **Sys** as necessary)

*val make\_native* : **?dev:bool -&gt;** **?release:int -&gt;** **?reserved:int -&gt;** **?no\_flat\_float\_array:bool -&gt;** **?fp:bool -&gt;** **?tsan:bool -&gt;** **?int31:bool -&gt;** **?static:bool -&gt;** **?no\_compression:bool -&gt; ?ansi:bool -&gt; unit -&gt; t**

Returns the Native Runtime ID for the given parameters (using default values from **Config** and **Sys** as necessary)

*val is\_zinc* : **t -&gt; bool**

**is\_zinc t** is true if **t** can be used as a Zinc Runtime ID

*val is\_bytecode* : **t -&gt; bool**

**is\_bytecode t** is true if **t** can be used as a Bytecode Runtime ID

*val is\_native* : **t -&gt; bool**

**is\_native t** is true if **t** can be used as a Native Runtime ID

*val to\_string* : **t -&gt; string**

Returns the 4-character representation of a **Misc.RuntimeID.t**

*val of\_string* : **string -&gt; t option**

Converts the 4-character representation back to a **Misc.RuntimeID.t**

*val ocamlrun* : **string -&gt; t -&gt; string**

**ocamlrun variant runtime\_id** returns the name for the runtime for the given Zinc Runtime ID.

*val shared\_runtime* : **?runtime\_id:t -&gt;** **?host:string -&gt; ?prefix:string -&gt; Sys.backend\_type -&gt; string**

**shared\_runtime ?runtime\_id ?host ?prefix backend** returns the name of the shared runtime for the given **backend** . **runtime\_id** defaults to **Misc.RuntimeID.make\_bytecode** if **backend = Sys.Bytecode** and **Misc.RuntimeID.make\_native** if **backend = Sys.Native** and **host** to **Config.target** . **prefix** defaults to **"-l"** and 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* : **?runtime\_id:t -&gt; ?host:string -&gt; string -&gt; string**

**stublibs ?runtime\_id ?host dllname** returns the name for the given DLL basename. **dllname** should not include **Config.ext\_dll** (and the result does not include it either). **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.

2026-10-01 OCamldoc

---

Document: Misc.RuntimeID(3o) from ocaml 5.5.1-r1 (Chainguard OS)
Source: https://github.com/ocaml/ocaml
