46 lines
1.4 KiB
TOML
46 lines
1.4 KiB
TOML
|
|
# Cross-compilation configuration for Rustelo projects
|
||
|
|
# This file configures cross-compilation for different target platforms
|
||
|
|
|
||
|
|
[build]
|
||
|
|
# Default build configuration
|
||
|
|
default-target = "x86_64-unknown-linux-gnu"
|
||
|
|
|
||
|
|
[build.env]
|
||
|
|
# Global environment variables for all targets
|
||
|
|
passthrough = [
|
||
|
|
"RUSTELO_MODE",
|
||
|
|
"RUSTELO_TARGET",
|
||
|
|
"RUSTELO_ASSETS_DIR",
|
||
|
|
"NODE_ENV"
|
||
|
|
]
|
||
|
|
|
||
|
|
# Linux x86_64 target configuration
|
||
|
|
[target.x86_64-unknown-linux-gnu]
|
||
|
|
# Use custom Docker image with Node.js and Rust toolchain
|
||
|
|
image = "rustelo-cross:{{rust_version}}-node{{node_version}}"
|
||
|
|
|
||
|
|
# Docker build arguments
|
||
|
|
[target.x86_64-unknown-linux-gnu.env]
|
||
|
|
volumes = [
|
||
|
|
"{{project_root}}/node_modules_linux:/workspace/node_modules:Z",
|
||
|
|
"{{project_root}}/target-linux:/workspace/target:Z"
|
||
|
|
]
|
||
|
|
|
||
|
|
# Linux ARM64 target configuration (for Apple Silicon compatibility)
|
||
|
|
[target.aarch64-unknown-linux-gnu]
|
||
|
|
image = "rustelo-cross:{{rust_version}}-node{{node_version}}-arm64"
|
||
|
|
|
||
|
|
[target.aarch64-unknown-linux-gnu.env]
|
||
|
|
volumes = [
|
||
|
|
"{{project_root}}/node_modules_linux:/workspace/node_modules:Z",
|
||
|
|
"{{project_root}}/target-linux:/workspace/target:Z"
|
||
|
|
]
|
||
|
|
|
||
|
|
# Windows x86_64 target (optional)
|
||
|
|
[target.x86_64-pc-windows-gnu]
|
||
|
|
image = "rustelo-cross:{{rust_version}}-windows"
|
||
|
|
|
||
|
|
# macOS ARM64 (for CI/CD on different platforms)
|
||
|
|
[target.aarch64-apple-darwin]
|
||
|
|
# This typically runs natively, but can be configured for remote builds
|
||
|
|
image = "rustelo-cross:{{rust_version}}-macos"
|