Light Dark

Package Manifest

The pkg.hot file defines your package's metadata and dependencies.

Format

::hot::pkg ns

hot.pkg.<package-name> {
  name: "package-name",
  version: "0.1.0",
  description: "Package description",
  author: "Author Name",
  email: "author@example.com",
  url: "https://github.com/org/package",
  license: "MIT",
  deps: {
    // dependencies
  },
  src-paths: ["src/"],
  test-paths: ["test/"]
}

Fields

Required Fields

FieldTypeDescription
nameStringPackage name (should match directory name)
versionStringSemantic version (e.g., "1.0.0")
descriptionStringBrief description of the package
depsMapPackage dependencies
src-pathsVecDirectories containing source files

Optional Fields

FieldTypeDescription
authorStringPackage author name
emailStringContact email
urlStringPackage homepage or repository URL
licenseStringLicense identifier (e.g., "MIT", "Apache-2.0")
orgStringOrganization identifier
test-pathsVecDirectories containing test files
hot-min-versionStringMinimum Hot version required (e.g., "1.0.0")

Examples

Minimal Package

::hot::pkg ns

hot.pkg.my-utils {
  name: "my-utils",
  version: "0.1.0",
  description: "Utility functions",
  deps: {
    "hot.dev/hot-std": {}
  },
  src-paths: ["src/"]
}

Full Package

::hot::pkg ns

hot.pkg.aws-s3 {
  name: "aws-s3",
  version: "0.1.0",
  description: "AWS S3 API bindings for Hot",
  author: "Hot Dev",
  email: "support@hot.dev",
  url: "https://hot.dev",
  license: "MIT",
  hot-min-version: "1.0.0",
  deps: {
    "hot.dev/hot-std": {},
    "hot.dev/aws-core": {
      "local": "../aws-core",
      "git": "git@github.com:hot-dev/pkg.git",
      "path": "hot/pkg/aws-core"
    }
  },
  src-paths: ["src/"],
  test-paths: ["test/"]
}

Namespace Convention

The package manifest lives in the ::hot::pkg namespace. The variable name should be hot.pkg.<name> where <name> matches your package name.

::hot::pkg ns

hot.pkg.my-package {  // Variable name matches package
  name: "my-package", // name field matches too
  // ...
}

Version Format

Use semantic versioning (SemVer):

  • 1.0.0 - Initial stable release
  • 1.0.1 - Patch release (bug fixes)
  • 1.1.0 - Minor release (new features, backwards compatible)
  • 2.0.0 - Major release (breaking changes)

For pre-release versions:

  • 0.1.0 - Early development
  • 1.0.0-alpha.1 - Alpha release
  • 1.0.0-beta.1 - Beta release
  • 1.0.0-rc.1 - Release candidate

Minimum Hot Version

Use hot-min-version to specify the minimum Hot version your package requires:

hot.pkg.my-package {
  name: "my-package",
  version: "1.0.0",
  hot-min-version: "1.0.0",  // Requires Hot 1.0.0 or later
  // ...
}

When a user tries to install or use your package with an older Hot version, they'll see:

Package 'my-package' requires Hot 1.0.0: Hot version 1.0.0 is required, but you are running 0.11.0

This is useful when your package uses language features or standard library functions introduced in a specific Hot version.