Lightweight compiler/toolchain project with a canonical cross-platform CMake build and stable core targets for deterministic CI.
PyC currently focuses on stable build/link contracts and deterministic CI behavior:
pyc_core_obj: object library for stable core objects.pyc_core: canonical static library frompyc_core_obj.pyc_foundation: compatibility static library from the same objects.pyc: minimal deterministic executable used by smoke tests.
The next-generation compiler scaffolding is available behind PYC_BUILD_COMPILER_NEXT=ON.
Core/C_Files/: C sources.Core/Header_Files/: C headers..github/workflows/cmake-multi-platform.yml: canonical CI workflow.benchmark/: benchmark harness and workloads.AI/: linked AI bridge layer that applies optimization-policy contracts to compiler-next options.docs/: project docs, benchmarking, build/CI, performance reports.
- CMake
>= 3.10 - C compiler with C11 support
- Python 3 (for benchmark harness)
cmake -S . -B build
cmake --build build --parallel --target pyc pyc_core pyc_foundationLinux/macOS:
./build/pycWindows (multi-config generators):
.\build\Release\pyc.exeExpected output:
PyC CI driver: core targets configured successfully.
The project uses one canonical workflow: CI in .github/workflows/cmake-multi-platform.yml.
It runs on Ubuntu, macOS, and Windows, and performs:
- CMake configure
- Explicit build of
pyc,pyc_core,pyc_foundation - OS-specific smoke test for
pyc - Non-fatal
ctest
CI also enforces source coverage for active C sources (Core/C_Files, compiler, AI, tests/compiler_next): if a .c file is not referenced by CMakeLists.txt, the suite fails.
You do not need to rebuild everything from scratch locally on every push.
- Reuse the same
build/directory between edits. - Re-run
cmake --build build --parallelfor incremental builds. - CI runners are ephemeral, but Linux/macOS jobs now use
ccacheto reduce repeated compile time across runs.
PyC includes a deterministic benchmark harness for stable core targets.
Run:
python3 benchmark/harness.py --repeats 7 --micro-rounds 4000Outputs:
benchmark/results/latest.jsonbenchmark/results/latest.mddocs/performance-results.md
Build and run the deterministic CI driver:
cmake -S . -B build
cmake --build build --parallel --target pyc pyc_core pyc_foundation
./build/pycExpected output:
PyC CI driver: core targets configured successfully.
- Build
pyc_core:
cmake -S . -B build
cmake --build build --parallel --target pyc_core- In your C/C++ project:
- Add include path:
Core/Header_Files/ - Link static library:
build/libpyc_core.a(or platform-equivalent)
Use pyc_foundation only when downstream compatibility requires it.
Build and run the compiler-next smoke test:
cmake -S . -B build -D PYC_BUILD_COMPILER_NEXT=ON -D PYC_BUILD_COMPILER_NEXT_TESTS=ON
cmake --build build --parallel --target pyc_compiler_next pyc_compiler_next_smoke
./build/pyc_compiler_next_smokePublic interfaces:
include/pyc/compiler_api.hinclude/pyc/ir.hinclude/pyc/pass_manager.hinclude/pyc/runtime_allocator.hinclude/pyc/kernel_registry.hinclude/pyc/runtime_control.hinclude/pyc/ai_bridge.h
Release binaries are packaged and published by:
.github/workflows/release-binaries.yml
Assets are published per OS:
pyc-linux-x86_64.tar.gzpyc-macos-arm64.tar.gzpyc-windows-x86_64.zip
Static download page for end users:
index.html(usesstyles.cssandapp.jsat repo root)
When published with GitHub Pages, this page auto-detects OS and links the latest release asset.
- Stable CI/link targets are in place and cross-platform oriented.
- Experimental compiler pipeline is not yet part of stable CI guarantees.
- Benchmark harness is active for measuring build and runtime behavior of stable targets.
Start at docs/README.md.
Key docs:
docs/project-status.mddocs/build-and-ci.mddocs/benchmarking.mddocs/performance-results.mddocs/REPO_RULES.mddocs/compiler-next/runtime-integration-spec.md
CODE_OF_CONDUCT.mdCONTRIBUTING.mdSECURITY.mdSUPPORT.md.github/ISSUE_TEMPLATE/.github/pull_request_template.md
Licensed under Apache 2.0. See LICENSE.