Expand description
Runtime initialization and thread attachment.
These symbols are exported by libleanshared but not declared in
lean.h (they are part of Lean’s runtime entry-point surface, not the
object-ABI header). The LEAN_HEADER_DIGEST build check therefore does
not gate them; instead they are protected by REQUIRED_SYMBOLS plus
tests/linkage.rs, which fails to link if any are missing.
Functions§
- lean_
finalize_ ⚠task_ manager - Stop the Lean task manager and join all workers (
lean.h:1274). - lean_
finalize_ ⚠thread - Detach the current OS thread from the Lean runtime.
- lean_
init_ ⚠task_ manager - Start the Lean task manager with a runtime-chosen number of worker
threads (
lean.h:1272). - lean_
init_ ⚠task_ manager_ using - Start the Lean task manager with the requested number of worker
threads (
lean.h:1273). - lean_
initialize ⚠ - Initialize the Lean runtime. Must be called exactly once per process before any other Lean-runtime entry point. The C signature in the runtime accepts no arguments.
- lean_
initialize_ ⚠runtime_ module - Initialize the runtime module (compact regions, persistent objects).
Must be called after
lean_initializeand before invoking any compiled Lean module’sinitentry point. - lean_
initialize_ ⚠thread - Attach the current OS thread to the Lean runtime so it may invoke
compiled Lean code. Each thread that calls into Lean must pair this
with
lean_finalize_threadbefore exiting. - lean_
setup_ ⚠args - Install the process command-line arguments for
System.Args.argvmust outlive any Lean code that reads the arguments.