()
| 7773 | } |
| 7774 | |
| 7775 | fn wasix_export_list_text() -> Result<String> { |
| 7776 | if Path::new(WASIX_BUILD_MANIFEST_PATH).exists() { |
| 7777 | let manifest = read_build_output_manifest()?; |
| 7778 | return wasix_export_list_from_modules(&manifest.modules); |
| 7779 | } |
| 7780 | if Path::new(GENERATED_ASSETS_DIR) |
| 7781 | .join("manifest.json") |
| 7782 | .exists() |
| 7783 | { |
| 7784 | let manifest = read_asset_manifest()?; |
| 7785 | let modules = build_output_modules_from_asset_manifest(&manifest); |
| 7786 | return wasix_export_list_from_modules(&modules); |
| 7787 | } |
| 7788 | |
| 7789 | let outputs = BuildOutputs::discover()?; |
| 7790 | let modules = outputs |
| 7791 | .modules |
| 7792 | .iter() |
| 7793 | .map(|module| { |
| 7794 | Ok(BuildModuleManifestOut { |
| 7795 | name: module.name.clone(), |
| 7796 | kind: module.kind.clone(), |
| 7797 | path: module.path.to_string_lossy().into_owned(), |
| 7798 | sha256: String::new(), |
| 7799 | link: read_wasm_link_metadata(&module.path)?, |
| 7800 | }) |
| 7801 | }) |
| 7802 | .collect::<Result<Vec<_>>>()?; |
| 7803 | wasix_export_list_from_modules(&modules) |
| 7804 | } |
| 7805 | |
| 7806 | fn read_build_output_manifest() -> Result<BuildOutputManifestOut> { |
| 7807 | let path = Path::new(WASIX_BUILD_MANIFEST_PATH); |
no test coverage detected