os-rust/src
bors 7840a0b753 Auto merge of #57967 - eddyb:rmangle, r=michaelwoerister
Introduce Rust symbol mangling scheme.

This is an implementation of a "feature-complete" Rust mangling scheme, in the vein of rust-lang/rfcs#2603 ~~- but with some differences, see https://github.com/rust-lang/rfcs/pull/2603#issuecomment-458410463 for details~~ (@michaelwoerister integrated my proposed changes into the RFC itself).

On nightly, you can now control the mangling scheme with `-Z symbol-mangling-version`, which can be:
* `legacy`: the older mangling version, still the default currently
* `v0`: the new RFC mangling version, as implemented by this PR

To test the new mangling, set `RUSTFLAGS=-Zsymbol-mangling-version=v0` (or change [`rustflags` in `.cargo/config.toml`](https://doc.rust-lang.org/cargo/reference/config.html#configuration-keys)). Please note that only symbols from crates built with that flag will use the new mangling, and that tool support (e.g. debuggers) will be limited initially, and it may take a while for everything to be upstreamed. However, `RUST_BACKTRACE` should work out of the box with either mangling version.

<hr/>

The demangling implementation PR is https://github.com/alexcrichton/rustc-demangle/pull/23
~~(this PR already uses it via a git dependency, to allow testing)~~.

Discussion of the *design* of the mangling scheme should still happen on the RFC, but this PR's specific implementation details can be reviewed in parallel.

*Notes for reviewers*:
* ~~only the last 6 commits are specific to this branch, if necessary I can open a separate PR for everything else (it was meant to be its own small refactoring, but it got a bit out of hand)~~
~~based on #58140~~
* the "harness" commit is only there because it does some extra validation (comparing the demangling from `rustc-demangle` to the compiler's pretty-printing, adjusted slightly to produce the same output), that I would like to try on crater
* ~~there is the question of whether we should turn on the new mangling now, wait for tools to support it (I'm working on that), and/or have it under a `-Z` flag for now~~ (we're gating this on `-Z symbol-mangling-version=v0`, see above)

r? @nikomatsakis / @michaelwoerister cc @rust-lang/compiler
2019-05-31 17:10:11 +00:00
..
bootstrap Auto merge of #61212 - alexcrichton:skip-rustc, r=pietroalbini 2019-05-30 00:38:51 +00:00
build_helper Bump compiler-builtins to 0.1.15 2019-05-22 07:46:36 -07:00
ci Auto merge of #61353 - alexcrichton:less-tools, r=pietroalbini 2019-05-30 19:52:11 +00:00
doc Rollup merge of #61279 - llogiq:implicit-option-main-doctests, r=GuillaumeGomez 2019-05-30 10:52:56 +02:00
etc Fix .natvis visualizers. 2019-05-09 16:15:43 -07:00
grammar
liballoc Rollup merge of #61244 - RalfJung:box, r=rkruppe 2019-05-30 10:52:55 +02:00
libarena Optimize alloc_from_iter 2019-05-23 18:51:46 +02:00
libcore Rollup merge of #60850 - SimonSapin:unguarded, r=alexcrichton 2019-05-30 10:52:51 +02:00
libfmt_macros review comments 2019-05-24 11:50:21 -07:00
libgraphviz
libpanic_abort
libpanic_unwind Stabilize the alloc crate. 2019-04-12 20:07:30 +02:00
libproc_macro proc_macro: stop using LEB128 for RPC. 2019-04-09 21:05:15 +03:00
libprofiler_builtins Ship profiler with windows-gnu 2019-05-23 13:32:30 +02:00
librustc rustc_codegen_utils: add new mangling scheme implementation. 2019-05-31 18:24:42 +03:00
librustc_allocator Avoid unnecessary internings. 2019-05-27 13:58:38 +10:00
librustc_apfloat ignore-tidy-filelength on all files with greater than 3000 lines 2019-04-25 21:39:09 +01:00
librustc_asan Update cmake, cc and compiler_builtins for VS 2019 support 2019-04-10 21:17:31 +02:00
librustc_borrowck Update borrowck 2019-05-23 18:51:42 +02:00
librustc_codegen_llvm Update rustc-demangle version. 2019-05-31 18:23:02 +03:00
librustc_codegen_ssa Update rustc-demangle version. 2019-05-31 18:23:02 +03:00
librustc_codegen_utils rustc_codegen_utils: remove symbol name dumping/checking harness, and mw impl. 2019-05-31 18:24:55 +03:00
librustc_cratesio_shim
librustc_data_structures Add Step::sub_usize 2019-05-25 02:53:08 +02:00
librustc_driver Declare DefIndex with the newtype_index macro 2019-05-18 13:19:33 +02:00
librustc_errors librustc_errors: Move annotation collection to own impl 2019-05-28 08:34:44 +02:00
librustc_fs_util
librustc_incremental Pass a Symbol to check_name, emit_feature_err, and related functions. 2019-05-13 09:29:22 +10:00
librustc_interface Avoid unnecessary internings. 2019-05-27 13:58:38 +10:00
librustc_lint Introduce and use SyntaxContext::outer_expn_info(). 2019-05-29 09:32:56 +10:00
librustc_llvm
librustc_lsan Update cmake, cc and compiler_builtins for VS 2019 support 2019-04-10 21:17:31 +02:00
librustc_macros Rollup merge of #60885 - euclio:strip-synstructure-consts, r=GuillaumeGomez 2019-05-29 14:41:03 +02:00
librustc_metadata rustc_codegen_utils: add new mangling scheme implementation. 2019-05-31 18:24:42 +03:00
librustc_mir Make the type_name intrinsic's output deterministic 2019-05-30 11:19:22 +02:00
librustc_msan Update cmake, cc and compiler_builtins for VS 2019 support 2019-04-10 21:17:31 +02:00
librustc_passes Rename "Associated*" to "Assoc*" 2019-05-26 17:49:02 +08:00
librustc_plugin Reword malformed attribute input diagnostics 2019-05-25 11:55:50 -07:00
librustc_privacy Auto merge of #61253 - nnethercote:avoid-hygiene_data-lookups, r=petrochenkov 2019-05-30 16:54:13 +00:00
librustc_resolve Auto merge of #61253 - nnethercote:avoid-hygiene_data-lookups, r=petrochenkov 2019-05-30 16:54:13 +00:00
librustc_save_analysis Rename "Associated*" to "Assoc*" 2019-05-26 17:49:02 +08:00
librustc_target Add to_symbol methods. 2019-05-27 14:05:02 +10:00
librustc_traits Rename OpportunisticTypeResolver to OpportunisticVarResolver 2019-05-28 21:34:42 +01:00
librustc_tsan Update cmake, cc and compiler_builtins for VS 2019 support 2019-04-10 21:17:31 +02:00
librustc_typeck Auto merge of #61253 - nnethercote:avoid-hygiene_data-lookups, r=petrochenkov 2019-05-30 16:54:13 +00:00
librustdoc Rollup merge of #61279 - llogiq:implicit-option-main-doctests, r=GuillaumeGomez 2019-05-30 10:52:56 +02:00
libserialize serialize: add missing Encodable impl for Path. 2019-05-07 02:47:45 +03:00
libstd Auto merge of #61203 - memoryruins:bare_trait_objects, r=Centril 2019-05-29 21:55:59 +00:00
libsyntax Auto merge of #61253 - nnethercote:avoid-hygiene_data-lookups, r=petrochenkov 2019-05-30 16:54:13 +00:00
libsyntax_ext Introduce and use SyntaxContext::outer_expn_info(). 2019-05-29 09:32:56 +10:00
libsyntax_pos Add HygieneData::{outer,expn_info,is_descendant_of} methods. 2019-05-30 08:59:22 +10:00
libterm Revert "Auto merge of #57842 - gnzlbg:extract_libtest, r=gnzlbg" 2019-04-07 03:16:31 -04:00
libtest Use FnOnce instead of FnBox in libtest 2019-05-24 07:51:48 +02:00
libunwind Set -funwind-tables and -fno-exceptions unconditionally for LLVM's libunwind 2019-05-20 12:29:58 -07:00
llvm-emscripten@7f23313edf
llvm-project@4efebe3165 Bump compiler-builtins to 0.1.15 2019-05-22 07:46:36 -07:00
rtstartup
rustc Remove leading newlines 2019-04-22 17:01:33 +01:00
rustllvm Limit internalization in LLVM 8 ThinLTO 2019-04-26 08:58:14 -07:00
stdsimd@4bf456c35e Breaking update of stdsimd 2019-04-22 09:07:25 +02:00
test test: add a more complex symbol-name testcase. 2019-05-31 19:24:15 +03:00
tools rustc_codegen_utils: remove symbol name dumping/checking harness, and mw impl. 2019-05-31 18:24:55 +03:00
.gitignore
README.md
stage0.txt bump nightly to 1.37.0 2019-05-23 12:27:58 +02:00

This directory contains the source code of the rust project, including:

  • rustc and its tests
  • libstd
  • Various submodules for tools, like rustdoc, rls, etc.

For more information on how various parts of the compiler work, see the rustc guide.

There is also useful content in the following READMEs, which are gradually being moved over to the guide: