| 32 | } |
| 33 | |
| 34 | impl BuildManifest { |
| 35 | pub fn hosted(name: impl Into<String>, source: impl Into<String>) -> Self { |
| 36 | let name = name.into(); |
| 37 | Self { |
| 38 | root: BuildSource::inline(name.clone(), source), |
| 39 | name, |
| 40 | target: TargetMode::Hosted, |
| 41 | entry: None, |
| 42 | stdlib: StdlibPolicy::ForTarget, |
| 43 | import_closure: ImportClosurePolicy::Enabled { |
| 44 | mangle_symbols: true, |
| 45 | }, |
| 46 | source_prelude: None, |
| 47 | string_prefix: Some("_u_".to_owned()), |
| 48 | link_layout: None, |
| 49 | module_resolver: None, |
| 50 | artifact_root: None, |
| 51 | extra_objects: Vec::new(), |
| 52 | abi_exports: vec!["main".to_owned()], |
| 53 | run_semantic_analysis: false, |
| 54 | write_artifacts: false, |
| 55 | } |
| 56 | } |
| 57 | |