about summary refs log tree commit diff
path: root/src/doc
AgeCommit message (Collapse)AuthorLines
2024-04-15Update how WASI toolchains are used in CI and bootstrapAlex Crichton-20/+49
This commit updates how the WASI targets are configured with their toolchain. Long ago a `config.toml` option of `wasi-root` was added to enable building with the WASI files produced by wasi-libc. Additionally for CI testing and release building the Rust toolchain has been using a hard-coded commit of wasi-libc which is bundled with the release of the `wasm32-wasip1` target, for example. Nowadays though the wasi-sdk project, the C/C++ toolchain for WASI, is the go-to solution for compiling/linking WASI code and contains the more-or-less official releases of wasi-libc. This commit migrates CI to using wasi-sdk releases and additionally updates `bootstrap` to recognize when this is configured. This means that with `$WASI_SDK_PATH` configured there's no further configuration necessary to get a working build. Notably this also works better for the new targets of WASI as well, such as `wasm32-wasip2` and `wasm32-wasip1-threads` where the wasi-sdk release now has libraries for all targets bundled within it.
2024-04-15Move --check-cfg documentation to stable booksUrgau-23/+26
2024-04-15Rollup merge of #123666 - mountcount:master, r=lqd许杰友 Jieyou Xu (Joe)-3/+3
Fix some typos in doc
2024-04-15Distribute LLVM bitcode linker as a preview componentKjetil Kjeka-0/+4
2024-04-15Fix some typos in docmountcount-3/+3
Signed-off-by: mountcount <cuimoman@outlook.com>
2024-04-15Provide prebuilt std for gnullvm targetsMateusz Mikuła-14/+28
2024-04-14Add documentation for unused-externs(-silent)Jeremy Fitzhardinge-0/+30
2024-04-13Add a note about checks with multiple revisions (#1963)Trevor Gross-2/+4
2024-04-12document `-Zlinker-features` in the unstable bookRémy Rakic-0/+35
2024-04-11compiletest: clarify that headers must be one header per line许杰友 Jieyou Xu (Joe)-1/+5
2024-04-10Add support for Arm64EC inline assemblyDaniel Paoliello-2/+30
2024-04-09chore: fix some typos in conmentsneedsure-7/+7
Signed-off-by: needsure <qinzhipeng@outlook.com>
2024-04-08compiletest: specify which special env var and which particular CI job (#1960)许杰友 Jieyou Xu (Joe)-2/+4
* compiletest: specify which special env var and which particular CI job * compiletest: fix grammar and add link to Dockerfile
2024-04-08Update booksrustbot-0/+0
2024-04-06Explicitly mention compiletest directives are supported in rmake.rs (#1949)许杰友 Jieyou Xu (Joe)-0/+3
2024-04-06Add docs for sharded descriptionsMichael Howell-36/+148
2024-04-06Add basic docs for the new `aux-bin` header (#1942)Martin Nordholts-1/+6
2024-04-06Add needs-threads header command (#1943)Eric Huss-0/+1
2024-04-06Fix some broken links under bootstrapping. (#1958)Prashanth Mundkur-8/+8
* Fix some broken links under bootstrapping. * Fix more broken links for bootstrapping.
2024-04-06Put checks that detect UB under their own flag below debug_assertionsBen Kimock-1/+19
2024-04-05Rollup merge of #121419 - agg23:xrOS-pr, r=davidtwcoGuillaume Gomez-0/+56
Add aarch64-apple-visionos and aarch64-apple-visionos-sim tier 3 targets Introduces `aarch64-apple-visionos` and `aarch64-apple-visionos-sim` as tier 3 targets. This allows native development for the Apple Vision Pro's visionOS platform. This work has been tracked in https://github.com/rust-lang/compiler-team/issues/642. There is a corresponding `libc` change https://github.com/rust-lang/libc/pull/3568 that is not required for merge. Ideally we would be able to incorporate [this change](https://github.com/gimli-rs/object/pull/626) to the `object` crate, but the author has stated that a release will not be cut for quite a while. Therefore, the two locations that would reference the xrOS constant from `object` are hardcoded to their MachO values of 11 and 12, accompanied by TODOs to mark the code as needing change. I am open to suggestions on what to do here to get this checked in. # Tier 3 Target Policy At this tier, the Rust project provides no official support for a target, so we place minimal requirements on the introduction of targets. > A tier 3 target must have a designated developer or developers (the "target maintainers") on record to be CCed when issues arise regarding the target. (The mechanism to track and CC such developers may evolve over time.) See [src/doc/rustc/src/platform-support/apple-visionos.md](https://github.com/rust-lang/rust/blob/e88379034a0fe7d90a8f305bbaf4ad66dd2ce8dc/src/doc/rustc/src/platform-support/apple-visionos.md) > Targets must use naming consistent with any existing targets; for instance, a target for the same CPU or OS as an existing Rust target should use the same name for that CPU or OS. Targets should normally use the same names and naming conventions as used elsewhere in the broader ecosystem beyond Rust (such as in other toolchains), unless they have a very good reason to diverge. Changing the name of a target can be highly disruptive, especially once the target reaches a higher tier, so getting the name right is important even for a tier 3 target. > * Target names should not introduce undue confusion or ambiguity unless absolutely necessary to maintain ecosystem compatibility. For example, if the name of the target makes people extremely likely to form incorrect beliefs about what it targets, the name should be changed or augmented to disambiguate it. > * If possible, use only letters, numbers, dashes and underscores for the name. Periods (.) are known to cause issues in Cargo. This naming scheme matches `$ARCH-$VENDOR-$OS-$ABI` which is matches the iOS Apple Silicon simulator (`aarch64-apple-ios-sim`) and other Apple targets. > Tier 3 targets may have unusual requirements to build or use, but must not create legal issues or impose onerous legal terms for the Rust project or for Rust developers or users. > - The target must not introduce license incompatibilities. > - Anything added to the Rust repository must be under the standard Rust license (`MIT OR Apache-2.0`). > - The target must not cause the Rust tools or libraries built for any other host (even when supporting cross-compilation to the target) to depend on any new dependency less permissive than the Rust licensing policy. This applies whether the dependency is a Rust crate that would require adding new license exceptions (as specified by the `tidy` tool in the rust-lang/rust repository), or whether the dependency is a native library or binary. In other words, the introduction of the target must not cause a user installing or running a version of Rust or the Rust tools to besubject to any new license requirements. > - Compiling, linking, and emitting functional binaries, libraries, or other code for the target (whether hosted on the target itself or cross-compiling from another target) must not depend on proprietary (non-FOSS) libraries. Host tools built for the target itself may depend on the ordinary runtime libraries supplied by the platform and commonly used by other applications built for the target, but those libraries must not be required for code generation for the target; cross-compilation to the target must not require such libraries at all. For instance, `rustc` built for the target may depend on a common proprietary C runtime library or console output library, but must not depend on a proprietary code generation library or code optimization library. Rust's license permits such combinations, but the Rust project has no interest in maintaining such combinations within the scope of Rust itself, even at tier 3. > - "onerous" here is an intentionally subjective term. At a minimum, "onerous" legal/licensing terms include but are *not* limited to: non-disclosure requirements, non-compete requirements, contributor license agreements (CLAs) or equivalent, "non-commercial"/"research-only"/etc terms, requirements conditional on the employer or employment of any particular Rust developers, revocable terms, any requirements that create liability for the Rust project or its developers or users, or any requirements that adversely affect the livelihood or prospects of the Rust project or its developers or users. This contribution is fully available under the standard Rust license with no additional legal restrictions whatsoever. This PR does not introduce any new dependency less permissive than the Rust license policy. The new targets do not depend on proprietary libraries. > Tier 3 targets should attempt to implement as much of the standard libraries as possible and appropriate (core for most targets, alloc for targets that can support dynamic memory allocation, std for targets with an operating system or equivalent layer of system-provided functionality), but may leave some code unimplemented (either unavailable or stubbed out as appropriate), whether because the target makes it impossible to implement or challenging to implement. The authors of pull requests are not obligated to avoid calling any portions of the standard library on the basis of a tier 3 target not implementing those portions. This new target mirrors the standard library for watchOS and iOS, with minor divergences. > The target must provide documentation for the Rust community explaining how to build for the target, using cross-compilation if possible. If the target supports running binaries, or running tests (even if they do not pass), the documentation must explain how to run such binaries or tests for the target, using emulation if possible or dedicated hardware if necessary. Documentation is provided in [src/doc/rustc/src/platform-support/apple-visionos.md](https://github.com/rust-lang/rust/blob/e88379034a0fe7d90a8f305bbaf4ad66dd2ce8dc/src/doc/rustc/src/platform-support/apple-visionos.md) > Neither this policy nor any decisions made regarding targets shall create any binding agreement or estoppel by any party. If any member of an approving Rust team serves as one of the maintainers of a target, or has any legal or employment requirement (explicit or implicit) that might affect their decisions regarding a target, they must recuse themselves from any approval decisions regarding the target's tier status, though they may otherwise participate in discussions. > * This requirement does not prevent part or all of this policy from being cited in an explicit contract or work agreement (e.g. to implement or maintain support for a target). This requirement exists to ensure that a developer or team responsible for reviewing and approving a target does not face any legal threats or obligations that would prevent them from freely exercising their judgment in such approval, even if such judgment involves subjective matters or goes beyond the letter of these requirements. > Tier 3 targets must not impose burden on the authors of pull requests, or other developers in the community, to maintain the target. In particular, do not post comments (automated or manual) on a PR that derail or suggest a block on the PR based on a tier 3 target. Do not send automated messages or notifications (via any medium, including via `@)` to a PR author or others involved with a PR regarding a tier 3 target, unless they have opted into such messages. > * Backlinks such as those generated by the issue/PR tracker when linking to an issue or PR are not considered a violation of this policy, within reason. However, such messages (even on a separate repository) must not generate notifications to anyone involved with a PR who has not requested such notifications. > Patches adding or updating tier 3 targets must not break any existing tier 2 or tier 1 target, and must not knowingly break another tier 3 target without approval of either the compiler team or the maintainers of the other tier 3 target. > * In particular, this may come up when working on closely related targets, such as variations of the same architecture with different features. Avoid introducing unconditional uses of features that another variation of the target may not have; use conditional compilation or runtime detection, as appropriate, to let each target run code supported by that target. I acknowledge these requirements and intend to ensure that they are met. This target does not touch any existing tier 2 or tier 1 targets and should not break any other targets.
2024-04-05Replace -Zno-parallel-llvm with -Zno-parallel-backendTim Neumann-1/+1
This was renamed by https://github.com/rust-lang/rust/pull/116791.
2024-04-04Rollup merge of #123417 - harryhanYuhao:master, r=GuillaumeGomezJacob Pratt-1/+10
Add Description for cargo in rustdoc documentation As most people use cargo now, I prioritised the description for cargo in rustdoc documentation. I also added how to open the generated doc with cargo. Btw, may I ask how to use `./x tidy`? It says `warning: `tidy` is not installed;`
2024-04-05Ignore `-C strip` on MSVCicedrocket-15/+16
2024-04-04rustdoc prioritise cargo doc: suggestions appliedHarry Han-1/+10
2024-04-03Rollup merge of #123421 - taiki-e:netbsd-doc, r=NilstriebMatthias Krüger-4/+4
Fix target name in NetBSD platform-support doc NetBSD platform-support doc currently mentions `amd64-unknown-netbsd`, but it is not a valid target name (the correct name is `x86_64-unknown-netbsd`). https://github.com/rust-lang/rust/blob/ceab6128fa48a616bfd3e3adf4bc80133b8ee223/src/doc/rustc/src/platform-support/netbsd.md?plain=1#L16 ```console $ rustc --print target-list | grep netbsd aarch64-unknown-netbsd aarch64_be-unknown-netbsd armv6-unknown-netbsd-eabihf armv7-unknown-netbsd-eabihf i586-unknown-netbsd i686-unknown-netbsd mipsel-unknown-netbsd powerpc-unknown-netbsd riscv64gc-unknown-netbsd sparc64-unknown-netbsd x86_64-unknown-netbsd ```
2024-04-04Fix target name in NetBSD platform-support docTaiki Endo-4/+4
2024-04-03Rollup merge of #123209 - ObsidianMinor:doc/external-clangrt, r=michaelwoeristerMatthias Krüger-0/+21
Add section to sanitizer doc for `-Zexternal-clangrt` After spending a week looking for answers to how to do the very thing this flag lets me do, it felt appropriate to document it where I would've expected it to be.
2024-04-02Add section to sanitizer doc for `-Zexternal-clangrt`Aaron Loyd-0/+21
After spending a week looking for answers to how to do the very thing this flag lets me do, it felt appropriate to document it where I would've expected it to be.
2024-04-02Auto merge of #123336 - workingjubilee:strip-the-trace-off-my-back, r=Nilstriebbors-3/+11
Note impact of `-Cstrip` on backtraces It is not always clear to people what the impact of `-Cstrip` options are. They are a common question on sites like StackOverflow, and sometimes people even report bugs with "no backtrace" after deliberately mangling the symbol table. We cannot exhaustively document every permutation, but we should warn people about common effects.
2024-04-01Note -Cstrip is not a security measureJubilee Young-0/+4
2024-04-01Revise strip-symbols paragraphJubilee Young-6/+5
2024-04-01Discourage stripping symbols in devtoolsJubilee Young-2/+4
2024-04-01Note impact of `-Cstrip` on backtracesJubilee Young-2/+5
It is not always clear to people what the impact of `-Cstrip` options are. They are a common question on sites like StackOverflow, and sometimes people even report bugs with "no backtrace" after deliberately mangling the symbol table. We cannot exhaustively document every permutation, but we should warn people about common effects.
2024-04-01Fix some broken linksBoxy-3/+5
2024-04-01Reorganise into subchapters and explain `Reveal`Boxy-161/+207
2024-04-01reviewsBoxy-4/+5
2024-04-01Change location in guideBoxy-1/+1
2024-04-01Initial rewriteBoxy-40/+130
2024-04-01chore: fix footnotes/links in `platform-support.md`Tom French-0/+1
2024-03-31Add quickstart for how to build and run the compiler (#1951)Nilstrieb-0/+70
* Add quickstart for how to build and run the compiler The chapter is quite long, and a lot of the information is, while valuable, not very important for newcomers. I think it makes sense to have a condensed version for anyone just wanting to get started with only the most important information. * A few improvements to quickstart
2024-03-30Delete length check (#1952)Nilstrieb-71/+3
It's super annoying to be forced to use this bad convention, and apparently everyone agrees. The only reason no improvements have been done is because those were blocked on writing a better checker. I strongly believe that no checker is better than a bad checker, so let's just delete it in the meantime. I kindly asked anyone who sees this to complain about overly long sentences in review in the future, I think we can make this turn out fine.
2024-03-28Simplify trim-paths feature by merging all debuginfo options togetherUrgau-5/+3
2024-03-28Fix some commentsJohnEndson-6/+6
Signed-off-by: JohnEndson <jiayuzhen@outlook.com>
2024-03-27summary: opaque-types-region-inference-restrictionsAli MJ Al-Nasrawy-0/+2
2024-03-27add opaque-types-region-inference-restrictionsAli MJ Al-Nasrawy-0/+264
2024-03-26Rollup merge of #108675 - Shadlock0133:adt_const_params, r=compiler-errorsMatthias Krüger-0/+35
Document `adt_const_params` feature in Unstable Book
2024-03-25Update booksrustbot-0/+0
2024-03-24Added madsmtm as second maintainerAdam Gastineau-0/+1
2024-03-23Rename AstConv to HIR ty loweringLeón Orell Valerian Liehr-26/+29