pub fn plugin_catalog(package_root: &Path) -> Result<PluginCatalog, HostError>Expand description
Read both plugin locks under package_root into one catalogue.
把 package_root 下的两份插件锁读成一份目录。
A missing directory or a missing file is an empty catalogue, not a failure: a package that links no plugin has no lock, and that absence is safe because the lock check is what refuses an unlisted official plugin — the digest and signature checks still run for everything the host does admit. 目录或文件缺失都是空目录,而不是失败:不链接任何插件的包没有锁,而这种缺失是安全的,因为拒绝 未登记的官方插件靠的正是锁检查——宿主真正准入的每个工件仍然要过摘要与签名检查。