Unreleased
v0.9.2 - 2026-07-06
- Improve Rusty-Elixir propagation and borrow inference for fallible option
cases,
some(...),unwrap_or,decode_as!,map_get, fallible reference access, list/slice arguments, loop bindings, and method arguments. - Improve callable metadata lookup for qualified method receivers and add corpus
coverage for
impl Into<Option<T>>argument propagation. - Refresh README, guide, skill, and module docs around inference-first authoring
with less explicit
unwrap!,ref, andmut_refboilerplate.
v0.9.1 - 2026-07-06
- Improve expected-input inference for callable arguments, including fallible
casescrutinees, associated calls, and slice/Vecborrow adaptation. - Add corpus coverage for semantic
defrustmacroitem calls and recent propagation/borrow inference regressions.
v0.9.0 - 2026-07-06
This release is a large Rusty-Elixir self-hosting and downstream dogfooding release. It expands structural Rust generation, improves type-driven lowering, and fixes a major compile-time performance regression exposed by Skia dogfood.
Added
- Add Rust type item generation from
@typealiases, including type aliases, structs, enums, and Rust-only support records that do not force generated Rustler term decoders. - Add
R.enum(...)for explicit Rust enum type items and fix zero-arity type alias resolution for bare@type name :: ...declarations. - Add structural
macro_rules!AST support and native validation/rendering for macro variables, captures, repetitions, and macro repeat expressions. - Add AST walking utilities for RustQ AST traversal and mutation analysis.
- Add golden corpus tooling for Rusty-Elixir lowering, with coverage reporting by category.
- Add semantic
enum_variant(Type, :variant, ...)lowering for constructing Rust enum variants from Rusty-Elixir without token macros. - Add semantic item-producing
defrustmacrocalls and macro item call support. - Add
defrustmacrosupport for compactskip_fieldsand sparse struct field descriptor row patterns. - Add idiomatic Clippy lint paths for Rust-facing attributes, such as
@allow Clippy.redundant_field_namesrendering to#[allow(clippy::redundant_field_names)]. - Add dev-only RustQ Reach smell checks and dogfood them in strict mode for raw
Rust escapes, low-level Rusty-Elixir control flow, trivial
defrustwrappers, and blocklessdefrustmodaliases.
Changed
- Extend
defrustmacrowith identifier/literal captures, item-generating innerdefrustbodies, multiple generated item bodies, andrepeat ... domacro-template repetitions. - Lower calls to known
defrustmacrohelpers as generated Rust macro invocations, and support remote Rust macro calls such asDebug.trace!(value). - Replace ad hoc macro metavariable spacing cleanup with structural macro repeat expression rendering.
- Remove the process dictionary from Rusty-Elixir lowering; lowering state is now threaded explicitly through expression, call-argument, alias, array, control-flow, return, and expected-expression lowering.
- Make context-aware expression lowering the primary lowering path.
- Expand type-driven checking for expected expression positions, including
returns, call arguments, struct fields,
casearms,ifbranches,with/for reducebodies, closures, field access, statics, array literals, and optionsome(...)wrappers. - Infer downstream types through value uses such as comparisons,
binary_search_by_key, receiver method calls, mutableVec::push, option case bindings, option adapters, package free functions, andSelf-based impl callables. - Import free functions from configured Cargo packages in addition to impl methods.
- Resolve
Selftypes in impl callable metadata to the concrete impl target. - Keep
__rustq_callables__/0exports limited to local RustQ callables instead of embedding all external/package callables into every module. External callables are still available during compilation through cached source/package resolution. - Document item-generating
defrustmacropatterns for compact generated Rust that keeps implementation logic in Rusty-Elixir. - Document when to use ordinary Elixir
defmacrofor authoring-layer reuse versusdefrustmacrofor intentionally reducing generated Rust size.
Fixed
- Parse Rust bare function pointer types structurally through
synmetadata instead of regexing rendered Rust type strings. - Mark function pointer types as non-decodable where Rustler decoding cannot be derived safely.
- Auto-borrow binary-search keys, array literals expected as slices, call
arguments, option
some(...)inners, option adapter inners, external statics, and several downstream value-use patterns. - Avoid applying
?toOption<T>values inResult/NifResultcontexts where Rust does not support that propagation boundary. - Infer external static types and generated static types for auto-borrowing.
- Preserve explicit
R.raw(...)as an escape hatch while using structuredsynmetadata where available. - Fix zero-cost package metadata reuse after Skia dogfood: generated checks that previously ballooned to roughly 75–80 seconds now avoid duplicating thousands of external callables into every module.
v0.8.3 - 2026-06-28
- Infer propagation for source-backed receiver method calls when the receiver type is known.
- Index Rust source callables by normalized receiver target names.
- Strengthen metadata guidance for avoiding
unwrap!when Rust source metadata can be configured.
v0.8.2 - 2026-06-26
- Add the RustQ agent skill to the Hex package and documentation.
- Add guidance for authoring RustQ generators with
defrust, AST builders, metadata, inference, and explicit escape boundaries. - Document expression-oriented Rusty-Elixir style and recursion/reducer patterns.
v0.8.1 - 2026-06-25
- Add Rustler fixed struct term helpers for cached keys, default values, and raw
NIF_TERMmap construction. - Use
Atom::from_strfor generated cached atom helpers. - Add missing Rust integer marker types to
RustQ.Type.
v0.8.0 - 2026-06-25
- Add semantic control-flow lowering for expression-oriented Rusty-Elixir.
- Support macro-generated
caseclauses indefrustlowering.
v0.7.0 - 2026-06-25
- Add
ok_or!(option_expr, error_expr)as the Rusty-Elixir idiom for explicitOption<T>toResult<T, E>propagation boundaries. - Extend type-driven propagation inference with nested Rust module function
metadata, downstream receiver-method let inference,
as_slice()adapters, source-backedFrom<A> for Bcompatibility forimpl Into<B>, and associated-type metadata such asimpl IntoIterator<Item = T>. - Add source-backed callable metadata from Rust source files, Cargo packages, and callable modules.
- Dogfood native RustQ AST generation in Rustler atom dispatch, tagged enum, macro item, and native codegen helper paths.
- Add structured diagnostics for RustQ configuration, source loading, lowering, and native rendering failures.
v0.6.0 - 2026-06-19
- Reframe Rusty Elixir as the high-level
defrustauthoring surface. - Add external Rust type specs through ordinary remote types such as
GeneratedOpts.OvalOpts.t(RustQ.Type.lifetime(:a)). - Add ordinary Elixir macro expansion before
defrustlowering so reusable Rusty-Elixir body fragments can usedefmacro,quote, andunquote. - Lower plural alias calls such as
Atoms.fill()to snake-case Rust module calls such asatoms::fill(). - Demote
RustQ.Meta.quotedandRustQ.Type.pathto low-level escape hatches instead of the normal authoring style. - Add small AST reuse bridges for RustQ-owned codegen helpers:
RustQ.Rust.ast_item/1,RustQ.Rust.ast_items/1, and the internalRustQ.Meta.item(module, name)/items(module, names)/ast!(module, name)helpers. - Add Rust AST support for receiver arguments and lifetime-bearing impl blocks,
including Rustler shapes such as
impl<'a> rustler::Decoder<'a> for Typeandfn encode<'a>(&self, env: rustler::Env<'a>) -> rustler::Term<'a>. - Dogfood Rustler helper generation through
defrustand RustQ AST builders: term helpers, opts helpers, term builders, cached atoms, atom decoders, tagged enum decoders/encoders, resources, and term decoder shells no longer rely on hand-written helper templates. Explicit rawNIF_TERMbuilders remain the unsafe escape hatch.
v0.5.1 - 2026-06-15
- Add generic Rust expression builders:
Rust.call_expr/3Rust.some/1Rust.none/0Rust.tuple/1Rust.cast/2Rust.question/1Rust.ref_expr/2
v0.5.0 - 2026-06-15
- Add template includes.
- Add composable RustQ splice groups.
- Use plain keyword splices for composition.
- Add structured include diagnostics.
- Add rustfmt option.
- Add generic Rust body/control-flow builders:
Rust.block/1Rust.let_/2Rust.let_mut/2Rust.assign/2Rust.call_stmt/3Rust.return_if/2Rust.if_/3Rust.if_let/4Rust.match_/2
- Document macro token placeholder limitation.
v0.4.0 - 2026-06-06
- Add generic Rustler builders for atom decoders, atom dispatch functions, and keyword/options helper functions.
v0.3.0 - 2026-06-06
- Remove the generic Rustler schema field group DSL. Prefer explicit fields in RustQ schemas or project-specific macros for domain shorthand.
v0.2.2 - 2026-06-03
- Add
RustQ.Rustler.resource_handle/2for generating a Rustler resource plus a decoder for Elixir-facing resource handle structs/maps. - Add Rustler schema field groups for reusable field sets with
use_fields/1. - Let Rustler schema nodes override generated Rust type names and Elixir module
names with
rust:andmodule:.
v0.2.1 - 2026-06-03
- Add
RustQ.Rustler.nif_export/2andnif_exports/1for generating exported Rustler NIF functions that delegate to handwritten implementation functions.
v0.2.0 - 2026-06-02
- Replace the separate
__expr_,__type_, and__splice_placeholder prefixes with one visually distinct__rq_placeholder prefix. - Templates now use forms like
__rq_Name,__rq_value!(),__rq_fields: (),, and__rq_items!();.
v0.1.2 - 2026-06-02
- Let Rustler schema field types reference schema nodes and tagged enums by
schema name, so examples can use
Contentinstead of generated Rust names likeExContent.
v0.1.1 - 2026-06-02
- Keep the packaged NIF crate out of parent Cargo workspaces when RustQ is used inside workspace-based projects.
v0.1.0 - 2026-06-02
Initial release.
- Parse, validate, render, bind, and splice Rust templates from Elixir.
~Rsigil for inline Rust templates.- Rust fragment builders for functions, structs, enums, impls, fields, constants, uses, modules, and type aliases.
- Rustler helper generators for atoms, NIFs, resources, option decoders, term helpers, term decoders, NIF structs, tagged enums, cached atoms, safe term builders, and explicit raw
NIF_TERMbuilders. rustq.exsmanifest DSL plusmix rustq.genfor generated file syncing and stale checks.- Rustler schema DSL for generating Rust NIF structs and tagged enums from Elixir schema definitions.