{"id":51022753,"url":"https://github.com/atelierarith/rustcall.jl","last_synced_at":"2026-06-21T17:01:24.553Z","repository":{"id":331541285,"uuid":"1130777811","full_name":"AtelierArith/RustCall.jl","owner":"AtelierArith","description":"It's the last call for headache.","archived":false,"fork":false,"pushed_at":"2026-04-25T06:30:00.000Z","size":4907,"stargazers_count":19,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-25T07:27:03.521Z","etag":null,"topics":["aigenerated","julia","rust"],"latest_commit_sha":null,"homepage":"https://atelierarith.github.io/RustCall.jl/","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AtelierArith.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":"terasakisatoshi"}},"created_at":"2026-01-09T02:07:29.000Z","updated_at":"2026-04-25T06:16:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/AtelierArith/RustCall.jl","commit_stats":null,"previous_names":["atelierarith/lastcall.jl","atelierarith/rustcall.jl"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AtelierArith/RustCall.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AtelierArith%2FRustCall.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AtelierArith%2FRustCall.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AtelierArith%2FRustCall.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AtelierArith%2FRustCall.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AtelierArith","download_url":"https://codeload.github.com/AtelierArith/RustCall.jl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AtelierArith%2FRustCall.jl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34618484,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-21T02:00:05.568Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aigenerated","julia","rust"],"created_at":"2026-06-21T17:01:19.174Z","updated_at":"2026-06-21T17:01:24.536Z","avatar_url":"https://github.com/AtelierArith.png","language":"Julia","funding_links":["https://github.com/sponsors/terasakisatoshi"],"categories":[],"sub_categories":[],"readme":"# RustCall.jl\n\n[![CI](https://github.com/atelierarith/RustCall.jl/actions/workflows/CI.yml/badge.svg)](https://github.com/atelierarith/RustCall.jl/actions/workflows/CI.yml)\n\nRustCall.jl is a Julia package for calling Rust code directly. It covers the common paths from this repository: inline Rust via `rust\"\"\"...\"\"\"`, explicit FFI calls with `@rust`, lightweight inline expressions with `@irust`, `#[julia]`-based wrapper generation, and external crate loading with `@rust_crate`.\n\nIt is inspired by [Cxx.jl](https://github.com/JuliaInterop/Cxx.jl), but targets Rust.\n\n## Installation\n\nRequirements:\n\n- Julia 1.12 or later\n- Rust toolchain (`rustc` and `cargo`) available in `PATH`\n\n```julia\nusing Pkg\nPkg.add(\"RustCall\")\n```\n\nRustCall.jl is registered in Julia's General registry. `Pkg.add(\"RustCall\")` installs the package and builds the helper library used by ownership-related features such as `RustBox`, `RustRc`, `RustArc`, `RustVec`, and `RustSlice`.\n\nIf the helper library needs to be rebuilt, run:\n\n```julia\nusing Pkg\nPkg.build(\"RustCall\")\n```\n\n## Quick Start\n\nThe simplest path is to annotate Rust functions with `#[julia]` and call the generated Julia wrapper directly.\n\n```julia\nusing RustCall\n\nrust\"\"\"\n#[julia]\nfn add(a: i32, b: i32) -\u003e i32 {\n    a + b\n}\n\"\"\"\n\nadd(10, 20) # 30\n```\n\nIf you want explicit C-ABI style calls, use `@rust`.\n\n```julia\nusing RustCall\n\nrust\"\"\"\n#[no_mangle]\npub extern \"C\" fn multiply(a: i32, b: i32) -\u003e i32 {\n    a * b\n}\n\"\"\"\n\n@rust multiply(Int32(6), Int32(7))::Int32 # 42\n```\n\nFor small expressions inside Julia functions, `@irust` captures Julia variables with `$var`.\n\n```julia\nusing RustCall\n\nfunction affine(a, x, b)\n    @irust(\"\\$a * \\$x + \\$b\")\nend\n\naffine(Int32(2), Int32(10), Int32(3)) # 23\n```\n\n## Main APIs\n\n- `rust\"\"\"...\"\"\"` / `@rust_str`: compile Rust code, cache the build artifact, and make it available in the current Julia module\n- `#[julia]`: generate Julia-callable wrappers for Rust functions and structs\n- `@rust`: call exported functions through a C-compatible ABI\n- `@irust`: compile a small Rust expression with Julia variable capture\n- `@rust_crate`: build and load an external crate annotated with `#[julia]`\n- `@rust_llvm`: experimental LLVM-based call path\n\nRust dependencies can be declared inline with `// cargo-deps:` or fenced `cargo` blocks. The first build may need network access.\n\n## External Crates\n\n`@rust_crate` loads a Rust crate and returns a Julia module-like binding object.\n\n```julia\nusing RustCall\n\nconst MyCrate = @rust_crate \"/path/to/my_crate\"\nMyCrate.add(Int32(1), Int32(2)) # 3\n```\n\nFor crate-side bindings, use the companion `juliacall_macros` crate and mark exported items with `#[julia]`.\n\n## Documentation And Examples\n\n- Documentation: \u003chttps://atelierarith.github.io/RustCall.jl\u003e\n- Examples: [`examples/`](examples)\n- Tutorial source: [`docs/src/tutorial.md`](docs/src/tutorial.md)\n- API reference source: [`docs/src/api.md`](docs/src/api.md)\n- Troubleshooting source: [`docs/src/troubleshooting.md`](docs/src/troubleshooting.md)\n\n## Development\n\nFor a local checkout:\n\n```bash\njulia --project -e 'using Pkg; Pkg.instantiate()'\njulia --project -e 'using Pkg; Pkg.build(\"RustCall\")'\njulia --project -e 'using Pkg; Pkg.test()'\njulia --project=docs docs/make.jl\n```\n\nThe main package entry point is `src/RustCall.jl`. Runnable examples live in `examples/`.\n\n## Acknowledgments\n\nRustCall.jl has been implemented with support from AI coding tools and agents including Codex, Claude Code, and Cursor.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatelierarith%2Frustcall.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatelierarith%2Frustcall.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatelierarith%2Frustcall.jl/lists"}