Resolves callable metadata from RustQ modules, Rust source files, and Cargo packages.
This module is the source-backed callable metadata boundary used by
RustQ.Meta. It keeps parsing, package indexing, alias-equivalence annotation,
caching, and configuration diagnostics out of the macro frontend.
Summary
Functions
The RustQ modules asts name through alias, which a module imports as it does its
:callable_modules, the way Elixir resolves a module by its name.
The module an alias in a RustQ module names, when it was written through alias: found among
env's aliases, or recorded on the alias by quote in the macro that wrote it. Other aliases
are Rust paths.
Resolves external callable metadata configured on a use RustQ.Meta module.
Resolves external static item types configured on a use RustQ.Meta module.
The type aliases declared by a module's callable modules, so its specs and types may name them as their own.
Callables read from a module's :provides files, which join its own in
__rustq_callables__/0.
Rust source of a module's :provides files, as the module emits it.
Rust types declared in a module's :provides files, as the Elixir types other modules name
them by: KiwiRecord is kiwi_record(). Types with lifetimes or type parameters are left
out.
Expands Rust source paths relative to the current project working directory.
Types
Functions
@spec aliased_callable_modules([Macro.t()], Macro.Env.t()) :: [module()]
The RustQ modules asts name through alias, which a module imports as it does its
:callable_modules, the way Elixir resolves a module by its name.
@spec aliased_module(Macro.t(), Macro.Env.t()) :: module() | nil
The module an alias in a RustQ module names, when it was written through alias: found among
env's aliases, or recorded on the alias by quote in the macro that wrote it. Other aliases
are Rust paths.
@spec external_callables(module()) :: [RustQ.Binding.Callable.t()]
Resolves external callable metadata configured on a use RustQ.Meta module.
@spec external_static_types(module()) :: %{optional(atom()) => RustQ.Meta.Type.t()}
Resolves external static item types configured on a use RustQ.Meta module.
The type aliases declared by a module's callable modules, so its specs and types may name them as their own.
@spec provided_callables(module()) :: [RustQ.Binding.Callable.t()]
Callables read from a module's :provides files, which join its own in
__rustq_callables__/0.
Rust source of a module's :provides files, as the module emits it.
@spec provided_types(module()) :: %{optional({atom(), 0}) => RustQ.Meta.Type.t()}
Rust types declared in a module's :provides files, as the Elixir types other modules name
them by: KiwiRecord is kiwi_record(). Types with lifetimes or type parameters are left
out.
Expands Rust source paths relative to the current project working directory.