MPK Package Manifest Contract v1#
Scope#
This document specifies the .mpk application package format used to deploy MuduDB stored procedures. An .mpk file is a ZIP archive containing app metadata, schema DDL, procedure descriptors, initial data SQL, and one or more Wasm component modules.
Version history#
Version |
Date |
Summary |
|---|---|---|
1 |
2026-6-25 |
Initial manifest with |
Archive contents#
A valid .mpk archive contains at least the following entries:
Entry |
Required |
Description |
|---|---|---|
|
Yes |
App metadata ( |
|
Yes |
Procedure/module descriptor ( |
|
Yes |
Schema DDL statements. |
|
Packager: Yes; loader: No |
Initial data SQL statements. The packager emits this entry, but the current loader accepts packages where it is missing or empty. |
|
No |
Forward/backward-compat manifest. |
|
Packager: Yes; loader: No |
One or more Wasm component modules. The current loader collects modules when present but does not reject an archive with no modules. |
package.cfg.json#
A JSON object with the following fields:
Field |
Type |
Description |
|---|---|---|
|
string |
Application name. |
|
string |
Source language (e.g., |
|
string |
Application version (semantic string, not the format version). |
|
boolean |
Whether the app uses the async ABI. |
package.manifest.json#
A JSON object with the following fields:
Field |
Type |
Description |
|---|---|---|
|
integer |
Package manifest format version. Current value: |
|
array of strings |
List of files present in the archive. Must include all required entries. |
Integrity mechanisms#
Manifest presence: if a manifest is present, the loader validates
format_version.Format version check: the loader rejects
format_versionvalues other than1.Manifest file list: if a manifest is present, the loader verifies that
filescontainspackage.cfg.json,package.desc.json,ddl.sql, andinitdb.sql.Runtime required entries: independently of the manifest, the current loader rejects missing
package.cfg.json, missingpackage.desc.json, and missing or emptyddl.sql.Module alignment: if the package contains exactly one
.wasmfile and the descriptor contains exactly one module, the loader aligns the module name to the descriptor.
Compatibility matrix#
Reader \ Writer |
no manifest |
v1 manifest |
|---|---|---|
current |
Accepted (legacy) |
Compatible |
Packages without a manifest are still accepted but are considered legacy. New packages must include a v1 manifest.
Upgrade and rollback rules#
Upgrade: A future v2 manifest may add new required or optional fields. V2 writers must bump
format_versionand continue to include all v1-required files.Rollback: A v1-only loader opening a v2 package rejects it with
UnsupportedFormatVersionand does not extract or execute any archive contents.Migration: V1 → V2 migration is a packaging-time transformation. No runtime migration is required.
Deprecation policy#
Version 1 may be deprecated only after:
All example apps and release tooling emit the new format version.
The build pipeline rejects legacy packages without a manifest.
Golden v1
.mpkfixtures continue to load in CI until deprecation is complete.
References#
Package loader:
mudu_runtime/src/service/app_package.rsPackager:
mpm_build/src/main.rsFile name constants:
mudu_runtime/src/service/file_name.rsApp metadata:
mudu/src/common/app_info.rs