(
sources: &SourcesManifest,
runtime_module: &Path,
runtime_archive: &Path,
pg_dump: &Path,
initdb: &Path,
runtime_support: &[BinaryPackage<'_>],
extensions: &[ExtensionPac
| 9037 | } |
| 9038 | |
| 9039 | fn write_asset_manifest( |
| 9040 | sources: &SourcesManifest, |
| 9041 | runtime_module: &Path, |
| 9042 | runtime_archive: &Path, |
| 9043 | pg_dump: &Path, |
| 9044 | initdb: &Path, |
| 9045 | runtime_support: &[BinaryPackage<'_>], |
| 9046 | extensions: &[ExtensionPackage<'_>], |
| 9047 | ) -> Result<()> { |
| 9048 | let runtime_link = read_wasm_link_metadata(runtime_module)?; |
| 9049 | let runtime_exports = wasm_export_name_set(&runtime_link); |
| 9050 | let extension_metadata = extension_catalog::manifest_metadata_by_sql_name()?; |
| 9051 | let manifest = AssetManifestOut { |
| 9052 | format_version: 1, |
| 9053 | runtime: RuntimeAssetOut { |
| 9054 | archive: "pglite.wasix.tar.zst".to_owned(), |
| 9055 | sha256: sha256_file(runtime_archive)?, |
| 9056 | module_sha256: sha256_file(runtime_module)?, |
| 9057 | postgres_version: "17.5".to_owned(), |
| 9058 | runtime_kind: "wasix-dynamic-main".to_owned(), |
| 9059 | link: runtime_link.clone(), |
| 9060 | }, |
| 9061 | runtime_support: runtime_support |
| 9062 | .iter() |
| 9063 | .map(|module| { |
| 9064 | Ok(BinaryAssetOut { |
| 9065 | name: module.name.to_owned(), |
| 9066 | path: module.runtime_path.to_owned(), |
| 9067 | sha256: sha256_file(module.path)?, |
| 9068 | module_sha256: sha256_file(module.path)?, |
| 9069 | size: fs::metadata(module.path) |
| 9070 | .with_context(|| format!("metadata {}", module.path.display()))? |
| 9071 | .len(), |
| 9072 | link: read_wasm_link_metadata(module.path)?, |
| 9073 | }) |
| 9074 | }) |
| 9075 | .collect::<Result<Vec<_>>>()?, |
| 9076 | pg_dump: Some(BinaryAssetOut { |
| 9077 | name: "pg_dump".to_owned(), |
| 9078 | path: "bin/pg_dump.wasix.wasm".to_owned(), |
| 9079 | sha256: sha256_file(pg_dump)?, |
| 9080 | module_sha256: sha256_file(pg_dump)?, |
| 9081 | size: fs::metadata(pg_dump) |
| 9082 | .with_context(|| format!("metadata {}", pg_dump.display()))? |
| 9083 | .len(), |
| 9084 | link: read_wasm_link_metadata(pg_dump)?, |
| 9085 | }), |
| 9086 | initdb: Some(BinaryAssetOut { |
| 9087 | name: "initdb".to_owned(), |
| 9088 | path: "bin/initdb.wasix.wasm".to_owned(), |
| 9089 | sha256: sha256_file(initdb)?, |
| 9090 | module_sha256: sha256_file(initdb)?, |
| 9091 | size: fs::metadata(initdb) |
| 9092 | .with_context(|| format!("metadata {}", initdb.display()))? |
| 9093 | .len(), |
| 9094 | link: read_wasm_link_metadata(initdb)?, |
| 9095 | }), |
| 9096 | pgdata_template: Some(pgdata_template_asset_out( |
no test coverage detected