Skip to content

Latest commit

 

History

History
57 lines (49 loc) · 2.92 KB

File metadata and controls

57 lines (49 loc) · 2.92 KB

API Reference

The reference is split into one page per group of source files (#288); every docstring in the package is rendered on exactly one of them. This page is the index. Only the macros are exported; everything else is reached as RustCall.name.

Modules = [RustCall]
Pages = [joinpath("src", "RustCall.jl")]

Macros

  • @rust_strrust"""...""": compile a Rust snippet and register its functions.
  • @rust — call a registered Rust function.
  • @irust / @irust_str — inline Rust with $var binding.
  • @rust_crate — bind an external crate.

@rust_llvm and the LLVM IR integration path were removed in 0.3.0 (#265); use @rust.

Pages

  • Artifact identity and cachingArtifactId and artifact_key, the one place an artifact is named, and the Scratch.jl cache that stores what it names (artifact_id.jl, cache.jl).
  • The FFI type contract — the Rust ↔ Julia type table every code path consults, and the type translation shims over it (ffi_contract.jl, typetranslation.jl).
  • Compilation and codegenrust"""...""", @rust and @irust, the rustc invocation and the generated ccalls (ruststr.jl, rustmacro.jl, compiler.jl, codegen.jl).
  • The FFI manifest — the rustcall-extract interface: manifests, inline expansion, specialization and the toolchain fingerprint (manifest.jl).
  • Cargo projects and dependencies// cargo-deps:, dependency resolution, and the generated Cargo projects and their build cache (dependencies.jl, dependency_resolution.jl, cargoproject.jl, cargobuild.jl).
  • External crates and hot reload@rust_crate bindings and hot reload (crate_bindings.jl, hot_reload.jl).
  • PyO3 crates — the wrapper crate built around a PyO3 extension module, its link plan and skip reasons (pyo3.jl).
  • Types, memory and ownershipRustResult, RustOption, the ownership wrappers, the Rust helpers library and the Julia types generated for #[julia] structs (types.jl, memory.jl, structs.jl).
  • Generics and #[julia] functions — the generic function registry, monomorphization, and the wrappers for #[julia] free functions (generics.jl, julia_functions.jl).
  • Errors and load policy — the exception types and the one load/unload path (exceptions.jl, loadpolicy.jl).

Internal registries and constants (RustCall.RUST_LIBRARIES, RustCall.CURRENT_LIB, RustCall.GENERIC_FUNCTION_REGISTRY, …) are rendered on the page of the file that defines them. They are implementation details, documented for completeness, and should not be accessed directly by users.