Scaffold and build Python C extensions with CMake and just-buildit.
Project description
Getting an algorithm right is paramount. Yet it's rarely the bottleneck. Turning it into shippable code — a tested C library, a Python binding, a build system, packaging, and a public C API that Rust or C++ can also link — is the tedious, exacting work that repeats on every project.
just-makeit new scaffolds the whole thing in one command: core C library, thin
Python binding, CMake build system, and full test coverage — all passing before
you write a single line of your algorithm.
Try it now!
Click the badge to launch a pre-built sandbox in your browser — no install, no
compiler, no Docker required. You'll land in a GitHub Codespaces environment
with just-makeit installed, all twenty bundled examples already scaffolded and
compiled, and a terminal ready to go. Run an example end-to-end, browse the
generated C and Python source, or start a fresh project with
just-makeit new.
Quickstart
curl (auto-installs dependencies, creates and activates venv):
. <(curl -fsSL https://just-buildit.github.io/just-makeit/install.sh) [-- path]
pip:
pip install just-makeit && just-makeit install-deps [-- path]
uv:
uv tool install just-makeit && just-makeit install-deps [-- path]
Docker (no install needed):
docker run --rm -it ghcr.io/just-buildit/jm-examples-linux:latest
Quick examples
Simple standalone extension:
just-makeit new my_project --object engine --state gain:double:1.0
cd my_project && make && make test
Module subpackage — multiple types in one .so:
just-makeit new my_filters --module filter
cd my_filters
just-makeit object fir --module filter \
--state "coeffs:float[16]" --state "delay:float _Complex[16]" --state "gain:float:1.0"
just-makeit object biquad --module filter \
--arg-type float --return-type float \
--state "b0:double:1.0" --state "b1:double:0.0" --state "a1:double:0.0"
make && make test
from my_filters.filter import Fir, Biquad # one .so, one import
What you get
my_project/
├── native/
│ ├── inc/engine/engine_core.h # public C API + inline step()
│ ├── src/engine/
│ │ ├── engine_core.c # block processor + lifecycle
│ │ └── engine_ext.c # thin Python binding
│ └── tests/test_engine_core.c # CTest
├── src/my_project/
│ ├── engine.pyi # type stub
│ └── tests/test_engine.py # pytest / unittest
├── cmake/my-project.pc.in # pkg-config template
├── CMakeLists.txt
├── Makefile
├── just-makeit.toml
└── jb.toml # tool + system-dep manifest (jbx install-deps)
C API
engine_state_t *engine_create(double gain);
void engine_destroy(engine_state_t *state);
void engine_reset(engine_state_t *state);
static inline float complex
engine_step(const engine_state_t *state, float complex x);
void engine_steps(engine_state_t *state,
const float complex *in, float complex *out, size_t n);
double engine_get_gain(const engine_state_t *state);
void engine_set_gain(engine_state_t *state, double gain);
Python API
from my_project import Engine
import numpy as np
obj = Engine(gain=2.0)
y = obj.step(1.0 + 0.5j)
x = np.ones(1024, dtype=np.complex64)
y = obj.steps(x) # allocates output ndarray
obj.steps(x, out=y) # zero-copy
obj.set_gain(0.5)
obj.reset()
with Engine() as e:
y = e.steps(x)
Requirements
- Python 3.9+
- CMake ≥ 3.16
- A C99 compiler (GCC, Clang, MSVC/MinGW)
- NumPy (runtime, for generated projects)
Authors
Matthew T. Hunter, Ph.D. and Claude Code
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file just_makeit-0.19.0-py3-none-any.whl.
File metadata
- Download URL: just_makeit-0.19.0-py3-none-any.whl
- Upload date:
- Size: 567.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc1368cdb9d75a1c5a2bae2f0dd9bda6188b60ddb94ff99bee49289cdb02d7c7
|
|
| MD5 |
0fa682219f32c2fe02952dd6facb1245
|
|
| BLAKE2b-256 |
1e2867dbe8f0727a3909d9547afee55237b7ba2f6677189804e7daadf98e719d
|
Provenance
The following attestation bundles were made for just_makeit-0.19.0-py3-none-any.whl:
Publisher:
release.yml on just-buildit/just-makeit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
just_makeit-0.19.0-py3-none-any.whl -
Subject digest:
cc1368cdb9d75a1c5a2bae2f0dd9bda6188b60ddb94ff99bee49289cdb02d7c7 - Sigstore transparency entry: 1781745896
- Sigstore integration time:
-
Permalink:
just-buildit/just-makeit@a1df0509dc8ebd45a9c93b024db534c49cf6dbde -
Branch / Tag:
refs/tags/v0.19.0 - Owner: https://github.com/just-buildit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a1df0509dc8ebd45a9c93b024db534c49cf6dbde -
Trigger Event:
push
-
Statement type: