1
Fork 0
Empowering everyone to build reliable and efficient software. Gabriel's commits. https://www.rust-lang.org/
Find a file
Chris Denton a9f8f8b070
Rollup merge of #122583 - Zoxc:tls-non-mut, r=joboet
Use `UnsafeCell` for fast constant thread locals

This uses `UnsafeCell` instead of `static mut` for fast constant thread locals. This changes the type of the TLS shims to return `&UnsafeCell<T>` instead of `*mut T` which means they are always non-null so LLVM can optimize away the check for `Some` in `LocalKey::with` if `T` has no destructor.

LLVM is currently unable to do this optimization as we lose the fact that `__getit` always returns `Some` as it gets optimized to just returning the value of the TLS shim.
2024-03-16 18:27:34 +00:00
.github Bump cargo update PR more often 2024-03-14 11:24:09 +00:00
.reuse std: move Once implementations to sys 2024-03-12 15:41:06 +01:00
compiler Auto merge of #122309 - g-yziquel:issue-122262, r=saethlin 2024-03-16 09:19:08 +00:00
library Rollup merge of #122583 - Zoxc:tls-non-mut, r=joboet 2024-03-16 18:27:34 +00:00
LICENSES
src Rollup merge of #122401 - ChrisDenton:check-tier1, r=Mark-Simulacrum 2024-03-16 18:27:33 +00:00
tests Auto merge of #122371 - oli-obk:visit_nested_body, r=tmiasko 2024-03-16 04:35:02 +00:00
.editorconfig
.git-blame-ignore-revs
.gitattributes
.gitignore Cleanup .gitignore 2024-03-08 19:52:57 +00:00
.gitmodules
.mailmap
Cargo.lock Rollup merge of #122390 - ChrisDenton:bindgen, r=Mark-Simulacrum 2024-03-16 18:27:33 +00:00
Cargo.toml LLVM Bitcode Linker: Added crate 2024-03-11 13:35:35 +01:00
CODE_OF_CONDUCT.md
config.example.toml [bootstrap] Move the split-debuginfo setting to the per-target section 2024-03-11 20:17:00 +01:00
configure
CONTRIBUTING.md
COPYRIGHT
INSTALL.md Revert back to Git-for-Windows for MinGW CI builds 2024-03-07 03:09:29 +00:00
LICENSE-APACHE
LICENSE-MIT
README.md
RELEASES.md
rust-bors.toml Increase timeout for new bors bot 2024-03-13 08:31:07 +01:00
rustfmt.toml Remove exception for deleted file from rustfmt.toml 2024-03-08 20:46:33 +00:00
triagebot.toml Rollup merge of #122429 - rcvalle:rust-triagebot-add-exploit-mitigations-pg, r=wesleywiser 2024-03-13 20:01:56 +01:00
x
x.ps1
x.py

The Rust Programming Language

Rust Community

This is the main source code repository for Rust. It contains the compiler, standard library, and documentation.

Note: this README is for users rather than contributors. If you wish to contribute to the compiler, you should read CONTRIBUTING.md instead.

Table of Contents

Quick Start

Read "Installation" from The Book.

Installing from Source

If you really want to install from source (though this is not recommended), see INSTALL.md.

Getting Help

See https://www.rust-lang.org/community for a list of chat platforms and forums.

Contributing

See CONTRIBUTING.md.

License

Rust is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.

See LICENSE-APACHE, LICENSE-MIT, and COPYRIGHT for details.

Trademark

The Rust Foundation owns and protects the Rust and Cargo trademarks and logos (the "Rust Trademarks").

If you want to use these names or brands, please read the media guide.

Third-party logos may be subject to third-party copyrights and trademarks. See Licenses for details.