Skip to content

Commit e6157b9

Browse files
authored
doc: mention precompileModules (#907)
1 parent 9647a97 commit e6157b9

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎Manual/Runtime.lean‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,8 @@ To run this code (e.g. with {keywordOf Lean.Parser.Command.eval}`#eval`), the fo
520520
1. The module containing the declaration and its dependencies must be compiled into a shared library
521521
1. This shared library should be provided to `lean --load-dynlib=` to run code that imports the module.
522522

523+
The `precompileModules` {ref "lake-config"}[configuration option] instructs Lake to do the above automatically.
524+
523525
It is not sufficient to load the foreign library containing the external symbol because the interpreter depends on code that is emitted for each {attr}`extern` declaration.
524526
Thus it is not possible to interpret an {attr}`extern` declaration in the same file.
525527
The Lean source repository contains an example of this usage in [`tests/compiler/foreign`](https://github.com/leanprover/lean4/tree/master/tests/compiler/foreign/).

0 commit comments

Comments
 (0)