DEV Community

Hej Hdiss
Hej Hdiss

Posted on

🔁 Follow-up: PCL (Python-C Linked) Minimal Compiler/Runner + VS Code Extension

In my last post, I introduced PCL (Python-C Linked) - a minimal proof-of-concept compiler that allows combining C and Python code in a single .pcl file. It extracts C and Python blocks, compiles the C code into a shared object using gcc, auto-generates Python bindings using ctypes, and runs everything as a unified native+Python program with no external dependencies.
Now I'm excited to share the next step: a Visual Studio Code extension for PCL that streamlines the developer experience even further. The extension adds syntax highlighting for .pcl files, autocompletion, F5-run integration, and build/clean commands - all tightly integrated with the PCL CLI. It even supports .pyz onefile packaging for clean distribution. The extension detects if pcl is installed and gracefully handles errors, making it easy to get started.
This tooling is currently tested and supported only on Linux (e.g., Xubuntu 24.04), with dependencies limited to Python 3.7+ and GCC. While still early, it already supports function exports/imports, global variables, callbacks via CFUNCTYPE, and simple build workflows. There are known limitations - like basic struct/enum support, no deep C parsing, and Linux-only execution - but it serves as a solid base for experimentation.
I'm building this to simplify low-level extension development and bridge native C speed with Python flexibility in a clean, script-like format. If you're into compilers, embedded languages, or developer tooling, I'd love feedback or contributions!
👉 GitHub: https://github.com/hejhdiss/pcl and https://github.com/hejhdiss/pcl-vscode-extension
👉 VS Code Extension:https://marketplace.visualstudio.com/items?itemName=hejhdiss.pcl-language
📧 Contact: hejhdiss@gmail.com

python #cprogramming #opensource #vscode #compilerdesign #pcl #ctypes #devtools #linux #buildtools #lowlevel

Top comments (0)