| import Config | |
| # Forge Code Configuration | |
| # ======================== | |
| config :forge, | |
| # Compiler settings | |
| compiler: [ | |
| # Default compiler flags | |
| flags: [], | |
| # Sandbox compilation | |
| sandbox: true, | |
| # Temporary directory | |
| temp_dir: Path.join([:code.priv_dir(:forge), "temp"]) | |
| ], | |
| # BEAM analysis settings | |
| beam: [ | |
| # Whether to parse debug info when available | |
| parse_debug_info: true, | |
| # Whether to parse line info when available | |
| parse_line_info: true, | |
| # Maximum recursion depth for analysis | |
| max_depth: 1000 | |
| ], | |
| # Binary parser settings | |
| binary_parser: [ | |
| # Preserve raw binary data | |
| preserve_binary: true, | |
| # Validate checksums | |
| validate_checksum: true, | |
| # Skip unknown sections | |
| skip_unknown: false | |
| ], | |
| # Provenance settings | |
| provenance: [ | |
| # Enable provenance chain tracking | |
| enabled: true, | |
| # Hash algorithm | |
| hash_algorithm: :sha256, | |
| # Store provenance in artifacts | |
| store_in_artifacts: true | |
| ], | |
| # Tournament settings | |
| tournament: [ | |
| # Default execution mode | |
| execution_mode: :process, | |
| # Default timeout (ms) | |
| default_timeout: 5000, | |
| # Default memory limit (bytes) | |
| default_memory_limit: 128 * 1024 * 1024, # 128 MB | |
| # Maximum number of contestants | |
| max_contestants: 100, | |
| # Maximum number of challenges per tournament | |
| max_challenges: 100, | |
| # Scoring weights (can be overridden per tournament) | |
| default_weights: %{ | |
| correctness: 1.0, | |
| execution_time: 0.3, | |
| memory: 0.2, | |
| compile_time: 0.1, | |
| binary_size: 0.1, | |
| instruction_count: 0.15, | |
| function_count: 0.05, | |
| constant_count: 0.05, | |
| complexity: 0.05 | |
| } | |
| ], | |
| # Logging settings | |
| logger: [ | |
| # Log level | |
| level: :info, | |
| # Log format | |
| format: "[$level] $message\n", | |
| # Log to file | |
| file: nil | |
| ], | |
| # CLI settings | |
| cli: [ | |
| # Default output format | |
| default_format: :text, | |
| # Verbose output | |
| verbose: false, | |
| # Debug output | |
| debug: false | |
| ] | |
| # Environment-specific overrides | |
| config :forge, :prod, | |
| compiler: [sandbox: true], | |
| tournament: [execution_mode: :sandbox] | |
| config :forge, :dev, | |
| compiler: [sandbox: false], | |
| tournament: [execution_mode: :process], | |
| logger: [level: :debug] | |
| config :forge, :test, | |
| compiler: [sandbox: false], | |
| tournament: [execution_mode: :direct, default_timeout: 10_000] | |