freshcrate
Skin:/

alef

Generate fully-typed, lint-clean language bindings for Rust libraries across 11 languages

Why this rank:Recent releaseHealthy release cadenceStrong adoption

Description

Generate fully-typed, lint-clean language bindings for Rust libraries across 11 languages

README

Alef

Generate fully-typed, lint-clean language bindings for Rust libraries across 11 languages. Alef handles the entire pipeline -- API extraction, code generation, type stubs, package scaffolding, build orchestration, version sync, and e2e test generation -- from a single TOML config file.

Key Features

  • API extraction -- Parses your Rust crate's public API via syn into a language-agnostic intermediate representation. Handles pub use re-exports across workspace crates, #[cfg(feature)] gating, serde rename_all metadata, doc comments, Default detection, and transparent newtype resolution.
  • 11 language backends -- Each backend generates idiomatic, lint-clean binding code using the target language's native framework. See the supported languages table below.
  • Configurable DTO styles -- Choose how types are represented in each language: Python dataclass vs TypedDict vs pydantic vs msgspec, TypeScript interface vs zod, Ruby Struct vs dry-struct vs Data, and more. Input and output types can use different styles.
  • Type stubs -- Generates .pyi (Python), .rbs (Ruby), and .d.ts (TypeScript) type definition files for editor support and static analysis in consuming projects.
  • Package scaffolding -- Generates complete package manifests for each language: pyproject.toml, package.json, .gemspec, composer.json, mix.exs, go.mod, pom.xml, .csproj, DESCRIPTION (R), and Cargo.toml for binding crates.
  • E2E test generation -- Write test fixtures as JSON, get complete runnable test suites for all configured languages. Supports 40+ assertion types, field path aliases, per-language overrides, and skip conditions.
  • Adapter patterns -- Define custom FFI bridging patterns in config: sync_function, async_method, callback_bridge, streaming, and server_lifecycle. Alef generates the glue code for each backend.
  • Version sync -- Propagates the version from Cargo.toml to all package manifests, C headers, pkg-config files, and any custom file via regex text replacements.
  • Build orchestration -- Wraps maturin, napi, wasm-pack, and cargo+cbindgen with post-processing steps (e.g., patching .d.ts files for verbatimModuleSyntax compatibility).
  • Visitor FFI -- Generates a 40-method visitor callback interface via C FFI, enabling the visitor pattern in Go, Java, C#, and other FFI-based languages.
  • Caching -- blake3-based content hashing skips regeneration when source and config haven't changed. alef verify checks staleness in CI.

Supported Languages

Language Framework Package Format Test Framework DTO Styles
Python PyO3 PyPI (.whl) pytest dataclass, typeddict, pydantic, msgspec
TypeScript/Node.js NAPI-RS npm vitest interface, zod
WebAssembly wasm-bindgen npm vitest --
Ruby Magnus RubyGems (.gem) RSpec struct, dry-struct, data
PHP ext-php-rs Composer PHPUnit readonly-class, array
Go cgo + C FFI Go modules go test struct
Java Panama FFM Maven (.jar) JUnit record
C# P/Invoke NuGet (.nupkg) xUnit record
Elixir Rustler Hex ExUnit struct, typed-struct
R extendr CRAN testthat list, r6
C cbindgen Header (.h) -- --

Quick Start

Install

# From crates.io
cargo install alef-cli

# Or via Homebrew
brew install kreuzberg-dev/tap/alef

# Or from source
git clone https://github.com/kreuzberg-dev/alef.git
cd alef && cargo install --path crates/alef-cli

Initialize

cd your-rust-crate
alef init --lang python,node,ruby,go

This creates alef.toml with your crate's configuration.

Generate Bindings

alef generate              # Generate all configured languages
alef generate --lang node  # Generate for specific language
alef generate --clean      # Regenerate everything (ignore cache)

Build

alef build                 # Build all languages
alef build --lang node     # Build Node.js (runs napi build + patches .d.ts)
alef build --release       # Release profile

Test

alef test                  # Run all language tests
alef test --e2e            # Include e2e tests
alef test --lang python,go # Specific languages

Commands

Command Description
alef init Initialize alef.toml for your crate
alef extract Extract API surface from Rust source into IR JSON
alef generate Generate language bindings from IR
alef stubs Generate type stubs (.pyi, .rbs, .d.ts)
alef scaffold Generate package manifests (pyproject.toml, package.json, etc.)
alef readme Generate per-language README files
alef build Build bindings with native tools (maturin, napi, wasm-pack, etc.)
alef test Run per-language test suites
alef lint Run configured linters on generated output
alef sync-versions Sync version from Cargo.toml to all manifests
alef verify Check if bindings are up-to-date (CI mode with --exit-code)
alef diff Show what would change without writing
alef all Run full pipeline: generate + stubs + scaffold + readme + sync
alef e2e Generate e2e test projects from JSON fixtures
alef cache Manage build cache

Configuration Reference

Alef is configured via alef.toml in your project root. Run alef init to generate a starter config.

Minimal Example

[crate]
name = "my-library"
sources = ["src/lib.rs", "src/types.rs"]

languages = ["python", "node", "go", "java"]

[output]
python = "crates/my-library-py/src/"
node = "crates/my-library-node/src/"
ffi = "crates/my-library-ffi/src/"

[python]
module_name = "_my_library"

[node]
package_name = "@myorg/my-library"

[dto]
python = "dataclass"
node = "interface"

[crate] -- Source Configuration

