Skip to content

mlc-ai/z3-staticlib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

z3-staticlib

z3-staticlib is a Python package that carries Z3 native development artifacts:

  • Z3 C and C++ headers, including z3.h and z3++.h.
  • A PIC static Z3 library: libz3.a on Unix-like platforms or *.lib on Windows.
  • Z3 CMake package files under static/lib/cmake/z3.
  • Z3 pkg-config metadata under static/lib/pkgconfig when available.

It does not publish Z3 Python bindings. The Python package exists so build systems can locate the native static library and headers.

Local Build

python -m pip install build
STATICLIB_Z3_TAG=z3-4.16.0 python -m build --wheel

For local staging without building a wheel:

rm -rf build/local-package build/local-z3

STATICLIB_Z3_TAG=z3-4.16.0 \
STATICLIB_Z3_PACKAGE_DIR="$PWD/build/local-package/z3_staticlib" \
STATICLIB_Z3_BUILD_ROOT="$PWD/build/local-z3" \
uv run --no-project \
  --with packaging \
  --with cmake \
  --with ninja \
  python scripts/z3_staticlib_builder.py

Smoke Test

repo="$PWD"
tmpdir="$(mktemp -d)"

(
  cd "$tmpdir"
  PYTHONPATH="$repo/build/local-package" \
    python "$repo/scripts/smoke_test_staticlib.py"
)

rm -rf "$tmpdir"

The smoke test imports z3_staticlib, locates the packaged CMake prefix, builds a tiny C++ executable, includes z3++.h, and links against z3::libz3.

Release

Run the Publish Z3 static wheels workflow manually with publish=false first. After the dry run succeeds, rerun it with publish=true.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages