This guide will help you build and run your first portable executable with UBuilder.
Before you begin, ensure you have:
- CMake 3.16+ - Build system
- C Compiler - GCC 7+, Clang 6+, or MSVC 2019+
- Target Runtime - At least one of: PHP 7.4+, Python 3.7+, Node.js 14+
| Platform | Minimum | Recommended |
|---|---|---|
| Linux | Ubuntu 18.04+ | Ubuntu 20.04+ |
| macOS | 10.15+ | 12.0+ |
| Windows | Windows 10 | Windows 11 |
# Clone and enter directory
git clone https://github.com/yourorg/ubuilder.git
cd ubuilder
# Create build directory
mkdir build && cd build
# Configure and build
cmake ..
make -j$(nproc)
# Verify build
./src/ubuilder --versionmkdir build && cd build
cmake -DBUILD_TESTS=ON ..
make -j$(nproc)
make testUBuilder works with existing applications in these structures:
my-php-app/
├── main.php # Entry point (or index.php)
├── config.php # Configuration
├── lib/ # Libraries
│ ├── database.php
│ └── utils.php
└── data/ # Data files
└── config.json
my-python-app/
├── main.py # Entry point
├── requirements.txt # Dependencies (optional)
├── modules/ # Local modules
│ ├── __init__.py
│ ├── core.py
│ └── utils.py
└── assets/ # Resources
└── data.json
my-node-app/
├── main.js # Entry point (or index.js)
├── package.json # Package definition
├── lib/ # Libraries
│ ├── server.js
│ └── routes.js
└── public/ # Static files
└── style.css
# PHP Application
./build/src/ubuilder \
--project-dir=./examples/php-hello \
--runtime=php \
--output=my-app
# Python Application
./build/src/ubuilder \
--project-dir=./examples/python-hello \
--runtime=python \
--output=my-app
# Node.js Application
./build/src/ubuilder \
--project-dir=./examples/node-hello \
--runtime=node \
--output=my-app# Custom entry point
./build/src/ubuilder \
--project-dir=./my-app \
--runtime=php \
--entry-point=bootstrap.php \
--output=my-app
# Verbose output for debugging
./build/src/ubuilder \
--project-dir=./my-app \
--runtime=python \
--output=my-app \
--verbose# Check the executable size
ls -lh my-app
# Run your portable application
./my-app
# Test on different machines (copy and run)
scp my-app user@remote-server:
ssh user@remote-server './my-app'Your executable is now completely portable:
✅ No runtime dependencies - Works on any compatible system
✅ Single file - Easy to distribute and deploy
✅ Self-contained - Includes everything needed to run
# View file structure
file my-app
# Check runtime embedding (should show embedded runtime calls)
strace -f -e execve ./my-app 2>&1 | grep runtime_binary# Startup time
time ./my-app --version
# Memory usage
/usr/bin/time -v ./my-appCMake not found:
# Ubuntu/Debian
sudo apt-get install cmake
# macOS
brew install cmake
# Windows
# Download from https://cmake.org/download/Compiler errors:
# Install build tools (Ubuntu)
sudo apt-get install build-essential
# Install Xcode tools (macOS)
xcode-select --installRuntime not detected:
# Check if runtime is installed and in PATH
which php python3 node
# Install missing runtimes
sudo apt-get install php-cli python3 nodejs # Ubuntu
brew install php python node # macOSExecutable won't run:
# Check permissions
chmod +x my-app
# Check architecture compatibility
file my-app
uname -m- 📖 CLI Reference - Complete command documentation
- 🏗️ Architecture - How UBuilder works internally
- 💡 Examples - Real-world usage examples
- 🔧 Advanced Usage - Power user features
- 🐛 Issues - Report bugs
- 💡 Discussions - Ask questions
- 📖 Wiki - Community docs