mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 19:19:41 +00:00
- Updated build and run commands to accept a --target option for specifying target platforms. - Enhanced documentation to include cross-compilation usage and supported targets. - Modified configuration to allow target-specific settings and toolchains. - Introduced a new test command to run project tests with specified profiles and targets. - Improved handling of target directories and output structure for different platforms. - Added support for multiple targets in the configuration file. - Implemented inheritance for workspace and dependencies based on target and profile.
1.5 KiB
1.5 KiB
dcr.toml overview
dcr.toml is the main project file used by DCR.
Minimal generated template
[package]
name = "hello"
version = "0.1.0"
[build]
language = "c"
standard = "c11"
compiler = "clang"
kind = "bin"
[dependencies]
dcr new and dcr init generate this structure automatically.
Required sections
[package][build][dependencies]
Workspace-only root:
[workspace]can be added to a normal root config to define members and dependency order.- Root config still requires
[package],[build], and[dependencies].
Required keys
package.namepackage.versionbuild.languagebuild.standardbuild.compilerbuild.kind
build.kind must be either bin, staticlib, or sharedlib.
Optional keys
build.inheritbuild.targetsbuild.targetbuild.platformbuild.cflagsbuild.ldflagsbuild.excludebuild.includebuild.rootsbuild.src_disablebuild.pkg_configbuild.stepsbuild.post_stepsbuild.generatedbuild.expectbuild.cleanbuild.debugbuild.releasebuild.<target>(target-specific overrides)- dependency fields (
include,lib,libs,system) [toolchain]overrides (cc,cxx,as,ar,ld,uic,moc,rcc)[toolchain.<target>](target-specific toolchain)[workspace]members[workspace.<target>](target-specific workspace)[run]overrides (cmd)[run.<target>](target-specific run)