michael4d45 / effect-schema-generator
PHP attributes and Artisan wrapper for the Rust effect-schema binary
Package info
github.com/Michael4d45/effect-schema-generator
Language:Rust
pkg:composer/michael4d45/effect-schema-generator
Requires
- php: ^8.3
- laravel/framework: ^12.0|^13.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-08-16 14:44:14 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.