Gilfeather/furnace

🔧 Add configuration file support

Aberta

#5 aberto em 16 de jul. de 2025

 (0 comentário) (0 reação) (0 responsável)Rust (5 forks)auto 404
enhancementgood first issuehelp wanted

Métricas do repositório

Stars
 (64 estrelas)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

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

Guia do colaborador