--- trigger: always_on --- # Rule: Build uLib with Micromamba This rule provides instructions for building the uLib project using the micromamba environment. ## Context - **Environment**: micromamba `uLib` - **Output Directory**: `build` - **CPU Usage**: All available cores ## Instructions 1. **Environment Setup**: Ensure micromamba is properly initialized and the `uLib` environment is active. ```bash export MAMBA_EXE="/home/share/micromamba/bin/micromamba" export MAMBA_ROOT_PREFIX="/home/share/micromamba" export PRESET="clang-make" eval "$(${MAMBA_EXE} shell hook --shell bash)" micromamba activate uLib ``` 2. **Full Rebuild (if needed)**: If the `build` directory does not exist or a full reconfiguration is required: ```bash conan install . --output-folder=build/${PRESET} --build=missing --profile=fast cmake --preset ${PRESET} cmake --build build/${PRESET} -j$(nproc) ``` 3. **Incremental Build**: Run the build command from the root directory, pointing to the `build` folder and using all cores. ```bash cmake --build build/${PRESET} -j$(nproc) ``` 4. **Specific Target Build - gcompose**: To build a specific target (e.g., gcompose): ```bash cmake --build build/${PRESET} --target gcompose -j$(nproc) ```