Packages provides a system for distributing and installing reusable components within the Typst ecosystem. It allows developers to create and share collections of Typst files and assets, promoting code reuse and project organization. The system utilizes a manifest file to define package metadata and dependencies, enabling seamless integration into Typst projects.
The repository adopts a preview namespace to manage experimental packages, allowing for iterative development and testing before wider release. It supports both on-demand downloading from a cache and local installation for development and experimentation. The system provides a flexible namespace structure, enabling both published and custom package management.
- Package Management: Provides a standardized way to publish, install, and manage reusable Typst components.
- On-Demand Downloads: Packages are downloaded on-demand from a local cache, optimizing disk space.
- Local Installation: Supports local package storage for development and testing without publishing.
- Preview Namespace: Utilizes a
previewnamespace for managing experimental and evolving packages. - Manifest-Based Metadata: Employs a
typst.tomlmanifest for defining package metadata and versioning. - Cache Management: Leverages OS-specific cache directories for efficient package storage.
- Flexible Naming: Allows for custom namespaces to avoid conflicts and manage local packages.
The package repository is currently in an early and experimental phase, with packages scoped under a preview namespace. Development is actively ongoing, with a focus on improving the package management infrastructure and user experience. Documentation is available, but the system is subject to change.
Developers benefit from Packages by gaining access to a growing library of reusable Typst components, improving development efficiency. It addresses the need for modularity and code reuse in Typst projects, offering a value proposition over manual file management or system-level dependencies. Users can leverage published packages or create local copies to enhance their Typst workflows.
