about summary refs log tree commit diff
path: root/src/doc/rustc
AgeCommit message (Collapse)AuthorLines
2024-03-04Auto merge of #121998 - matthiaskrgr:rollup-l7lzwpb, r=matthiaskrgrbors-23/+23
Rollup of 10 pull requests Successful merges: - #120976 (constify a couple thread_local statics) - #121683 (Fix LVI tests after frame pointers are enabled by default) - #121703 (Add a way to add constructors for `rustc_type_ir` types) - #121732 (Improve assert_matches! documentation) - #121928 (Extract an arguments struct for `Builder::then_else_break`) - #121939 (Small enhancement to description of From trait) - #121968 (Don't run test_get_os_named_thread on win7) - #121969 (`ParseSess` cleanups) - #121977 (Doc: Fix incorrect reference to integer in Atomic{Ptr,Bool}::as_ptr.) - #121994 (Update platform-support.md with supported musl version) r? `@ghost` `@rustbot` modify labels: rollup
2024-03-04Update platform-support.md with supported musl versionWesley Wiser-23/+23
2024-03-04Auto merge of #120468 - alexcrichton:start-wasm32-wasi-rename, r=wesleywiserbors-1/+123
Add a new `wasm32-wasip1` target to rustc This commit adds a new target called `wasm32-wasip1` to rustc. This new target is explained in these two MCPs: * https://github.com/rust-lang/compiler-team/issues/607 * https://github.com/rust-lang/compiler-team/issues/695 In short, the previous `wasm32-wasi` target is going to be renamed to `wasm32-wasip1` to better live alongside the [new `wasm32-wasip2` target](https://github.com/rust-lang/rust/pull/119616). This new target is added alongside the `wasm32-wasi` target and has the exact same definition as the previous target. This PR is effectively a rename of `wasm32-wasi` to `wasm32-wasip1`. Note, however, that as explained in rust-lang/compiler-team#695 the previous `wasm32-wasi` target is not being removed at this time. This change will reach stable Rust before even a warning about the rename will be printed. At this time this change is just the start where a new target is introduced and users can start migrating if they support only Nightly for example.
2024-03-02Promote OpenHarmony targets to tier 2Amanieu d'Antras-4/+5
MCP: rust-lang/compiler-team#719
2024-03-02Add a new `wasm32-wasip1` target to rustcAlex Crichton-1/+123
This commit adds a new target called `wasm32-wasip1` to rustc. This new target is explained in these two MCPs: * https://github.com/rust-lang/compiler-team/issues/607 * https://github.com/rust-lang/compiler-team/issues/695 In short, the previous `wasm32-wasi` target is going to be renamed to `wasm32-wasip1` to better live alongside the [new `wasm32-wasip2` target](https://github.com/rust-lang/rust/pull/119616). This new target is added alongside the `wasm32-wasi` target and has the exact same definition as the previous target. This PR is effectively a rename of `wasm32-wasi` to `wasm32-wasip1`. Note, however, that as explained in rust-lang/compiler-team#695 the previous `wasm32-wasi` target is not being removed at this time. This change will reach stable Rust before even a warning about the rename will be printed. At this time this change is just the start where a new target is introduced and users can start migrating if they support only Nightly for example.
2024-02-29Rollup merge of #121798 - AaronChen0:master, r=NilstriebMatthias Krüger-2/+2
Fix links in rustc doc
2024-02-29Rollup merge of #121412 - androm3da:bcain/update_hex_docs_03, r=AmanieuGuillaume Gomez-5/+121
platform docs: clarify hexagon-unknown-none-elf example, add hexagon-unknown-linux-musl
2024-02-29Fix links in rustc docAaron Chen-2/+2
2024-02-28Add a platform doc for hexagon-unknown-linux-muslBrian Cain-1/+104
2024-02-28Clarify the usage example for hexagon-unknown-none-elfBrian Cain-4/+17
The C wrapper program represents a typical use case (linking C libraries with Rust libraries) but it was not made explicit how this was supposed to work in the usage example. Also: correct a table alignment error for hexagon-unknown-none-elf on the general platform support doc.
2024-02-27Rename wasm32-wasi-preview2 to wasm32-wasip2Ryan Levick-5/+5
Signed-off-by: Ryan Levick <me@ryanlevick.com>
2024-02-27Add the wasm32-wasi-preview2 targetRyan Levick-0/+32
Signed-off-by: Ryan Levick <me@ryanlevick.com>
2024-02-22Add new maintainers to nto-qnx.mdJonathan Pallant-0/+2
Ferrous Systems are volunteering myself and Jorge as co-maintainers of the QNX targets.
2024-02-11Update links to rust3ds and outdated infoIan Chamberlain-14/+12
2024-02-05Update src/doc/rustc/src/platform-support.mdWesley Wiser-1/+1
2024-02-04Add an `armv8r-none-eabihf` target to support the Cortex-R52.Chris Copeland-0/+43
2024-01-31Correct paths for hexagon-unknown-none-elf platform docBrian Cain-8/+9
Update the library paths to correctly refer to libdemo{1,2}_hexagon and switch to the release build instead. Update references to libstandalone to the specific G0/PIC archive instead.
2024-01-28Revert "Add the wasm32-wasi-preview2 target"León Orell Valerian Liehr-32/+0
This reverts commit 31ecf341250a889ac1154b2cbe3f0b97f9d008c1. Co-authored-by: Ryan Levick <me@ryanlevick.com>
2024-01-26Rollup merge of #120356 - mbrubeck:patch-2, r=ehussMatthias Krüger-0/+1
Fix broken markdown in csky-unknown-linux-gnuabiv2.md
2024-01-23Add the wasm32-wasi-preview2 targetRyan Levick-0/+32
Signed-off-by: Ryan Levick <me@ryanlevick.com>
2024-01-22Add target description for `riscv32im-risc0-zkvm-elf`Erik Kaneda-0/+88
Co-authored-by: Frank Laub <github@frank.laub.io>
2024-01-20Warn users about limited review for tier 2 and 3 codeMark Rousskov-0/+18
2024-01-17tests: add sanity-check assembly test for every targetDavid Wood-0/+2
Adds a basic assembly test checking that each target can produce assembly and update the target tier policy to require this. Signed-off-by: David Wood <david@davidtw.co>
2024-01-13Add doc and example for building a UEFI driverNicholas Bishop-0/+17
2024-01-13Add crate links to unknown-uefi.mdNicholas Bishop-5/+10
2024-01-08Add riscv32imafc-esp-espidf target for the ESP32-P4.Scott Mabin-0/+2
2024-01-05Rollup merge of #119588 - Nemo157:i586-netbsd-tier-3, r=NilstriebMichael Goulet-1/+1
Move `i586-unknown-netbsd` from tier 2 to tier 3 platform support table It appears it was intended to be tier 3, but was accidentally added to tier 2. Based on inspecting the PR adding it the table https://github.com/rust-lang/rust/pull/117170 and the fact that it is not built in CI which is one of the tier 2 requirements. cc ````@he32```` r? ````@Nilstrieb````
2024-01-04Fix broken markdown in csky-unknown-linux-gnuabiv2.mdMatt Brubeck-0/+1
2024-01-04Move `i586-unknown-netbsd` from tier 2 to tier 3 platform support tableWim Looman-1/+1
It appears it was intended to be tier 3, but was accidentally added to tier 2.
2024-01-04Rollup merge of #118704 - esp-rs:rv32-tier-2, r=davidtwcoMatthias Krüger-6/+6
Promote `riscv32{im|imafc}` targets to tier 2 Pending the approval of [the MCP](https://github.com/rust-lang/compiler-team/issues/701).
2023-12-26Auto merge of #119129 - jyn514:verbose, r=compiler-errors,estebankbors-1/+1
rework `-Zverbose` implements the changes described in https://github.com/rust-lang/compiler-team/issues/706 the first commit is only a name change from `-Zverbose` to `-Zverbose-internals` and does not change behavior. the second commit changes diagnostics. possible follow up work: - `ty::pretty` could print more info with `--verbose` than it does currently. `-Z verbose-internals` shows too much info in a way that's not helpful to users. michael had ideas about this i didn't fully understand: https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/uplift.20some.20-Zverbose.20calls.20and.20rename.20to.E2.80.A6.20compiler-team.23706/near/408984200 - `--verbose` should imply `-Z write-long-types-to-disk=no`. the code in `ty_string_with_limit` should take `--verbose` into account (apparently this affects `Ty::sort_string`, i'm not familiar with this code). writing a file to disk should suggest passing `--verbose`. r? `@compiler-errors` cc `@estebank`
2023-12-23Rollup merge of #112936 - Toasterson:illumos-aarch64-target, r=jackh726Matthias Krüger-0/+1
Add illumos aarch64 target for rust. This adds the newly being developed illumos aarch64 target to the rust compiler. `@rmustacc` `@citrus-it` `@richlowe` As promissed before my hiatus :)
2023-12-22fix some typos found scrolling through the docsTakashi Idobe-1/+1
2023-12-21Add support for hexagon-unknown-none-elf as targetBrian Cain-0/+268
Signed-off-by: Brian Cain <bcain@quicinc.com>
2023-12-20Rollup merge of #119102 - chrisnc:arm-none-eabi-docs, r=wesleywiserMatthias Krüger-106/+176
Add arm-none-eabi and armv7r-none-eabi platform-support documentation. Mostly collecting existing information that's common to all arm-none-eabi targets and putting it in one file and adding a new file with specific details about armv7r.
2023-12-19rename to verbose-internalsjyn-1/+1
2023-12-18Add arm-none-eabi and armv7r-none-eabi platform-support documentation.Chris Copeland-106/+176
2023-12-19Auto merge of #119074 - leohowell:new-aarch64-apple-watchos-target, ↵bors-0/+4
r=wesleywiser Add new tier 3 aarch64-apple-watchos target Apple Xcode 14/15 releases add a new apple watchos target architecture arm64 out of arm64_32 and armv7k, now add a new tier 3 target support for this target. ### Tier 3 Target Requirements Adds support for Apple WatchOS aarch64-apple-watchos target. Below are details on how this target meets the requirements for tier 3: > 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.) `@leohowell` has volunteered to be the target maintainer. I am also happy to help if a second maintainer is required. > 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. Uses the same naming as the LLVM target, and the same convention as other Apple targets. > 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. I don't believe there is any ambiguity here. > 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. I don't see any legal issues here. > 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 be subject to any new license requirements. > If the target supports building host tools (such as rustc or cargo), those host tools must not depend on proprietary (non-FOSS) libraries, other than ordinary runtime libraries supplied by the platform and commonly used by other binaries built for the target. 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. > Targets should not require proprietary (non-FOSS) components to link a functional binary or library. > "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. I see no issues with any of the above. > 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. Only relevant to those making approval decisions. > 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. core and alloc can be used. std support will be added in a subsequent PR. > 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 tests (even if they do not pass), the documentation must explain how to run tests for the target, using emulation if possible or dedicated hardware if necessary. Use --target= option to cross compile, just like any target. Tests can be run using the WatchOS simulator (see https://developer.apple.com/documentation/xcode/running-your-app-in-the-simulator-or-on-a-device). > 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. I don't foresee this being a problem. > 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. No other targets should be affected by the pull request. r? compiler-team
2023-12-18Promote `riscv32{im|imafc}` targets to tier 2Scott Mabin-6/+6
2023-12-18fix typo in stable doc codegen-options chapterRémy Rakic-1/+1
2023-12-18Add new tier 3 aarch64-apple-watchos targetleohowell-0/+4
2023-12-16remove unstable linker flavors from stable documentationRémy Rakic-3/+0
2023-12-11Rollup merge of #118827 - Nilstrieb:linker-plugin-lto, r=ehussMatthias Krüger-2/+6
Update table for linker-plugin-lto docs
2023-12-11Update table for linker-plugin-lto docsNilstrieb-2/+6
2023-12-11Edit target doc template to remove emailNilstrieb-1/+1
We don't really want to communicate with target maintainers via email. GitHub is where everything happens, people should have a GitHub account that can be pinged on issues. This doesn't necessarily have to be a strict rule, but edit the template to suggest this. The previous template made it look like we care about having an email address, which we do not.
2023-12-09Auto merge of #118150 - roblabla:new-win7-targets, r=davidtwcobors-0/+83
Add new targets {x86_64,i686}-win7-windows-msvc This PR adds two new Tier 3 targets, x86_64-win7-windows-msvc and i686-win7-windows-msvc, that aim to support targeting Windows 7 after the `*-pc-windows-msvc` target drops support for it (slated to happen in 1.76.0). # 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 proposed new tier 3 target must be reviewed and approved by a member of the compiler team based on these requirements. The reviewer may choose to gauge broader compiler team consensus via a [Major Change Proposal (MCP)](https://forge.rust-lang.org/compiler/mcp.html). > > A proposed target or target-specific patch that substantially changes code shared with other targets (not just target-specific code) must be reviewed and approved by the appropriate team for that shared code before acceptance. > > - 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.) This is me, `@roblabla` on github. > - 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. I went with naming the target `x86_64-win7-windows-msvc`, inserting the `win7` in the vendor field (usually set to to `pc`). This is done to avoid ecosystem churn, as quite a few crates have `cfg(target_os = "windows")` or `cfg(target_env = "msvc")`, but nearly no `cfg(target_vendor = "pc")`. Since my goal is to be able to seamlessly swap to the `win7` target, I figured it'd be easier this way. > - 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. I believe the naming is pretty explicit. > - If possible, use only letters, numbers, dashes and underscores for the name. Periods (`.`) are known to cause issues in Cargo. The name comforms to this requirement. > - 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 be subject 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. As far as I understand it, this target has exactly the same legal situation as the existing Tier 1 x86_64-pc-windows-msvc. > - 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. Understood. > - 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 target supports the whole libstd surface, since it's essentially reusing all of the x86_64-pc-windows-msvc target. Understood. > - 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. Wrote some documentation on how to build, test and cross-compile the target in the `platform-support` part. Hopefully it's enough to get started. > - 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. Understood. > - 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. Understood. > If a tier 3 target stops meeting these requirements, or the target maintainers no longer have interest or time, or the target shows no signs of activity and has not built for some time, or removing the target would improve the quality of the Rust codebase, we may post a PR to remove it; any such PR will be CCed to the target maintainers (and potentially other people who have previously worked on the target), to check potential interest in improving the situation. Understood.
2023-12-07Auto merge of #116565 - Sword-Destiny:master, r=Amanieubors-3/+10
add teeos std impl add teeos std library implement. this MR is draft untill the libc update to 0.2.150 this MR is the final step for suppot rust in teeos. first step(add target): https://github.com/rust-lang/rust/pull/113480 second step(add teeos libc): https://github.com/rust-lang/libc/pull/3333
2023-12-07add teeos std impl袁浩-3/+10
Signed-off-by: 袁浩 <yuanhao34@huawei.com>
2023-12-05Add riscv32 imafc bare metal targetScott Mabin-4/+44
- riscv32imac-unknown-none-elf - Add platform support docs for rv32
2023-12-04Add illumos aarch64 targetTill Wegmueller-0/+1
Signed-off-by: Till Wegmueller <toasterson@gmail.com>