MCPcopy Index your code
hub / github.com/algoscienceacademy/RustUI / load_project_config

Method load_project_config

src/dev_server.rs:311–327  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

309 }
310
311 fn load_project_config(&self) -> Result<ProjectConfig, Box<dyn std::error::Error>> {
312 let config_path = Path::new("rust-native.toml");
313 if config_path.exists() {
314 let content = fs::read_to_string(config_path)?;
315 Ok(toml::from_str(&content)?)
316 } else {
317 // Default config
318 Ok(ProjectConfig {
319 name: self.detect_project_name()?,
320 target_platforms: vec![Platform::Desktop],
321 build_command: None,
322 ios_config: IOSConfig::default(),
323 android_config: AndroidConfig::default(),
324 web_config: WebConfig::default(),
325 })
326 }
327 }
328
329 fn detect_project_name(&self) -> Result<String, Box<dyn std::error::Error>> {
330 let cargo_toml = fs::read_to_string("Cargo.toml")?;

Callers 2

start_web_serverMethod · 0.80

Calls 1

detect_project_nameMethod · 0.80

Tested by

no test coverage detected