Skip to main content

Module worker

Module worker 

Source
Expand description

Background JIT and AOT compilation workers.

Each worker thread owns a long-lived EvmCompiler instance tied to its thread-local LLVM context.

With ORCv2, JIT code lifetime is managed per-module via ResourceTrackers. Each successful JIT compilation extracts the committed module’s tracker and returns it as a JitCodeBacking, which frees the machine code on drop. Workers no longer need to stay alive for code lifetime β€” they exit as soon as the job channel closes.

StructsΒ§

AotSuccess πŸ”’
Successful AOT compilation output.
CompileJob πŸ”’
A compilation job sent from the backend to a worker.
CompilerState πŸ”’ llvm
JitCodeBacking πŸ”’
Owns JIT-compiled machine code via an ORCv2 ResourceTracker and a [JitDylibGuard].
JitSuccess πŸ”’
Successful JIT compilation output.
SyncNotifier πŸ”’
Notifier for synchronous compilation requests.
WorkerPool πŸ”’
Handle to the worker pool.
WorkerResult πŸ”’
Result of a compilation attempt, sent back from a worker to the backend.

EnumsΒ§

WorkerSuccess πŸ”’
Successful compilation output.

ConstantsΒ§

AOT_COMPILER πŸ”’
JIT_COMPILER πŸ”’

FunctionsΒ§

clear_thread_local_compilers πŸ”’ llvm
compile_aot_artifact πŸ”’ llvm
Compiles a single bytecode to a shared library and returns the raw bytes.
compile_jit_artifact πŸ”’ llvm
compile_job πŸ”’ llvm
compile_with_state πŸ”’ llvm
create_compiler πŸ”’ llvm