A Rust compiler front-end for IDEs
Find a file
bors 6f0c7511c0 Auto merge of #135695 - Noratrieb:elf-raw-dylib, r=bjorn3
Support raw-dylib link kind on ELF

raw-dylib is a link kind that allows rustc to link against a library without having any library files present.
This currently only exists on Windows. rustc will take all the symbols from raw-dylib link blocks and put them in an import library, where they can then be resolved by the linker.

While import libraries don't exist on ELF, it would still be convenient to have this same functionality. Not having the libraries present at build-time can be convenient for several reasons, especially cross-compilation. With raw-dylib, code linking against a library can be cross-compiled without needing to have these libraries available on the build machine. If the libc crate makes use of this, it would allow cross-compilation without having any libc available on the build machine. This is not yet possible with this implementation, at least against libc's like glibc that use symbol versioning. The raw-dylib kind could be extended with support for symbol versioning in the future.

This implementation is very experimental and I have not tested it very well. I have tested it for a toy example and the lz4-sys crate, where it was able to successfully link a binary despite not having a corresponding library at build-time.

I was inspired by Björn's comments in https://internals.rust-lang.org/t/bundle-zig-cc-in-rustup-by-default/22096/27
Tracking issue: #135694

r? bjorn3

try-job: aarch64-apple
try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
try-job: test-various
2025-03-04 15:39:44 +00:00
.cargo fix: Fix generated markers not being patchable in package.json 2024-06-08 12:54:43 +02:00
.github Update Node.js, vscode, and ts deps 2025-02-27 20:53:48 +01:00
.vscode feat: use vscode log format for client logs 2024-07-27 21:43:35 -07:00
assets Automatically change text color in logo based on dark mode 2022-03-06 23:06:53 +11:00
bench_data Spelling 2023-04-19 09:45:55 -04:00
crates Rollup merge of #137921 - lnicola:sync-from-ra, r=lnicola 2025-03-03 20:47:14 +01:00
docs/book Merge pull request #19259 from Veykril/push-skmvrmtorqso 2025-03-02 07:41:42 +00:00
editors/code Fix transparent diagnostics 2025-03-02 16:05:59 +02:00
lib line-index: don't try to use neon on big-endian aarch64. 2025-02-04 15:22:49 +00:00
xtask Use cargo zigbuild for releases 2025-02-26 14:16:09 +02:00
.editorconfig Fix editorconfig glob 2024-10-19 01:10:31 +03:00
.git-blame-ignore-revs Fix some mir eval/lowerings 2025-02-03 14:42:41 +01:00
.gitattributes Fix .gitattributes for test_data 2022-07-24 14:05:35 +02:00
.gitignore manual: Convert to mdbook 2025-01-24 13:23:22 -08:00
.typos.toml Disable typos checker for the target feature names 2025-02-25 05:02:17 +02:00
Cargo.lock Bump rustc crates 2025-03-03 08:43:57 +02:00
Cargo.toml Bump rustc crates 2025-03-03 08:43:57 +02:00
clippy.toml Enforce a current directory being set for spawned commands 2024-12-29 12:51:13 +01:00
CONTRIBUTING.md move dev docs to manual 2025-02-17 10:47:27 -08:00
LICENSE-APACHE Drop Apache license appendices 2024-08-27 14:52:34 +03:00
LICENSE-MIT Licenses 2018-01-10 22:47:04 +03:00
PRIVACY.md Update PRIVACY.md 2025-02-07 20:18:21 +01:00
README.md move dev docs to manual 2025-02-17 10:47:27 -08:00
rust-version Preparing for merge from rust-lang/rust 2025-03-03 08:38:14 +02:00
rustfmt.toml Shuffle hir-expand things around 2024-01-26 19:28:39 +01:00
triagebot.toml Enable triagebot transfer feature 2024-11-04 21:35:10 +02:00

rust-analyzer logo

rust-analyzer is a modular compiler frontend for the Rust language. It is a part of a larger rls-2.0 effort to create excellent IDE support for Rust.

Quick Start

https://rust-analyzer.github.io/book/installation.html

Documentation

If you want to contribute to rust-analyzer check out the CONTRIBUTING.md or if you are just curious about how things work under the hood, see the Contributing section of the manual.

If you want to use rust-analyzer's language server with your editor of choice, check the manual. It also contains some tips & tricks to help you be more productive when using rust-analyzer.

Security and Privacy

See the security and privacy sections of the manual.

Communication

For usage and troubleshooting requests, please use "IDEs and Editors" category of the Rust forum:

https://users.rust-lang.org/c/ide/14

For questions about development and implementation, join rust-analyzer working group on Zulip:

https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer

License

rust-analyzer is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT for details.