Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Cmark Laravel Package

commonmark/cmark

Fast, standards-compliant CommonMark Markdown parser in C, built for speed, low memory use, and consistent rendering. Provides a stable library and CLI, plus bindings for multiple languages—ideal for embedding Markdown support in apps and tools.

Deep Wiki
Context7

CommonMark parsing and rendering library and program in C

Frequently asked questions about Cmark
Can I use commonmark/cmark directly in a Laravel project via Composer?
No, this package isn’t available on Packagist and requires PECL installation. Laravel’s Composer-based workflow won’t support it natively, making it incompatible with shared hosting or managed platforms like Heroku or Laravel Forge.
What’s the license status for cmark, and can I use it in commercial Laravel apps?
The package lists 'NOASSERTION' as its license, which creates legal ambiguity. Avoid it for commercial projects until clarification is provided. Consult a lawyer before proceeding, as risks include IP disputes or compliance issues.
How does cmark handle PHP version upgrades in Laravel environments?
Cmark is a PHP extension, so upgrades require recompiling the C code for your PHP version. Laravel’s typical deployment targets (Docker, serverless) won’t support this automatically, forcing manual rebuilds or custom PHP images.
Is cmark actively maintained? When was the last update?
The package’s repository is unknown, and its release date is future-dated (2026-02-14), suggesting it’s either experimental or abandoned. No active maintenance means PHP version support and bug fixes are unlikely.
Will cmark work in Laravel’s Docker or serverless deployments?
Unlikely without significant customization. Docker requires PECL installation in your `Dockerfile`, and serverless platforms (AWS Lambda, etc.) block PHP extensions entirely. Test in staging first—expect failures in production.
How does cmark’s performance compare to league/commonmark in Laravel?
Cmark is faster due to its C-based engine, but the trade-off is complexity. League’s PHP-based parser (via `league/commonmark`) is more stable, Laravel-friendly, and actively maintained—ideal for most use cases where speed isn’t critical.
Can I migrate from league/commonmark to cmark in Laravel without breaking changes?
No, the APIs differ significantly. Cmark’s C-based interface requires rewriting Markdown processing logic, risking rendering inconsistencies or parsing errors. Test thoroughly in a sandbox before considering a switch.
What are the risks of using cmark in production Laravel apps?
High. Extension crashes can kill your PHP process, and lack of maintenance means no security patches. Shared hosting or managed Laravel services will block PECL extensions entirely, forcing you to self-host with custom builds.
Are there alternatives to cmark for fast Markdown parsing in Laravel?
Yes. For performance, consider `spatie/laravel-markdown` (wrapper for league/commonmark) or `paragonie/easy-markdown` (PHP-native). For extreme speed, explore Rust-based parsers like `markdown-php` with custom Docker setups.
How do I test cmark in a Laravel project before full deployment?
1) Install PECL locally via `pecl install cmark`. 2) Add `extension=cmark.so` to `php.ini`. 3) Test in a Laravel Docker container with a custom `Dockerfile`. Monitor for crashes or rendering issues, especially with large documents or concurrent requests.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
headercat/phpstan-extension-ide-helper
yosymfony/parser-utils
innmind/black-box
babenkoivan/elastic-migrations
babenkoivan/elastic-adapter
sandermuller/package-boost-php
sandermuller/boost-core
depa/sulu-google-reviews-bundle
croct/plug-symfony
develia/commons
dmstr/symfony-system-resources-bundle
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
renatomarinho/laravel-page-speed
develia/geo-bundle
austinheap/laravel-database-encryption
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
imbo/imbo-coding-standard