Build Single Module
What You'll Accomplish
Compile a module and generate its artifacts, automatically handling dependencies in the correct order.
Prerequisites
Required Knowledge
New to r2r modules? Learn these concepts first: - Your First Module - Understand module structure and contracts - Building and Testing Changes - Efficient build workflows
Required Setup
- Module contract exists (module.yml)
- Dependencies are buildable
- Required build tools installed (Go, etc.)
Steps
1. Build the Module
What happens:
- Resolves dependencies
- Builds dependencies first
- Compiles src-auth
- Generates artifacts
2. Verify Build Succeeded
What happens: Shows build artifacts with paths and sizes
3. Validate Artifacts Exist
What happens: Checks all required artifacts are present
Build Options
# Build with version info
r2r eac build src-auth --version v1.2.0
# Build with compression
r2r eac build src-auth --compressed
# Build for specific OS
r2r eac build src-auth --os linux
Example Scenario
You've made changes to src-auth and want to build it for testing:
# Build the module
r2r eac build src-auth
# Output:
# Building dependencies...
# ✓ eac-core (cached)
# Building src-auth...
# ✓ Compiled successfully
# ✓ Artifacts: out/bin/src-auth
# Verify artifacts
r2r eac show artifacts src-auth
# Run the built binary
./out/bin/src-auth --version
Common Issues
| Problem | Solution |
|---|---|
| "Dependency not built" | Build dependency first or build all |
| Build fails | Check error output, ensure tools installed |
| Artifacts missing | Run validate artifacts for details |
Next Steps
- Run Tests for Module → Test your changes
- Build Changed Modules → Efficient CI builds
Related Commands
build- Full command referenceshow artifacts- View artifactsvalidate artifacts- Verify artifacts
Tutorials | How-to Guides | Explanation | Reference
You are here: How-to Guides — task-oriented recipes that guide you through solving specific problems.