| Crates.io | cmdpal-packaging |
| lib.rs | cmdpal-packaging |
| version | 0.2.1 |
| created_at | 2025-06-23 06:46:33.687178+00 |
| updated_at | 2025-10-25 07:03:16.859614+00 |
| description | Buld-time packaging helpers for cmdpal |
| homepage | |
| repository | https://github.com/BlueGlassBlock/cmdpal-rs |
| max_upload_size | |
| id | 1722453 |
| size | 54,700 |
A simple build-script helper crate for cmdpal-rs.
Getting your home-baked (using Rust in this case) Command Palette extension to work with Windows is a bit of a hassle.
First, you have to obtain an AppxManifest.xml file to instruct the system to register your COM extension GUIDs,
and invoke your server.
At runtime, a Microsoft.CommandPalette.Extensions.winmd binary file is required to make Command Palette program communicate with your extension.
This crate provides helpers to generate the two files.
To use this crate, add it to your Cargo.toml:
[build-dependencies]
cmdpal-packaging = "0.2"
Then, in your build.rs:
fn main() {
cmdpal_packaging::generate_winmd().unwrap();
cmdpal_packaging::AppxManifestBuilder::new()
.id("YourName.YourExtension")
.display_name("A Cool Extension")
.publisher_display_name("CN=xxxxxxxx")
.class_u128(GUID, None)
.executable("your_cool_extension.exe")
.build()
.write_xml()
.unwrap();
}
After building, you can run Add-AppxPackage -Path ./AppxManifest.xml -Register in PowerShell, under your extension's target directory,
to register your extension and test it out.
If you are getting rust-analyzer warnings, it is likely because the winmd file is occupied when the extension is running. You can safely ignore errors in that case.