Global Options
These options are available for most commands (build, translate, run).
Output Configuration
Specify output directory for generated C++ files.Default: Current directoryExample:Generated files (
myprogram.cpp, myprogram.hpp) will be placed in ./generated/.Silent mode - suppress informational messages and only show warnings.Default: Useful for scripting and automated builds.
false (show all output)Example:Set debug logging level (1-3).Levels:
1- Basic debug information2- Detailed debug output3- Enables iterative flow analysis (IFA) debug logging
Compilation Mode
Generate a Python extension module instead of a standalone executable.Default: Creates a
false (generate executable)Example:.so (Linux), .dylib (macOS), or .pyd (Windows) file that can be imported from Python:Explicitly generate a standalone executable (this is the default behavior).Example:
Integer Type Options
Control the integer type used throughout the generated C++ code.Use 32-bit integers (
int32_t).Range: -2,147,483,648 to 2,147,483,647Effect: Smaller memory footprint, potential performance improvement on some architectures.Example:Use 64-bit integers (
int64_t).Range: -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807Effect: Larger range, default on most 64-bit systems.Example:Use 128-bit integers (
__int128).Range: Extremely large integers (±10³⁸)Platform: Linux and macOS only (not supported on Windows)Effect: Maximum integer range at performance cost.Example:Floating Point Type Options
Control the floating point precision used in generated code.Use 32-bit floating point numbers (
float, single precision).Precision: ~7 decimal digitsEffect: Better performance, lower memory usage, reduced precision.Use case: Graphics, game development, non-critical calculations.Example:Use 64-bit floating point numbers (
double, double precision).Precision: ~15 decimal digitsEffect: Higher accuracy, standard for scientific computing.Use case: Scientific computing, financial calculations, precise math.Example:Performance & Safety Options
These flags disable safety checks for improved performance.Disable bounds checking on array and list access.Default: Bounds checking enabledPerformance gain: 10-30% in array-heavy codeRisk: Buffer overflows, undefined behavior on out-of-bounds accessExample:
Disable wrap-around checking for negative indices.Default: Wrap-around checking enabledPerformance gain: 5-15% in code using negative indexingRisk: Incorrect behavior with negative indicesExample:
Disable assert statements in generated code.Default: Assertions enabledPerformance gain: Minimal, mostly code size reductionRisk: Loss of runtime validationExample:Useful for production builds where assertions are expensive.
Disable garbage collection.Default: Garbage collection enabled (Boehm GC)Effect: All allocations are permanent (memory leak risk)Use case: Short-lived programs, embedded systems with manual memory managementExample:
Print full traceback for uncaught exceptions.Default: Basic error messages onlyEffect: Shows stack trace when exceptions occur in compiled codeExample:Useful for debugging runtime errors in compiled programs.
Linking & Include Options
Add include directories for C++ compilation.Can be specified multiple timesExample:Adds
-I<DIR> to compiler flags.Add library directories for linking.Can be specified multiple timesExample:Adds
-L<DIR> to linker flags.Add libraries to link against.Can be specified multiple timesExample:Adds
-l<LIB> to linker flags.Add an extra directory for Shed Skin builtins library extensions.Example:Useful for custom implementations of Shed Skin built-in libraries.
CMake Options
These options are specific to thebuild and run commands.
Specify CMake build system generator.Common values:
"Unix Makefiles"(default on Linux/macOS)"Ninja"(faster builds)"Visual Studio 17 2022"(Windows)"Xcode"(macOS)
Build in parallel using N jobs.Default: Single-threaded buildExample:Significantly speeds up compilation of large projects.
Set CMake build type.Values:
Debug- No optimization, debug symbols, assertions enabledRelease- Full optimization (-O3), no debug symbolsRelWithDebInfo- Optimization with debug symbolsMinSizeRel- Optimize for size (-Os)
On Windows, defaults to
Release due to debug symbol availability issues.Reset CMake build directory before building.Effect: Removes Useful when CMake cache is corrupted or configuration changed significantly.
build/ directory and regenerates from scratchExample:Run ctest after building.Example:Automatically runs test suite after successful build.
Enable ccache for faster rebuilds.Requires: ccache installed on systemEffect: Caches compilation results for faster subsequent buildsExample:Can reduce rebuild time by 5-10x for unchanged files.
Build only specified CMake targets.Can specify multiple targetsExample:
Disable Useful when working with generated code that produces harmless warnings.
-Wall compilation warnings.Default: Warnings enabledExample:Dependency Management Options
Control how Shed Skin manages external dependencies.Build dependencies from bundled ext/ sources.Default: Automatically enabled if no other option specifiedExample:Uses dependencies bundled with Shed Skin installation.
Install CMake dependencies using SPM package manager.Example:Requires SPM to be installed and configured.
Install CMake dependencies using FetchContent.Effect: Downloads dependencies at configure timeExample:Useful for reproducible builds without pre-installed dependencies.
Translate-Specific Options
These options only apply to thetranslate command.
Directly compile translated code using generated Makefile.Example:Equivalent to:
Translate, compile, and run the executable.Example:Complete workflow in one command.
Disable Makefile generation (only generate C++ files).Example:Useful when integrating with custom build systems.
Specify alternate Makefile name.Default:
MakefileExample:Provide path to alternate Makefile flags file.Example:The flags file must exist or an error is raised.
Use static linking if possible.Effect: Creates standalone binaries with no external dependenciesExample:Useful for creating portable executables.
Only print compilation command without executing.Example:Shows what would be executed without actually compiling.
Disable cleanup of generated intermediate files.Example:Keeps all temporary files for inspection.
Statistics & Debugging
Collect and report detailed compilation statistics.Example:Shows:
- Prebuild time (parsing and analysis)
- Build time (C++ compilation)
- Run time (if applicable)
- Module statistics
Option Combinations
Maximum Performance
Maximum Safety (Debug)
Extension Module for Production
Portable Static Binary
See Also
- CLI Overview - Command reference
- build command - CMake workflow
- translate command - Makefile workflow