Gilfeather/furnace

🔧 Add configuration file support

オヌプン

#5 opened on 2025/07/16

 (0 件のコメント) (0 件のリアクション) (0 人の担圓者)Rust (5 件のフォヌク)auto 404
enhancementgood first issuehelp wanted

Repository metrics

Stars
 (64 個のスタヌ)
PR merge metrics
 (30d に merged PR はありたせん)

説明

Description

Add support for loading server configuration from a TOML file instead of only command-line arguments.

Acceptance Criteria

  • Create Config struct in new src/config.rs file
  • Support loading from furnace.toml file
  • Include settings: port, host, model_name, log_level, backend, max_concurrent_requests
  • Command-line args should override config file values
  • Add example furnace.toml file to repository
  • Update CLI help text to mention config file

Updated Configuration Items

Since the CLI has been updated to use built-in models, the config should include:

  • model_name (instead of model_path)
  • backend (cpu, wgpu, metal, cuda)
  • enable_kernel_fusion
  • enable_autotuning
  • max_concurrent_requests

Example furnace.toml

[server]
host = "127.0.0.1"
port = 3000
log_level = "info"
max_concurrent_requests = 100

[model]
name = "resnet18"
backend = "cpu"
enable_kernel_fusion = false
enable_autotuning = false

Implementation Guidance

  • Use the toml crate for parsing
  • Use serde for deserialization
  • Modify main.rs to check for config file before parsing CLI args
  • Use clap's value precedence features
  • Update for current CLI structure with --model-name

Estimated Difficulty

Medium - 1-2 days

コントリビュヌタヌガむド