lean4-htt/tests/compiler/foreign
Sebastian Ullrich 425bebe99e
chore: further split libleanshared on Windows to avoid symbol limit (#10136)
Co-authored-by: Markus Himmel <markus@himmel-villmar.de>
2025-08-26 16:01:57 +00:00
..
Main chore: fix tests 2022-06-14 17:27:13 -07:00
.gitignore feat: support Lake for building Lean core oleans (#3886) 2024-06-13 16:18:24 +00:00
Main.lean test: --load-dynlib 2021-11-04 15:32:07 -07:00
Makefile chore: further split libleanshared on Windows to avoid symbol limit (#10136) 2025-08-26 16:01:57 +00:00
myfuns.cpp test: fix foreign function signatures 2022-07-29 14:10:15 +02:00
README.md test: --load-dynlib 2021-11-04 15:32:07 -07:00

Small project implemented using Lean and C++. The C++ file myfuns.cpp wraps a C++ object using an lean_external_object. The file myfuns.cpp exposes pure and effectful primitives. The file Main.lean contains a small Lean program that uses the exported primitives.

Build instructions

Assuming the Lean bin/ directory (e.g. from build/release/stage1) is in your PATH, executing leanmake build/bin/test will create the executable build/bin/test; see the Makefile for further variants.

The executable build/bin/test should produce the output

30
hello
foobla
world