Field Type Default Description
name string required Rust crate name
sources string[] required Rust source files to extract
version_from string "Cargo.toml" File to read version from (supports workspace Cargo.toml)
core_import string {name} with - replaced by _ Import path for the core crate in generated bindings
workspace_root string -- Workspace root for resolving pub use re-exports from sibling crates
skip_core_import bool false Skip adding use {core_import}; to generated bindings
features string[] [] Cargo features treated as always-present (#[cfg(feature)] fields are included)
path_mappings map {} Rewrite extracted Rust path prefixes (e.g., { "spikard" = "spikard_http" })

languages -- Target Languages

Top-level array of languages to generate bindings for:

languages = ["python", "node", "ruby", "php", "elixir", "wasm", "ffi", "go", "java", "csharp", "r"]

The ffi language generates the C FFI layer required by go, java, and csharp. If you enable any of those three, ffi is implicitly included.

[exclude] / [include] -- Filtering

[exclude]
types = ["InternalHelper"]
functions = ["deprecated_fn"]
methods = ["MyType.internal_method"]   # dot-notation: "TypeName.method_name"

[include]
types = ["PublicApi", "Config"]        # whitelist only these types
functions = ["extract", "parse"]       # whitelist only these functions

[output] -- Output Directories

Per-language output directories for generated Rust binding code:

[output]
python = "crates/{name}-py/src/"
node = "crates/{name}-node/src/"
ruby = "crates/{name}-rb/src/"
php = "crates/{name}-php/src/"
elixir = "crates/{name}-rustler/src/"
wasm = "crates/{name}-wasm/src/"
ffi = "crates/{name}-ffi/src/"
go = "packages/go/"
java = "packages/java/src/main/java/"
csharp = "packages/csharp/"
r = "crates/{name}-extendr/src/"

The {name} placeholder is replaced with the crate name.

Language-Specific Sections

[python]
Field Type Default Description
module_name string _{name} Python module name (the native extension name)
async_runtime string -- Async runtime spec for pyo3_async_runtimes
stubs.output string -- Output directory for .pyi stub files
features string[] inherits [crate] features Per-language Cargo feature override
[node]
Field Type Default Description
package_name string {name} npm package name
features string[] inherits [crate] features Per-language Cargo feature override
[ruby]
Field Type Default Description
gem_name string {name} with _ Ruby gem name
stubs.output string -- Output directory for .rbs type stubs
features string[] inherits [crate] features Per-language Cargo feature override
[php]
Field Type Default Description
extension_name string {name} with _ PHP extension name
feature_gate string "extension-module" Feature gate wrapping all generated code
stubs.output string -- Output directory for PHP facades/stubs
features string[] inherits [crate] features Per-language Cargo feature override
[elixir]
Field Type Default Description
app_name string {name} with _ Elixir application name
features string[] inherits [crate] features Per-language Cargo feature override
[wasm]
Field Type Default Description
exclude_functions string[] [] Functions to exclude from WASM bindings
exclude_types string[] [] Types to exclude from WASM bindings
type_overrides map {} Override types (e.g., { "DOMNode" = "JsValue" })
features string[] inherits [crate] features Per-language Cargo feature override
[ffi]
Field Type Default Description
prefix string {name} with _ C symbol prefix for all exported functions
error_style string "last_error" Error reporting convention
header_name string {prefix}.h Generated C header filename
lib_name string {prefix}_ffi Native library name (for Go/Java/C# linking)
visitor_callbacks bool false Generate visitor/callback FFI support
features string[] inherits [crate] features Per-language Cargo feature override
[go]
Field Type Default Description
module string github.com/kreuzberg-dev/{name} Go module path
package_name string derived from module path Go package name
features string[] inherits [crate] features Per-language Cargo feature override
[java]
Field Type Default Description
package string dev.kreuzberg Java package name
ffi_style string "panama" FFI binding style (Panama Foreign Function & Memory API)
features string[] inherits [crate] features Per-language Cargo feature override
[csharp]
Field Type Default Description
namespace string PascalCase of {name} C# namespace
target_framework string -- Target framework version
features string[] inherits [crate] features Per-language Cargo feature override
[r]
Field Type Default Description
package_name string {name} R package name
features string[] inherits [crate] features Per-language Cargo feature override

[dto] -- Type Generation Styles

Controls how Rust structs are represented in each language's public API:

[dto]
python = "dataclass"         # dataclass | typeddict | pydantic | msgspec
python_output = "typeddict"  # separate style for return types (optional)
node = "interface"           # interface | zod
ruby = "struct"              # struct | dry-struct | data
php = "readonly-class"       # readonly-class | array
elixir = "struct"            # struct | typed-struct
go = "struct"                # struct
java = "record"              # record
csharp = "record"            # record
r = "list"                   # list | r6

[scaffold] -- Package Metadata

Metadata used when generating package manifests:

[scaffold]
description = "My library for doing things"
license = "MIT"
repository = "https://github.com/org/repo"
homepage = "https://docs.example.com"
authors = ["Your Name"]
keywords = ["parsing", "extraction"]

[[adapters]] -- Custom FFI Adapters

Define custom binding patterns that alef can't extract automatically:

[[adapters]]
name = "convert"
pattern = "sync_function"
core_path = "my_crate::convert"
params = [
  { name = "input", type = "String" },
  { name = "options", type = "Options", optional = true },
]
returns = "Result"
error_type = "ConvertError"
gil_release = true    # Python: release GIL during call

Supported patterns: sync_function, async_method, callback_bridge, streaming, server_lifecycle.

[generate] / [generate_overrides.<lang>] -- Generation Control

Toggle individual generation passes (all default to true):

[generate]
bindings = true          # struct wrappers, From impls, module init
errors = true            # error type hierarchies from thiserror enums
configs = true           # config builder constructors from Default types
async_wrappers = true    # async/sync function pairs with runtime management
type_conversions = true  # recursive type marshaling helpers
package_metadata = true  # package manifests (pyproject.toml, package.json, etc.)
public_api = true        # idiomatic public API wrappers

# Override per language:
[generate_overrides.wasm]
async_wrappers = false

[sync] -- Version Synchronization

Configure the alef sync-versions command:

[sync]
extra_paths = ["packages/go/go.mod"]

[[sync.text_replacements]]
path = "crates/*/cbindgen.toml"
search = 'header = ".*"'
replace = 'header = "/* v{version} */"'

[test.<lang>] / [lint.<lang>] -- Test and Lint Commands

[test.python]
command = "pytest packages/python/tests/"
e2e = "cd e2e/python && pytest"

[test.node]
command = "npx vitest run"

[lint.python]
format = "ruff format packages/python/"
check = "ruff check packages/python/"
typecheck = "mypy packages/python/"

[e2e] -- E2E Test Generation

Configure fixture-driven test generation:

[e2e]
fixtures = "fixtures"
output = "e2e"
languages = ["python", "node", "rust", "go"]

[e2e.call]
function = "extract"
module = "my_library"
async = true
args = [
  { name = "path", field = "input.path", type = "string" },
]

[opaque_types] -- External Type Declarations

Declare types from external crates that alef can't extract:

[opaque_types]
Tree = "tree_sitter_language_pack::Tree"

These get opaque wrapper structs in all backends with handle-based FFI access.

[custom_modules] / [custom_registrations] -- Hand-Written Code

Declare hand-written modules that alef should include in mod declarations and module init:

[custom_modules]
python = ["custom_handler"]

[custom_registrations.python]
classes = ["CustomHandler"]
functions = ["custom_extract"]
init_calls = ["register_custom_types(m)?;"]

Architecture

Rust Source Files
       |
  [alef extract]
       |
  Intermediate Representation (IR)
  ApiSurface { types, functions, enums, errors }
       |
  [alef generate]
       |
  +----+----+----+----+----+----+----+----+----+----+----+
  |    |    |    |    |    |    |    |    |    |    |    |
 PyO3 NAPI WASM FFI  Magnus PHP Rustler extendr Go Java C#
  |    |    |    |
  |    |    |    +-- cbindgen --> C header
  |    |    +-- wasm-pack --> npm
  |    +-- napi build --> npm + .d.ts
  +-- maturin --> PyPI wheel + .pyi

Crate Structure

Crate Role
alef-core IR types, config schema, Backend trait
alef-extract Rust source to IR extraction via syn
alef-codegen Shared code generation (type mappers, converters, builders)
alef-cli CLI binary with all commands
alef-backend-pyo3 Python backend
alef-backend-napi TypeScript/Node.js backend
alef-backend-wasm WebAssembly backend
alef-backend-ffi C FFI backend (used by Go, Java, C#)
alef-backend-magnus Ruby backend
alef-backend-php PHP backend
alef-backend-rustler Elixir backend
alef-backend-extendr R backend
alef-backend-go Go backend
alef-backend-java Java backend
alef-backend-csharp C# backend
alef-adapters Adapter pattern code generators
alef-scaffold Package manifest generator
alef-readme Per-language README generator
alef-e2e Fixture-driven e2e test generator

Contributing

Contributions welcome! Please open an issue or PR on GitHub.

License

MIT -- Copyright (c) 2025-2026 Kreuzberg, Inc.

Release History

VersionChangesUrgencyDate
v0.128.0<!-- alef-release-state:v1 {"assets": ["alef-x86_64-unknown-linux-gnu.tar.gz", "alef-aarch64-unknown-linux-gnu.tar.gz", "alef-x86_64-unknown-linux-musl.tar.gz", "alef-aarch64-unknown-linux-musl.tar.gz", "alef-aarch64-apple-darwin.tar.gz", "alef-x86_64-apple-darwin.tar.gz", "alef-x86_64-pc-windows-msvc.zip"], "schema": 1, "source_sha": "a1e66e2343e77a5bde530ce46caa852a67c19d20", "tag": "v0.128.0", "version": "0.128.0"} -->High11/7/2026
v0.127.2<!-- alef-release-state:v1 {"assets": ["alef-x86_64-unknown-linux-gnu.tar.gz", "alef-aarch64-unknown-linux-gnu.tar.gz", "alef-x86_64-unknown-linux-musl.tar.gz", "alef-aarch64-unknown-linux-musl.tar.gz", "alef-aarch64-apple-darwin.tar.gz", "alef-x86_64-apple-darwin.tar.gz", "alef-x86_64-pc-windows-msvc.zip"], "schema": 1, "source_sha": "2362d844d03f68bba3c34fca0a8afccbb2f15574", "tag": "v0.127.2", "version": "0.127.2"} -->High11/6/2026
v0.124.2<!-- alef-release-state:v1 {"assets": ["alef-x86_64-unknown-linux-gnu.tar.gz", "alef-aarch64-unknown-linux-gnu.tar.gz", "alef-x86_64-unknown-linux-musl.tar.gz", "alef-aarch64-unknown-linux-musl.tar.gz", "alef-aarch64-apple-darwin.tar.gz", "alef-x86_64-apple-darwin.tar.gz", "alef-x86_64-pc-windows-msvc.zip"], "schema": 1, "source_sha": "4e228d27a85645ef0c37574b6ec0c5f64fe0f139", "tag": "v0.124.2", "version": "0.124.2"} -->High11/5/2026
v0.122.1<!-- alef-release-state:v1 {"assets": ["alef-x86_64-unknown-linux-gnu.tar.gz", "alef-aarch64-unknown-linux-gnu.tar.gz", "alef-aarch64-apple-darwin.tar.gz", "alef-x86_64-apple-darwin.tar.gz", "alef-x86_64-pc-windows-msvc.zip"], "schema": 1, "source_sha": "684c93e1a8ab0b91f716de55d7b9e7cf9567906a", "tag": "v0.122.1", "version": "0.122.1"} -->High11/4/2026
v0.118.0<!-- alef-release-state:v1 {"assets": ["alef-x86_64-unknown-linux-gnu.tar.gz", "alef-aarch64-unknown-linux-gnu.tar.gz", "alef-aarch64-apple-darwin.tar.gz", "alef-x86_64-apple-darwin.tar.gz", "alef-x86_64-pc-windows-msvc.zip"], "schema": 1, "source_sha": "c222deecc4657014c61d000a3da1912fb25d2de8", "tag": "v0.118.0", "version": "0.118.0"} -->High11/3/2026
v0.115.14<!-- alef-release-state:v1 {"assets": ["alef-x86_64-unknown-linux-gnu.tar.gz", "alef-aarch64-unknown-linux-gnu.tar.gz", "alef-aarch64-apple-darwin.tar.gz", "alef-x86_64-apple-darwin.tar.gz", "alef-x86_64-pc-windows-msvc.zip"], "schema": 1, "source_sha": "8b01034113c7d60dbf22c85e3c07e61c30af26f4", "tag": "v0.115.14", "version": "0.115.14"} -->High11/1/2026
v0.115.12<!-- alef-release-state:v1 {"assets": ["alef-x86_64-unknown-linux-gnu.tar.gz", "alef-aarch64-unknown-linux-gnu.tar.gz", "alef-aarch64-apple-darwin.tar.gz", "alef-x86_64-apple-darwin.tar.gz", "alef-x86_64-pc-windows-msvc.zip"], "schema": 1, "source_sha": "305d5c0aa4642ddebf1d2fead01e48b55a230025", "tag": "v0.115.12", "version": "0.115.12"} -->High11/1/2026
v0.115.10### Changed - Generate Java projects with Maven Enforcer 3.7.0. ### Fixed - Fetch locked Swift consumer dependencies before extraction and count the new verification control. - Sync core dependency requirements in extra Cargo manifests, preserving inherited versions and external package aliases. (#754) - Avoid redundant result-metadata construction when rendering ordinary documentation snippets, preserving caller-supplied PHP and Swift resolvers. (#753) High10/31/2026
v0.115.6### Changed - Replace go-task with mise tasks: alef's own tasks keep their names under `mise run`, CI invokes them through mise, and `Taskfile.yml`, `.task/` and the `task` tool pin are gone. - Drive native test fixtures through `mise run` with a fixture-scoped, trusted `mise.toml` that never merges a parent config. - Generated comments and docs name `mise run <task>` instead of `task <task>`. ### Fixed - Export Python keyword methods under the names declared by their stubs and omit unreachabHigh10/29/2026
v0.115.5### Changed - Generate Brew and Homebrew suites with Bats and shared helpers, retain compatibility launchers, and cover release and census scripts with shell regression tests in CI. - Remove two generator function-length lint exemptions and refresh the lint-debt baseline. - The `alef` agent skill now documents the consumer `alef:*`, `e2e:*` and `version:*` tasks and why `alef sync-versions` alone is not a version bump, replacing the agent-conventions `alef-workflow` skill. ### Fixed - Stage FHigh10/27/2026
v0.115.3### Fixed - Check concrete native members without requiring structural Python protocol callbacks on the native marker class, including generic and qualified `typing.Protocol` bases. - Keep PHP error-payload compilation and runtime probes independent of the test process's temporary working directory. - Isolate formatter tests that hide `poly` from `PATH` in child processes so they cannot intermittently disable colocated Go formatters during parallel tests. - Resolve Ruby tagged-enum variant clasHigh10/27/2026
v0.114.2### Fixed - Preserve trailing newlines when generated Brew assertions extract JSON string values, and report JSON extraction failures without masking them. - Preserve separators between projected JSON values in Brew assertions to prevent false matches. - Allow AI-Rulez validation to run manually against the current release commit. High10/24/2026
v0.113.4### Fixed - Restore supported Rust error display templates in generated Dart Freezed variants while preserving typed payloads, factory constructors, and unsupported-format fallbacks. - Consult runtime fixture origins for file-backed mock responses so HTML redirects and root-relative links use their dedicated listener, retaining shared-server fallback for ordinary bodies. - Keep resolved C accessor expressions distinct from raw call identifiers and verify every loaded e2e template registry with High10/23/2026
v0.113.2### Fixed - Validate generated Dart bindings with the Dart 3.13.7 security patch in CI on Linux, macOS and Windows (#675). - Honor the configured crate and CLI release channels through the repaired shared metadata action, preserving explicit target selection across workflow events. High10/23/2026
v0.111.0 ### Changed - Reject invalid FRB generation configuration unless FRB generation is explicitly skipped. - Raise the generated PHP binding dependency floor to ext-php-rs 0.16.3, which uses ZIP 9. ### Fixed - Link generated Swift callbacks on Apple targets with strict linker flags while keeping unrelated undefined symbols as errors. - Report failed or skipped required Dart Freezed generation before post-processing generated bindings. - Avoid Dart error accessor names that conflict with generateHigh10/18/2026
v0.110.16### Fixed - Accept formatted C headers with continued preprocessor guards when checking generated FFI freshness. High10/15/2026
v0.110.12### Fixed - Preserve every configured R package author with one creator, handle closing brackets in author display names, and escape Kotlin Android developer metadata as Kotlin string literals. - Preserve declared unit enum defaults in recorded Swift initializer overloads, including acronym and keyword case names, and reject unsupported associated constants before emitting Swift. - Update Rustls to 0.23.46 to fix four TLS security advisories. Validation: 19 focused tests including native SwiftHigh10/14/2026
v0.110.11### Changed - Split language-filter configuration tests into a focused module, bringing the parent test file below the size cap while preserving all ten moved tests. - Update the generated Maven Central publishing plugin to 0.12.0 ([#565](https://github.com/xberg-io/alef/pull/565)). ### Fixed - Preserve recorded Swift DTO initializer overloads as callable function references while retaining extended initializers and their defaults; reject recorded metadata whose extension defaults cannot be High10/14/2026
v0.110.4### Changed - Move Dart FFI component emission into a registered Jinja template without changing generated bytes, removing one lint warning. - Refresh the compatible Cargo lockfile, updating deranged to 0.5.9. ### Fixed - Recorded constructors retain resolved string, integer, floating-point, collection, enum and null defaults for added fields, including inserted fields; unknown defaults report the field and type ([#554](https://github.com/xberg-io/alef/issues/554)). - Preserve Kotlin JNI posiHigh10/13/2026
v0.110.0### Changed (BREAKING) - Generated C# e2e projects use `xunit.v3.mtp-off` 4.0.2 and `xunit.runner.visualstudio` 4.0.1, replacing the deprecated xUnit v2 package. Test projects now emit `OutputType=Exe` and retain VSTest compatibility; custom harness extensions using xUnit v2 APIs must migrate to xUnit v3. ### Fixed - Split CLI adoption reports, validation diagnostics, extraction deduplication, Swift checksum preparation, and TOML merge provenance into focused helpers, removing five lintHigh10/11/2026
v0.109.6**Full Changelog**: https://github.com/xberg-io/alef/compare/v0.109.5...v0.109.6High10/11/2026
v0.108.0## What's Changed * chore(deps): update rust crate syn to v3.0.7 by @renovate[bot] in https://github.com/xberg-io/alef/pull/527 * fix(deps): update rust crate minijinja to v3 by @renovate[bot] in https://github.com/xberg-io/alef/pull/523 * chore(deps): update github actions - autoclosed by @renovate[bot] in https://github.com/xberg-io/alef/pull/522 **Full Changelog**: https://github.com/xberg-io/alef/compare/v0.107.12...v0.108.0High10/10/2026
v0.107.8**Full Changelog**: https://github.com/xberg-io/alef/compare/v0.107.7...v0.107.8High10/9/2026
v0.107.2**Full Changelog**: https://github.com/xberg-io/alef/compare/v0.107.1...v0.107.2High10/7/2026
v0.107.0 ### Changed - **Breaking:** Zig 0.17.0 is now the minimum and target Zig version. Newly scaffolded and published Zig packages and e2e projects declare `.minimum_zig_version = "0.17.0"` and are verified against Zig 0.17; consumers on Zig 0.16 must upgrade. Existing `build.zig.zon` files keep their current `minimum_zig_version` until edited by hand. ### Fixed - Generated Zig e2e `build.zig` files that spawn the mock server no longer call the removed `std.process.getEnvMap` or pass `.enHigh10/7/2026
v0.105.0 ### Added - An error type's `retry_after()` method is now extracted as an introspection method. Go, the FFI layer, Java (`java.time.Duration`, `null` when absent), C# (`TimeSpan?`), Kotlin, Swift, Dart and Elixir carry it; Python, Node, PHP, Ruby and WebAssembly expose any `Duration`-valued error method as whole milliseconds (`int | None`, `number | null`, `?int`, `Integer?`), with their `.pyi`, `.d.ts`, PHP and RBS stubs. - C, Dart, Swift, Zig and Kotlin (JVM and Android) documentatioHigh10/6/2026
v0.103.17**Full Changelog**: https://github.com/xberg-io/alef/compare/v0.103.15...v0.103.17High10/5/2026
v0.103.14**Full Changelog**: https://github.com/xberg-io/alef/compare/v0.103.13...v0.103.14High10/4/2026
v0.103.10## What's Changed * chore(deps): update rust crate insta to v1.49.0 by @renovate[bot] in https://github.com/xberg-io/alef/pull/503 * chore(deps): update rust crate jsonschema to v0.58.5 by @renovate[bot] in https://github.com/xberg-io/alef/pull/502 * chore(deps): update rust crate libc to v0.2.190 by @renovate[bot] in https://github.com/xberg-io/alef/pull/501 **Full Changelog**: https://github.com/xberg-io/alef/compare/v0.103.9...v0.103.10High10/3/2026
v0.103.7### Fixed - PHP trait-bridge safety errors no longer recommend the lifecycle-only `php:callbacks` mode for callback attachments it cannot preserve, and state when excluding PHP also removes an options-field carrier. - Cargo resolution failures for local path dependencies are no longer retried or reported as crates.io propagation delays under Rust 1.99. - Generated WASM classes expose `copyForTransfer()` for arrays of class values, whose elements wasm-bindgen necessarily takes by ownership. ConsHigh10/2/2026
v0.103.5 ### Fixed - PHP trait bridges can use `exclude_languages = ["php:callbacks"]` to preserve their existing public interface and register/unregister/clear symbols without retaining request-bound Zend callbacks. Registration returns a deterministic unsupported error while unregister and clear continue to call the Rust host. - Generated Python packages expose every input type that contains a public config dataclass as a public dataclass too, including optional nested config holders, so theiHigh10/1/2026
v0.103.1Fix `alef verify` fixed-point prediction for formatter-managed Rust output and managed `poly.toml` files, and exclude explicitly user-owned paths from generated-content drift checks.High9/30/2026
v0.103.0 ### Added - **A trait bridge can name the functions it does NOT attach to, via `[[crates.trait_bridges]] exclude_functions` (#476).** Every generated function taking the bridge's owning config struct picked up the bridge keyword, a synchronous diagnostic entry point where a listener means nothing included, and there was no way to say otherwise. Four separate predicates answered "does this function take the config" -- the shared `find_bridge_field`, the `.pyi` stub's own map walk, theHigh9/28/2026
v0.102.0### Fixed - **The Java backend emitted a binding that could not compile at all.** `exception_class.jinja` generated the root exception class (`{crate}RsException`) with only `(int code, String message)` and `(String message, Throwable cause)` constructors, while `error_gen/java_error_base.jinja` unconditionally generates `{BaseName}(final String message) { super(message); }` for a class that extends it. Every generated error hierarchy therefore failed `javac` with "no suitable construHigh9/28/2026
v0.99.0## [0.99.0] - 2026-09-27 ### Added - **e2e: fan the `mock.*` request-count capture out to go, ruby, php and java (#443).** Each backend now has its own `mock_assertions::snippets::mock_capture` table entry, an `assertion_mock_capture` module wired into that backend's own assertion renderer, and a once-per-suite helper (`alefMockRequestCount`/`alef_mock_request_count`, per language convention) rendered only when a fixture's assertion actually calls it. Ruby needed two call sites, not High9/27/2026
v0.96.5### Fixed - **extendr: an optional R options field is assigned `Some(..)` again.** `FieldDef` records a plain `Option<T>` as `ty: T` with `optional: true`; only a nested `Option<Option<T>>` carries an `Optional` `ty`. The struct emitter reads the flag and declares `Option<T>`, but the named-list decoder matched on `ty` alone and assigned a bare `T`, so the first `Option<String>` on a consumer's options struct (html-to-markdown's `ConversionOptions::base_url`) emitted `opts.base_url = High9/26/2026
v0.96.3Two independent generator fixes for untagged-union enums, both found by a consumer upgrading from 0.85.x: the magnus kwargs constructor no longer emits a `Default::default()` fallback for a field whose mirrored type has no `Default` impl (it raised `E0277` in the generated crate), and untagged `Vec<SealedClass>` variants in Kotlin keep their `@JsonTypeInfo` discriminator instead of serializing every element as `{}`. See CHANGELOG.md.High9/25/2026
v0.95.0 ### Added - **`[crates.e2e] timeout_seconds`** (default 1800): the kotlin_android e2e Gradle `Test` tasks now emit a `testLogging` block (passed/skipped/failed events, standard streams, full exception format) and a `timeout` on the task, so a hung native call fails with attribution instead of running until the CI job cap. ### Fixed - fix(e2e): guard the root-array `ArrayField { name: "" }` case in every remaining backend renderer. #411 fixed `[0].id` rendering for Ruby, Python and RustHigh9/21/2026
v0.94.0 ### Changed - **Python constructor stubs distinguish omitted Rust-default values from nullable arguments.** A defaulted field is now optional only when omitted, while an explicit `None` remains governed by the native constructor contract. - **Python unit enums provide integer-consistent hashing and typed tuple-variant factories.** Generated stubs and DTO coercion discovery match the runtime constructors and hash behavior. - **BREAKING (Magnus/Ruby): eligible tagged and untagged single-High9/20/2026
v0.92.1 ### Fixed - **PyO3: a non-optional DTO field defaulted by a resolved core function returning the core type (`CrawlConfig::ssrf`, `#[serde(default = "SsrfPolicy::from_env")]`) no longer breaks the generated crate.** The shared `serde_default_field_attr` fallback copied the attribute text verbatim, where `SsrfPolicy` names the *mirror* struct, which has no `from_env` (E0599). 0.92.0 exposed it: `extend_nonserializable_records` stopped marking every record holding a data enum `#[serde(sHigh9/18/2026
v0.91.5### Fixed - **The Go e2e emitter chose a raw (backtick) string literal for any assertion value without a backtick, `\r`, or NUL byte, with no regard for whether the value itself carried meaning in its whitespace.** A raw literal reproduces its content byte for byte, real newlines included, so a value with whitespace immediately before a newline lands as trailing whitespace on a physical source line -- exactly the shape of a Markdown two-space hard line break. `go_needs_quoted` (`src/eHigh9/17/2026
v0.91.4### Fixed - **The Go e2e emitter chose a raw (backtick) string literal for any assertion value without a backtick, `\r`, or NUL byte, with no regard for whether the value itself carried meaning in its whitespace.** A raw literal reproduces its content byte for byte, real newlines included, so a value with whitespace immediately before a newline lands as trailing whitespace on a physical source line -- exactly the shape of a Markdown two-space hard line break. `go_needs_quoted` (`src/eHigh9/17/2026
v0.90.0## [0.90.0] - 2026-09-16 ### Added - **An opt-in shell formatter, emitted as `[fmt.shell.shfmt]` in the generated `poly.toml`.** Declare `[workspace.poly.shell-formatter]` (`enabled`, `indent-width`) in `alef.toml` to have the scaffolder emit the table; absent, the generated output is unchanged and alef's pure-Rust-tooling policy holds. Without this, a consumer that needs its shell scripts formatted had no choice but to hand-edit the generated (and hash-stamped) `poly.toml` directly, wHigh9/16/2026
v0.88.0## What's Changed * chore(deps): lock file maintenance by @renovate[bot] in https://github.com/xberg-io/alef/pull/382 **Full Changelog**: https://github.com/xberg-io/alef/compare/v0.87.1...v0.88.0High9/14/2026
v0.87.1 ### Fixed - **(swift): an externally tagged enum carrying data on any variant now decodes serde's wire.** serde's default representation writes a fieldless variant as a bare string (`"plain"`) and a newtype variant as a single-keyed object whose value IS the payload (`{"custom":"foo"}`). `serde_codable_body` emitted a custom `Codable` for the internally tagged, adjacently tagged and untagged representations but fell through for the external one, leaving Swift's synthesized conformancHigh9/14/2026
v0.87.0 ### Added - **(swift): a promoted payload-carrying enum now declares `toString()`, returning its serde wire tag.** Only an all-unit enum is `RawRepresentable`, so before this a first-class enum with associated values exposed neither `.rawValue` nor `.toString()` and there was no way to read which variant a value held without a full `switch`. The returned value is the same tag the pre-promotion opaque binding's `to_string()` returned, computed by the same function the enum's own `CodaHigh9/13/2026
v0.85.1 ### Fixed - **0.85.0 fixed the type emitter but not the value emitter, so generated TypeScript referenced a member that no longer exists.** With `OutputFormat` correctly declared as a flat string union (`export type OutputFormat = "plain" | ... | (string & {})`), the e2e-fixture and docs-snippet emitters kept writing `OutputFormat.Markdown` and adding the enum to the *value* import list. A type alias has no value binding — and the napi package's `index.js` exports no such symbol — soHigh9/7/2026
v0.66.0 ### Added - **`alef generate --strict`**, meaning exactly what `alef all --strict` already documented: a configured formatter whose executable is not installed fails the run. A missing formatter stays non-fatal by default — `poly`, `rustfmt`, `cargo-sort` and `mix` are host toolchains a fresh clone may legitimately lack. - **e2e fixture validation for discarded URL literals.** A fixture that declares a scheme-carrying URL (`https://â€Ļ`, `gopher://â€Ļ`) for a `mock_url` / `mock_url_list` aHigh8/22/2026
v0.57.1 ### Fixed - **The Dart module file no longer emits an unused `import 'traits.dart';`.** 0.56.0 added the import unconditionally so that a doc comment naming a trait (`[OcrBackend]`) would not trip `comment_references`. But the module file usually names no trait at all, so `dart analyze` then reported the import as `unused_import` — a hard lint failure in every consuming repo that regenerated on 0.56.0 or 0.57.0. The import is now emitted only when the generated body actually refers tHigh8/7/2026
v0.45.0- **Go backend: download-at-consume native distribution.** Published Go modules no longer require native libraries inside the module (module zips only contain the git tag's files; `.lib/` stays gitignored). The generated `cmd/setup` tool replaces `cmd/download_ffi`: it downloads the platform FFI library from the GitHub release into a versioned user cache (`os.UserCacheDir()/<name>/go/<version>/<platform>`), verifies its SHA-256 sidecar, and writes a machine-local, gitignored cgo link sHigh7/25/2026
v0.36.2Fixed: repair four test-app generator defects for published packages (C# NuGet id, Go testify indirects, Dart download_libs, node/wasm stale JS lockfile). See CHANGELOG.High7/13/2026
v0.30.14## [0.30.14] - 2026-07-03 ### Fixed - **swift**: fix the `ExtractedDocument.tables()` opaque-`Vec` marshaling SIGSEGV (called out as still-open in 0.30.13). A `Vec<Named struct>` getter on a serde type was emitted as an opaque `RustVec<Table>`, which swift-bridge cannot marshal safely — dereferencing it (e.g. `.tables().count`) crashed at runtime with SIGSEGV. Such getters are now bridged as a JSON `Vec<String>` (mirroring the existing `Vec<Named enum>` handling), yielding a countablHigh7/3/2026
v0.26.0 ### Fixed - **version: `sync-versions` no longer rewrites externally-formatted scaffold/test-app files.** Commit `ff976c664` added a `format_generated` pass to the scaffold and test-app regen paths so `sync-versions` output matches the generate path. For repos that delegate all formatting to external tools (`[workspace.format] enabled = false`), `format_generated` is a permanent no-op, so the regen rewrote already-committed manifests (`package.json`, `composer.json`, `Package.swift`,High6/22/2026
v0.25.0 ### Added - **Extension API: per-extension TOML config and `transform_emitted_files` hook.** Two new capabilities on the `Extension` trait: (1) `parse_config` now receives the actual `[extensions.<name>]` section from `alef.toml` instead of always `None`. The pipeline reads the raw TOML at extract time (`extract.rs`) and generation time (`generation.rs`) and passes the matching sub-table keyed by `extension.name()`. Backwards compatible: extensions with no `[extensions.<name>]` blockHigh6/14/2026
v0.23.18alef v0.23.18High6/6/2026
v0.20.15 ### Fixed - **alef c e2e Makefile: declare `.DEFAULT_GOAL := all` so plain `make` builds run_tests instead of stopping after download_ffi.sh.** Without explicit default goal, Make picked the first explicit target rule encountered — `$(FFI_DIR)/include/ts_pack.h: download_ffi.sh` — causing `make` (no args) to only download FFI and exit instead of building the test binary. CI `E2E / Test C FFI` job failed with `sh: 1: ./run_tests: not found`. Fixed by adding `.DEFAULT_GOAL := all` after variableHigh5/29/2026
v0.17.34**Full Changelog**: https://github.com/kreuzberg-dev/alef/compare/v0.17.33...v0.17.34High5/22/2026
v0.16.12 ### Fixed - **kotlin-android: add Jackson runtime deps to `build.gradle.kts` template**: alef v0.16.11 added `@JsonDeserialize` to sealed-class Kotlin DTOs for serde-tagged polymorphism, but the kotlin-android `build.gradle.kts` template still only declared `kotlin-stdlib` + `kotlinx-coroutines-android`. The compileDebugKotlin task failed with `Unresolved reference 'com'` / `Unresolved reference 'codec'` / `Unresolved reference 'asText'` etc. Adds `jackson-databind` (for the annotaHigh5/15/2026
v0.15.5fix(napi-backend): correct untagged enum heuristic Only treat enums as untagged when they have `#[serde(untagged)]`, not just any enum without `#[serde(tag = "...")]`. Absence of `serde_tag` means default externally-tagged serialization. Previously `VisitResult` and similar enums were misclassified as untagged, emitting an unusable `serde_json::Value` wrapper instead of a `#[napi(string_enum)]`. Same heuristic fix applied to Go, C#, and Java backends.High5/9/2026
v0.14.3Per-host doc-comment renderers (JSDoc, JavaDoc, C# XML, PHPDoc, Doxygen) plus magnus/php/rustler/extendr/wasm `unregister_*`/`clear_*` trait-bridge emission. Shared `host_function_path` helper consolidates pyo3/napi/etc. resolution. See [CHANGELOG](./CHANGELOG.md#0143---2026-05-03) for details.High5/3/2026
v0.8.7Fix CI hang in csharp `alef setup` and replace TODO placeholder in alef-generated READMEs. ## Fixed - **C# setup**: `dotnet restore packages/csharp` was walking the entire repo when no top-level `.csproj` existed (timeout on CI). Now uses `find -maxdepth 3` to resolve the first project file, with the precondition guarding the call. - **README placeholders**: alef-generated READMEs no longer emit `// TODO: add usage example`. They now point readers to the main repository's docs.High4/27/2026
v0.5.2**Full Changelog**: https://github.com/kreuzberg-dev/alef/compare/v0.5.1...v0.5.2High4/22/2026
v0.5.1**Full Changelog**: https://github.com/kreuzberg-dev/alef/compare/v0.5.0...v0.5.1High4/21/2026
v0.5.0**Full Changelog**: https://github.com/kreuzberg-dev/alef/compare/v0.4.6...v0.5.0High4/21/2026
v0.4.6### Added - Config: `exclude_functions` and `exclude_types` support for Python (PyO3), FFI, and Node (NAPI) backends ### Fixed - WASM: always import `js_sys`, skip functions referencing excluded types - Rustler: fix f32/f64 stub return values (`0` → `0.0`) - Codegen: use Debug formatting for sanitized Vec conversions - Codegen: extend `gen_serde_let_bindings` to handle `Vec<Named>` params - PyO3/Rustler/WASM: suppress generated-code clippy lintsHigh4/21/2026
v0.4.5**Full Changelog**: https://github.com/kreuzberg-dev/alef/compare/v0.4.4...v0.4.5High4/21/2026
v0.4.4### Changed - CLI: parallelize code generation, build, lint, and test loops with rayon - CLI: parallelize file writing and diff checks across languages - CLI: build commands within independent and FFI-dependent groups run concurrently - CLI: switch rustfmt to stdin-based piping with explicit `--config-path` (thread-safe, respects `rustfmt.toml` from any CWD) - CLI: lazy-compile fixed regex patterns in version sync with `LazyLock` - Docs: replace `push_str(&format!())` with `write!()` macro to eHigh4/21/2026
v0.4.2## What's Changed ### Added - **Trait bridge codegen** — auto-generate FFI bridges for Rust traits (PyO3 backend) - Shared `TraitBridgeGenerator` trait and `TraitBridgeSpec` for cross-backend bridge generation - `[[trait_bridges]]` config table for per-trait bridge configuration - `super_traits` and `has_default_impl` IR fields for trait analysis - `CoreWrapper::ArcMutex` variant for `Arc<Mutex<T>>` wrapping - E2E standalone mock server, WASM globalSetup, `count_equals`/`is_true` assertions - BHigh4/20/2026
v0.4.1## What's Changed ### Added - E2E: `MockResponse` struct on `Fixture` for mock HTTP server support - E2E: Rust mock server codegen — generates Axum-based mock servers from fixture `MockResponse` data - E2E: always add `[workspace]` to generated Cargo.toml ### Fixed - Codegen fixes across all backends for liter-llm migration compliance - Python: D101 docstrings, mypy dict type args, exception docstrings - Java: tagged union newtype variants use `@JsonUnwrapped` - NAPI: wrap boxed enum variantHigh4/19/2026
v0.4.0**Full Changelog**: https://github.com/kreuzberg-dev/alef/commits/v0.4.0High4/19/2026
v0.3.5**Full Changelog**: https://github.com/kreuzberg-dev/alef/compare/v0.3.4...v0.3.5High4/16/2026
v0.3.4## Added - `alef sync-versions --set <version>` — set an explicit version (supports pre-release like `0.1.0-rc.1`) - `alef verify` now checks version consistency across all package manifests - `alef-sync-versions` pre-commit hook for automatic version propagation on Cargo.toml changes - PEP 440 pre-release conversion for Python (`0.1.0-rc.1` → `0.1.0rc1`) - `reverse_conversions` config flag to gate binding-to-core `From` impls - E2E registry mode for test_apps generation across all 12 languagesHigh4/15/2026
v0.3.3## Added - Distributable Claude Code skill for alef consumers ## Fixed - PHP 100% coverage — `createEngineFromJson`, JSON config e2e support - PHP snake_case properties, enum scalars, serde casing, camelCase facade - PHP class registration, property access, per-field attributes - PHP setters documented, enum serde casing via `serde_json` - PHP tests updated for `Api` class pattern (no more standalone `#[php_function]`) - Correct DTO style naming (`typed-dict` not `typeddict`), add `serde_renaHigh4/14/2026
v0.3.2### Fixed - Disable `jsonschema` default features (`resolve-http`, `tls-aws-lc-rs`) to remove `reqwest`/`aws-lc-sys` from dependency tree, fixing GoReleaser cross-compilation **Full Changelog**: https://github.com/kreuzberg-dev/alef/blob/main/CHANGELOG.mdHigh4/13/2026
v0.3.1### Fixed - Elixir resource registration and enum conversion fixes - C# opaque handle wrapping, error handling, `Json` to `object` type mapping, `WhenWritingDefault` serialization - Dropped `x86_64-apple-darwin` from GoReleaser targets (`aws-lc-sys` cross-compile failure) **Full Changelog**: https://github.com/kreuzberg-dev/alef/blob/main/CHANGELOG.mdMedium4/13/2026
v0.3.0## What's Changed ### Added - Pre-commit hook support for consumer repos (`alef-verify` and `alef-generate` hooks) - Blake3-based caching for stubs, docs, readme, scaffold, and e2e generation - `cargo binstall alef-cli` support via binstall metadata - `alef-docs` and `alef-e2e` added to crates.io publish workflow - Kreuzberg banner, crates.io badges, and Discord links on all crate READMEs - CHANGELOG.md with backfilled v0.1.0 and v0.2.0 entries ### Changed - All workspace dependencies consolidMedium4/13/2026
0.0.0No release found — using repo HEADHigh4/11/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

kreuzbergA polyglot document intelligence framework with a Rust core. Extract text, metadata, images, and structured information from PDFs, Office documents, images, and 91+ formats. Available for Rust, Pythonv1.3.10
otpiserGenerate OTP supervision trees and fault-tolerance scaffoldingmain@2026-11-07
ponyiserWrap concurrent code in Pony reference capabilities for data-race freedommain@2026-11-07
oblibeniserMake operations reversible and auditable via OblíbenÃŊmain@2026-11-07
spiderly-websiteSpiderly Website - FAQ, Documentation, Pricing, and License Purchasing for the Core Spiderly Library.master@2026-11-07

More from kreuzberg-dev

kreuzbergA polyglot document intelligence framework with a Rust core. Extract text, metadata, images, and structured information from PDFs, Office documents, images, and 91+ formats. Available for Rust, Python

More in Uncategorized

AutoGPTAutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
openai-pythonThe official Python library for the OpenAI API
semantic-kernelIntegrate cutting-edge LLM technology quickly and easily into your apps