PHPackages                             carthage-software/ext-typst - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. carthage-software/ext-typst

ActivePhp-ext[Utility &amp; Helpers](/categories/utility)

carthage-software/ext-typst
===========================

PHP extension for the Typst typesetting engine

0.1.0(3mo ago)1736↓90.9%3[5 issues](https://github.com/carthage-software/ext-typst/issues)[4 PRs](https://github.com/carthage-software/ext-typst/pulls)MITPHPPHP ~8.3.0 || ~8.4.0 || ~8.5.0CI passing

Since Mar 30Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/carthage-software/ext-typst)[ Packagist](https://packagist.org/packages/carthage-software/ext-typst)[ RSS](/packages/carthage-software-ext-typst/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

ext-typst
=========

[](#ext-typst)

A PHP extension that embeds the [Typst](https://typst.app/) typesetting engine, built with Rust via [ext-php-rs](https://github.com/extphprs/ext-php-rs).

Compile Typst markup to PDF, PNG, JPEG, and SVG directly from PHP. No CLI needed. No subprocess spawning.

**[Documentation](https://ext-typst.carthage.software)** | **[GitHub](https://github.com/carthage-software/ext-typst)** | **[Typst](https://typst.app/)**

Installation
------------

[](#installation)

### Via PIE

[](#via-pie)

```
pie install carthage-software/ext-typst
```

### Pre-built binaries

[](#pre-built-binaries)

Download the ZIP for your platform from [GitHub Releases](https://github.com/carthage-software/ext-typst/releases). Each ZIP contains a `typst.so` file. Extract it and add to your `php.ini`:

```
extension=/path/to/typst.so
```

### IDE &amp; static analysis stubs

[](#ide--static-analysis-stubs)

```
composer require --dev carthage-software/ext-typst
```

Enables autocompletion in PhpStorm and support for Mago, PHPStan, and Psalm.

Quick Start
-----------

[](#quick-start)

```
$world = new Typst\World();
$compiler = new Typst\Compiler($world);

const TEMPLATE = save('output.pdf');
$document->toImage()->save('output.png');
$document->toSvg()->save('output.svg');
```

See the full documentation at [ext-typst.carthage.software](https://ext-typst.carthage.software).

Supported Platforms
-------------------

[](#supported-platforms)

PlatformArchitectureLinuxx86\_64Linuxaarch64macOSarm64PHP 8.3, 8.4, and 8.5 are supported.

Development
-----------

[](#development)

Requires [Rust](https://rustup.rs/) (stable, 2024 edition) and [just](https://github.com/casey/just).

```
just build          # debug build
just release        # release build
just test           # run tests
just run-example X  # run examples/X.php
just lint           # clippy + mago lint
just check          # cargo check + mago analyze
just fmt            # format rust + php
just verify         # fmt-check + lint + check
```

For more examples, see [`examples/`](examples/).

Acknowledgments
---------------

[](#acknowledgments)

This project was developed by [Carthage Software](https://carthage.software) and is fully funded by our partner [Buhta](https://buhta.com).

License
-------

[](#license)

MIT OR Apache-2.0

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance77

Regular maintenance activity

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

91d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8489d7c85bfa7c637b8e13484f3f659652aea0568b6e7f9e66edeb0649b5a2f1?d=identicon)[azjezz](/maintainers/azjezz)

---

Top Contributors

[![azjezz](https://avatars.githubusercontent.com/u/29315886?v=4)](https://github.com/azjezz "azjezz (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/carthage-software-ext-typst/health.svg)

```
[![Health](https://phpackages.com/badges/carthage-software-ext-typst/health.svg)](https://phpackages.com/packages/carthage-software-ext-typst)
```

###  Alternatives

[visus/cuid2

A PHP library for generating collision-resistant ids (CUIDs).

421.1M4](/packages/visus-cuid2)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
