Search by

michael4d45 / effect-schema-generator

PHP attributes and Artisan wrapper for the Rust effect-schema binary

Maintainers

Package info

github.com/Michael4d45/effect-schema-generator

Language:Rust

pkg:composer/michael4d45/effect-schema-generator

Transparency log

Statistics

Installs: 719

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.7.1 2026-08-16 14:36 UTC

README

Native generator for TypeScript / Effect schemas from Spatie Laravel Data classes. PHP source of truth: Laravel-Effect-Generator.

Packages

Distro Path Who consumes it
npm @michael4d45/effect-schema-generator js/ Vite, npm run types:generate, CI
Composer michael4d45/effect-schema-generator php/ (root composer.json for Packagist) #[Optional] attributes + Artisan wrapper
Cargo effect-schema-generator crate root the effect-schema binary

Apps should generate types from npm, not from php artisan, so Alpine Docker/CI and Lerd Vite do not boot Laravel (~0.9s) and do not need a sibling cargo build.

Local binary

cargo test
cargo build --release
./target/release/effect-schema transform --config effect-schema.toml

Musl (Alpine / static Linux):

rustup target add x86_64-unknown-linux-musl aarch64-unknown-linux-musl
# see scripts/build-npm-binaries.sh

Publish

GitHub Actions (.github/workflows/release.yml) builds platform binaries, copies them into js/binaries/, and npm publishs @michael4d45/effect-schema-generator via npm Trusted Publishing (OIDC). Configure the trusted publisher on that npm package for repo Michael4d45/effect-schema-generator and workflow release.yml.

git tag v0.7.0
git push origin v0.7.0

Composer is Packagist michael4d45/effect-schema-generator (root composer.json, sources in php/). After tagging, point the existing Packagist listing at https://github.com/Michael4d45/effect-schema-generator.