# FAQ (laravel-rust-format)

> PHP generates the reference fixtures when contributing. The Rust formatting code runs without PHP, Composer or a system ICU library.

- Package: laravel-rust-format (Laravel for Rust, alpha), crates: `laravel-rust-format`, `laravel-rust-format-core`
- Maintenance: active; Latest release: 0.1.1 (2026-12-04); Framework: laravel-rust 0.2.x; MSRV: Rust 1.99 or later; Licence: MIT
- Links: [Repository](https://github.com/bowerbird-si/laravel-rust-format), [crates.io](https://crates.io/crates/laravel-rust-format/0.1.1), [docs.rs](https://docs.rs/laravel-rust-format/0.1.1), [Changelog](https://oss.bowerbird.si/format/docs/changelog/), [Contributing](https://github.com/bowerbird-si/laravel-rust-format/blob/16e2c1a95c60fb32c5ee2f37b7d58a9f72be23f7/CONTRIBUTING.md), [Security policy](https://github.com/bowerbird-si/laravel-rust-format/blob/16e2c1a95c60fb32c5ee2f37b7d58a9f72be23f7/SECURITY.md)
- Based on: [Laravel Str, Number and Pluralizer](https://github.com/laravel/framework): The behaviour of Illuminate\Support\Str, Number and Pluralizer, as typed Rust functions with English defaults.; [Carbon](https://github.com/briannesbitt/Carbon): The calendar, formats and relative-time translations, on Jiff with an explicit clock instant. The generated locale tables credit the authors of each language file.; [Doctrine Inflector](https://github.com/doctrine/inflector): English inflection rules, generated into Rust tables.; [Portable ASCII](https://github.com/voku/portable-ascii): Transliteration tables for Str::ascii and Str::slug, generated into Rust tables.; [League CommonMark](https://github.com/thephpleague/commonmark): Reference behaviour for Markdown in the PHP oracle; Comrak renders Markdown in Rust.; [Ramsey UUID](https://github.com/ramsey/uuid): Reference behaviour for identifiers in the PHP oracle; the core builds them in Rust.; [Symfony UID](https://github.com/symfony/uid): Reference behaviour for identifiers in the PHP oracle; the core builds them in Rust.
- PHP parity: core (465 covered, 4 diverged, 3 planned of 472 abilities; 133,206 fixtures; follows illuminate/support 13.39.0; verified 2026-12-04)
- Used in production across multiple projects.
- Community package, not affiliated with Laravel.
- HTML version: https://oss.bowerbird.si/format/docs/faq/
- Source: https://github.com/bowerbird-si/laravel-rust-format/blob/16e2c1a95c60fb32c5ee2f37b7d58a9f72be23f7/docs/faq.md

## Do I need PHP to use this?

PHP generates the reference fixtures when contributing. The Rust formatting code runs without PHP, Composer or a system ICU library.

## Which crate should I add?

Use `laravel-rust-format-core` for the Rust functions. Use `laravel-rust-format` for the provider and MiniJinja filters in a Laravel for Rust app. [Installation](https://github.com/bowerbird-si/laravel-rust-format/blob/main/README.md#install)

## Which number formatter matches my Blade expression?

Use `php::number_format` for PHP’s `number_format()` and `number::format` for Laravel’s `Number::format()`. Their defaults and rounding differ. For plain numeric interpolation, use `php::echo` in Rust or `php_echo` in MiniJinja. [PHP functions](https://oss.bowerbird.si/format/docs/php-functions/)

## Why did my slug or truncated string change?

The framework’s native `Str` trait and PHP Laravel’s `Str` use different rules. Use the crate’s `str::slug` to preserve Laravel transliteration and `str::limit` to keep its width budget. Keep custom slug language, dictionary and separator options with any persisted slug contract. [Strings](https://oss.bowerbird.si/format/docs/strings/)

## Can I reuse my PHP date pattern?

Pass it to `carbon::format` or `carbon_format` in a template. The framework’s built-in `date` filter uses strftime patterns. [Dates](https://oss.bowerbird.si/format/docs/dates/)

## Why is my relative time different in a test?

Pass a fixed instant to the core. Choose `Relative::Now` for clock wording or `Relative::To` for comparison wording. In an application template, freeze the Laravel clock or pass an explicit `other` date. [Laravel integration](https://oss.bowerbird.si/format/docs/laravel-integration/#use-the-application-clock)

## Are currencies localized?

Pass a `number::Locale` in Rust or a `locale` argument to `number_currency` in a template. The currency code selects the unit, and the locale selects how to write it. [Numbers](https://oss.bowerbird.si/format/docs/numbers/) · [Parity](https://oss.bowerbird.si/format/docs/parity/)

## Can I disable Markdown or random generation?

Set `default-features = false` on the core dependency. Add back `markdown` or `random` individually when needed. PCRE2 is required for string matching. [Cargo features](https://github.com/bowerbird-si/laravel-rust-format/blob/main/README.md#cargo-features)

## Why does my Markdown appear as text in a view?

MiniJinja escapes the generated tags. Use `safe` only for HTML you trust. For the Markdown options and the escapes used by PHP and MiniJinja, see [Templates](https://oss.bowerbird.si/format/docs/templates/#missing-values-errors-and-html).

## Where should I look for a byte difference?

Check the formatter family first. Then compare the raw string, including non-breaking spaces, minus signs and any trailing bytes. Check PHP, ICU, Unicode and tzdata versions against the fixture header. If the formatter matches and the rendered page differs, check template escaping. [Parity](https://oss.bowerbird.si/format/docs/parity/)

## How do I port Blade’s `@js` directive?

Use `js_from` to produce the Laravel JavaScript expression in a script element. Use `php_json_encode` with HTML autoescaping to store JSON in an HTML attribute. [Template encoder options](https://oss.bowerbird.si/format/docs/templates/#php-functions)

## How do I parse month-only input?

Use `carbon::create_from_format("!Y-m", "2024-02", &zone)` or pipe the text to `carbon_create_from_format("!Y-m")` in MiniJinja. The reset modifier fills in the first day of the month at midnight. [Dates](https://oss.bowerbird.si/format/docs/dates/#parse-dates-and-timestamps)

Community package, not affiliated with Laravel.
