rust/src
bors 2efa31b2d9 Auto merge of #57937 - denzp:nvptx, r=nagisa
NVPTX target specification

This change adds a built-in `nvptx64-nvidia-cuda` GPGPU no-std target specification and a basic PTX assembly smoke tests.

The approach is taken here and the target spec is based on `ptx-linker`, a project started about 1.5 years ago. Key feature: bitcode object files being linked with LTO into the final module on the linker's side.

Prior to this change, the linker used a `ld` linker-flavor, but I think, having the special CLI convention is a more reliable way.

Questions about further progress on reliable CUDA workflow with Rust:
1. Is it possible to create a test suite `codegen-asm` to verify end-to-end integration with LLVM backend?
1. How would it be better to organise no-std `compile-fail` tests: add `#![no_std]` where possible and mark others as `ignore-nvptx` directive, or alternatively, introduce `compile-fail-no-std` test suite?
1. Can we have the `ptx-linker` eventually be integrated as `rls` or `clippy`? Hopefully, this should allow to statically link against LLVM used in Rust and get rid of the [current hacky solution](https://github.com/denzp/rustc-llvm-proxy).
1. Am I missing some methods from `rustc_codegen_ssa:🔙:linker::Linker` that can be useful for bitcode-only linking?

Currently, there are no major public CUDA projects written in Rust I'm aware of, but I'm expecting to have a built-in target will create a solid foundation for further experiments and awesome crates.

Related to #38789
Fixes #38787
Fixes #38786
2019-02-01 23:43:34 +00:00
..
bootstrap Auto merge of #57937 - denzp:nvptx, r=nagisa 2019-02-01 23:43:34 +00:00
build_helper Workaround presence of LLVM library in stage0/lib 2019-01-26 08:02:08 -07:00
ci Auto merge of #57937 - denzp:nvptx, r=nagisa 2019-02-01 23:43:34 +00:00
doc Add link to the edition guide. 2019-01-29 17:30:49 -05:00
etc fix gdb debug printing 2019-01-28 17:33:29 +01:00
grammar Remove licenses 2018-12-25 21:08:33 -07:00
liballoc Auto merge of #56696 - jonas-schievink:weak-counts, r=alexcrichton 2019-01-31 19:20:14 +00:00
libarena Check the correct arena 2019-01-01 20:06:50 +01:00
libcore Auto merge of #58002 - oli-obk:deprecated_sugg, r=zackmdavis 2019-02-01 01:06:15 +00:00
libfmt_macros Rollup merge of #57764 - Xanewok:tiny-tweaks, r=nikomatsakis 2019-01-26 18:21:44 +01:00
libgraphviz Remove licenses 2018-12-25 21:08:33 -07:00
libpanic_abort Bump bootstrap compiler to 1.33 beta 2019-01-26 08:02:08 -07:00
libpanic_unwind Remove licenses 2018-12-25 21:08:33 -07:00
libproc_macro Work-around for shadowing of variant names with assoc const names in libproc_macro/bridge/rpc.rs. 2018-12-26 21:40:21 +00:00
libprofiler_builtins Remove licenses 2018-12-25 21:08:33 -07:00
librustc Auto merge of #57937 - denzp:nvptx, r=nagisa 2019-02-01 23:43:34 +00:00
librustc_allocator Remove licenses 2018-12-25 21:08:33 -07:00
librustc_apfloat Fix repeated word typos 2019-01-03 21:33:37 +01:00
librustc_asan Workaround presence of LLVM library in stage0/lib 2019-01-26 08:02:08 -07:00
librustc_borrowck Use ensure for borrowck 2019-01-29 21:10:35 +01:00
librustc_codegen_llvm Auto merge of #58003 - nikic:saturating-add, r=nagisa 2019-01-31 13:40:11 +00:00
librustc_codegen_ssa Auto merge of #57937 - denzp:nvptx, r=nagisa 2019-02-01 23:43:34 +00:00
librustc_codegen_utils SymbolPathBuffer shallow refactoring 2019-01-28 01:16:59 +01:00
librustc_cratesio_shim Remove licenses 2018-12-25 21:08:33 -07:00
librustc_data_structures Use multiple threads by default. Limits tests to one thread. Do some renaming. 2019-01-28 16:24:33 +01:00
librustc_driver Use ensure for mir_borrowck 2019-01-31 17:47:33 +01:00
librustc_errors remove _with_applicability from suggestion fns 2019-01-26 23:07:55 -05:00
librustc_fs_util Remove licenses 2018-12-25 21:08:33 -07:00
librustc_incremental Clean up and optimize OpenTask / read_index 2018-12-31 16:24:22 +01:00
librustc_lint Add future compat lint declaration 2019-02-01 09:43:57 -05:00
librustc_llvm Workaround presence of LLVM library in stage0/lib 2019-01-26 08:02:08 -07:00
librustc_lsan Workaround presence of LLVM library in stage0/lib 2019-01-26 08:02:08 -07:00
librustc_metadata Auto merge of #51285 - Mark-Simulacrum:remove-quote_apis, r=Manishearth 2019-01-24 15:48:46 +00:00
librustc_mir Auto merge of #57978 - varkor:fix-irrefutable-integer-range-match, r=oli-obk 2019-02-01 20:57:36 +00:00
librustc_msan Workaround presence of LLVM library in stage0/lib 2019-01-26 08:02:08 -07:00
librustc_passes Add an ensure() method to TyCtxt used to ensure queries are run 2019-01-29 21:10:33 +01:00
librustc_plugin Auto merge of #57321 - petrochenkov:atokens, r=nikomatsakis 2019-01-16 15:01:20 +00:00
librustc_privacy Auto merge of #57586 - Aaron1011:feature/pub-priv-dep, r=petrochenkov 2019-02-01 15:24:26 +00:00
librustc_resolve Rollup merge of #57915 - petrochenkov:notto-disu, r=zackmdavis 2019-01-28 22:25:48 +01:00
librustc_save_analysis Querify glob map usage (last use of CrateAnalysis) 2019-01-17 10:40:22 +01:00
librustc_target NVPTX: by-default use target cpu "sm_30" 2019-01-28 01:16:32 +01:00
librustc_traits Auto merge of #57714 - matthewjasper:wellformed-unreachable, r=pnkfelix 2019-01-25 14:25:37 +00:00
librustc_tsan Workaround presence of LLVM library in stage0/lib 2019-01-26 08:02:08 -07:00
librustc_typeck Auto merge of #57916 - Zoxc:incr-passes4, r=michaelwoerister 2019-02-01 12:52:54 +00:00
librustdoc Rollup merge of #57859 - GuillaumeGomez:fix-background, r=QuietMisdreavus 2019-01-28 22:25:45 +01:00
libserialize Cosmetic improvements 2019-01-13 19:47:02 +00:00
libstd Rollup merge of #57971 - jethrogb:jb/sgx-panic, r=alexcrichton 2019-01-31 02:10:45 +01:00
libsyntax Remove feature gate 2019-02-01 09:43:56 -05:00
libsyntax_ext Conditionally skip two passes if their related attributes were not found 2019-01-28 05:46:53 +01:00
libsyntax_pos Use multiple threads by default. Limits tests to one thread. Do some renaming. 2019-01-28 16:24:33 +01:00
libterm Implement basic input validation for built-in attributes 2019-01-13 14:17:19 +03:00
libtest Auto merge of #57765 - Mark-Simulacrum:bootstrap-bump, r=alexcrichton 2019-01-27 18:18:17 +00:00
libunwind Bump bootstrap compiler to 1.33 beta 2019-01-26 08:02:08 -07:00
llvm-emscripten@7f23313edf
llvm-project@683d352269 [rust-lldb] Adapt to changes in LLDB APIs 2019-01-25 15:39:54 -08:00
rtstartup Remove licenses 2018-12-25 21:08:33 -07:00
rustc rustc: Fix regression where jemalloc isn't used 2019-01-03 13:52:36 -08:00
rustllvm Auto merge of #55641 - nagisa:optimize-attr, r=pnkfelix 2019-01-26 07:08:18 +00:00
stdsimd@b23541340b Update stdsimd 2019-01-29 10:48:54 +01:00
test Auto merge of #57937 - denzp:nvptx, r=nagisa 2019-02-01 23:43:34 +00:00
tools Fix typo 2019-02-01 18:44:26 +08:00
.gitignore
README.md remove link to removed readme 2019-01-15 19:48:37 -06:00
stage0.txt Bump bootstrap compiler to 1.33 beta 2019-01-26 08:02:08 -07: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: