Gilfeather/furnace

đź”§ Add configuration file support

Ouverte

#5 ouverte le 16 juil. 2025

 (0 commentaire) (0 réaction) (0 personne assignée)Rust (5 forks)auto 404
enhancementgood first issuehelp wanted

Métriques du dépôt

Stars
 (64 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

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

Guide contributeur