This document provides detailed information about how CE Library Wizard handles each supported language.
C library support uses the same infrastructure as C++ libraries, leveraging ce_install cpp-library commands to add libraries to both c.amazon.properties and libraries.yaml.
- Library Addition: Uses
ce_install cpp-library addto add the library tolibraries.yaml - Property Generation: Runs
ce_install generate-linux-propsto updatec.amazon.properties - File Updates:
bin/yaml/libraries.yamlin the infra repositoryetc/config/c.amazon.propertiesin the main repository
./run.sh --lang=c --lib=https://github.com/libuv/libuv --ver=1.46.0- shared: Shared libraries that need to be linked at runtime
- header-only: Header-only libraries without compilation requirements
- static: Static libraries linked at compile time
Rust library support is fully automated using Compiler Explorer's ce_install utilities.
- Library Addition: Uses
ce_install add-crateto add the library tolibraries.yaml - Property Generation: Runs
ce_install generate-rust-propsto create properties - File Updates:
bin/yaml/libraries.yamlin the infra repositoryetc/config/rust.amazon.propertiesin the main repository (libs section only)
# Single crate
./run.sh --lang=rust --lib=serde --ver=1.0.195
# Multiple versions
./run.sh --lang=rust --lib=serde --ver=1.0.193,1.0.194,1.0.195
# Top 100 Rust crates (bulk addition)
./run.sh --top-rust-cratesThe tool supports adding the top 100 Rust crates using the add-top-rust-crates ce_install command:
- Adds approximately 100 popular crates from crates.io
- Creates a single large PR for all crates
- Includes proper versioning and dependency information
- Valid crate name from crates.io
- Semantic version number
C++ support includes automatic library type detection and comprehensive property generation.
- packaged-headers: Libraries with CMakeLists.txt that need compilation
- header-only: Header-only libraries without build requirements
- Type Detection: Clones repository and checks for CMakeLists.txt
- ID Generation: Converts GitHub URL to valid library ID (e.g.,
fmtlib/fmt→fmt) - Library Addition: Uses
ce_install cpp-library add - Property Generation:
- Linux properties with
generate-linux-props - Windows properties with
generate-windows-props
- Linux properties with
The --install-test flag validates that the library can be installed:
./run.sh --lang=c++ --lib=https://github.com/fmtlib/fmt --ver=10.2.1 --install-testRequirements:
- Linux or macOS only
/opt/compiler-explorerdirectory with write permissions
# Basic addition
./run.sh --lang=c++ --lib=https://github.com/nlohmann/json --ver=3.11.3
# Multiple versions
./run.sh --lang=c++ --lib=https://github.com/nlohmann/json --ver=3.11.1,3.11.2,3.11.3
# With installation test
./run.sh --lang=c++ --lib=https://github.com/fmtlib/fmt --ver=10.2.1 --install-testFortran support is designed for FPM (Fortran Package Manager) packages.
- Repository must contain
fpm.tomlfile - Valid FPM package structure
- Validation: Clones repository and verifies
fpm.tomlexists - Library Addition: Uses
ce_install fortran-library add - Property Updates:
- Creates library-specific property entries (CE auto-discovers libraries from
libs.<id>.*keys)
- Creates library-specific property entries (CE auto-discovers libraries from
# Single version
./run.sh --lang=fortran --lib=https://github.com/jacobwilliams/json-fortran --ver=8.5.0
# Multiple versions
./run.sh --lang=fortran --lib=https://github.com/jacobwilliams/json-fortran --ver=8.4.0,8.5.0libs.json-fortran.url=https://github.com/jacobwilliams/json-fortran
libs.json-fortran.versions=8.5.0:8.4.0Go support handles Go modules that are built using the gomod build type. Libraries are identified by their Go module path (e.g., github.com/google/uuid).
- Valid Go module path
- Version must be a valid Go module version (typically with
vprefix, e.g.,v1.6.0) - Module must be available on the Go module proxy (proxy.golang.org)
- Library Addition: Adds the module to
libraries.yamlwithbuild_type: gomod - Property Updates:
- Creates library-specific property entries with
lookupname,packagedheaders=true(CE auto-discovers libraries fromlibs.<id>.*keys)
- Creates library-specific property entries with
Some Go modules have a non-importable root package (e.g., google.golang.org/protobuf). In these cases, the wizard:
- Auto-detects the best importable subpackage by downloading the module zip from the Go proxy
- Sets the
import_pathfield inlibraries.yaml(e.g.,google.golang.org/protobuf/proto)
You can also manually specify the import path with --import-path:
./run.sh --lang=go --lib=google.golang.org/protobuf --ver=v1.36.0 --import-path=google.golang.org/protobuf/protoIf you pass a subpackage path as --lib (e.g., google.golang.org/protobuf/proto), the wizard automatically resolves it to the actual module root (google.golang.org/protobuf) and sets the original path as the import_path.
# Single version
./run.sh --lang=go --lib=github.com/google/uuid --ver=v1.6.0
# Multiple versions
./run.sh --lang=go --lib=google.golang.org/protobuf --ver=v1.34.1,v1.36.0
# With explicit import path
./run.sh --lang=go --lib=google.golang.org/protobuf --ver=v1.36.0 --import-path=google.golang.org/protobuf/proto
# Passing a subpackage path (auto-resolves to module root)
./run.sh --lang=go --lib=google.golang.org/protobuf/proto --ver=v1.36.0libs=uuid:protobuf:errors
libs.uuid.name=google/uuid
libs.uuid.url=https://github.com/google/uuid
libs.uuid.lookupname=go_uuid
libs.uuid.packagedheaders=true
libs.uuid.versions=v160
libs.uuid.versions.v160.version=v1.6.0go:
uuid:
build_type: gomod
module: github.com/google/uuid
targets:
- v1.6.0
type: gomod
protobuf:
build_type: gomod
import_path: google.golang.org/protobuf/proto
module: google.golang.org/protobuf
targets:
- v1.36.0
type: gomod- Uses Go module path instead of GitHub URL for identification
- All Go libraries use
packagedheaders=true - Uses
lookupnamewithgo_prefix (e.g.,go_uuid) - No
staticliblinkorpathfields needed - Version keys strip non-alphanumeric characters (e.g.,
v1.6.0->v160)
All languages follow these naming conventions:
- Lowercase letters, numbers, and underscores only
- Must start with a letter
- Convert hyphens to underscores
- Remove special characters
Examples:
fmt-lib→fmt_libJSON-for-Modern-C++→json_for_modern_cppboost-asio→boost_asio
Preferred format: MAJOR.MINOR.PATCH
- Examples:
1.0.0,2.3.1,10.2.1
Comma-separated versions:
- Examples:
1.0.0,1.0.1,1.0.2 - Interactive: Enter versions separated by commas
- CLI flag:
--ver=1.0.0,1.0.1,1.0.2
- Prefixed versions:
v1.0.0 - Date-based:
2024.01.15 - Git references:
main,develop - Commit hashes:
abc123def456
When multiple versions are specified:
- Each version is processed sequentially
- Individual PRs are created for each version
- Progress is shown for each version
- If one version fails, the process continues with remaining versions
- C++:
etc/config/c++.amazon.properties - Rust:
etc/config/rust.amazon.properties - Fortran:
etc/config/fortran.amazon.properties - Go:
etc/config/go.amazon.properties
- Properties are generated/updated automatically
- The
libs=line is updated to include new libraries - Version-specific entries are added
To add a new language:
- Create a handler class in
core/{language}_handler.py - Update the
Languageenum incore/models.py - Add processing function in
cli/main.py - Update CLI argument choices
- Document the requirements and process
See the Contributing Guide for detailed instructions.