instance_id stringlengths 10 65 | repo stringlengths 5 59 | pr_number int64 1 313k | task_type stringclasses 1
value | base_commit stringlengths 40 40 | review_commit stringlengths 40 40 | title stringlengths 2 282 | body stringlengths 7 3k | patch stringlengths 202 204k | n_defects int64 1 72 | n_supported int64 1 65 | n_major int64 0 32 | defects stringlengths 140 18.8k | certifier_count int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
rust-lang__rustup__4376 | rust-lang/rustup | 4,376 | defect | a88c6f91e199e8cedcf8f77161045ad0a4c36ec7 | d59c9d6c74578dcbe5dee8958dc94496ca91f2c8 | test: finish migration to `.expect()` APIs | Closes #4359.
[_SemanticDiff_](https://app.semanticdiff.com/gh/rust-lang/rustup/pull/4376/commits) | diff --git a/Cargo.lock b/Cargo.lock
index 8d4754749c5..2e3e1ec9f25 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -406,18 +406,6 @@ dependencies = [
"memchr",
]
-[[package]]
-name = "console"
-version = "0.15.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "054ccb5b10f9f2cbf51eb355c... | 3 | 1 | 0 | [{"id": "G0", "claim": "The docstring typo \"currrent\" in the Assert redaction documentation should be spelled \"current\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The double reference `rustupdir.rustupdir` in the `[RUSTUP_DIR]` redaction ... | null |
rust-lang__rustup__4397 | rust-lang/rustup | 4,397 | defect | 664dd00557424937b0b0e2e13b5f15e778306aac | 54f616262519b24ad47e10e26d4fe7e6b37fd1cd | style: migrate the codebase to `let-chains` | This PR has mainly converted the old code to use the new `let-chains` thanks to the `clippy::collapsible_if` lint. The overall readability seems to have been improved in a bunch of places. | diff --git a/src/cli/rustup_mode.rs b/src/cli/rustup_mode.rs
index 92faef60443..ea8182752bd 100644
--- a/src/cli/rustup_mode.rs
+++ b/src/cli/rustup_mode.rs
@@ -49,10 +49,10 @@ fn handle_epipe(res: Result<utils::ExitCode>) -> Result<utils::ExitCode> {
match res {
Err(e) => {
let root = e.root... | 4 | 4 | 0 | [{"id": "G0", "claim": "The code should import `io` so `std::io::Error`/`std::io::ErrorKind` can be written more briefly.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The `ref name` pattern in the `ResolvableToolchainName::Official` match shou... | null |
rust-lang__rustup__4429 | rust-lang/rustup | 4,429 | defect | 658d317b2a3a4b465f714cf8d7baca5a1c9078eb | fbfb71cd580399db02771b0e7dd159b0f91dd9e5 | feat: improve error message for `rustup which` | Close #3321
This PR improves the error message for `rustup which` by providing a suggested command to install the missing component, provided that we know which one it is.
## Limitations
Some edge cases are not coverd, e.g. if a binary is expected to be provided by a component but not found on disk. (which is... | diff --git a/src/cli/rustup_mode.rs b/src/cli/rustup_mode.rs
index ebaba20cd45..3023aca3431 100644
--- a/src/cli/rustup_mode.rs
+++ b/src/cli/rustup_mode.rs
@@ -19,7 +19,6 @@ use itertools::Itertools;
use tracing::{info, trace, warn};
use tracing_subscriber::{EnvFilter, Registry, reload::Handle};
-use crate::dist::... | 7 | 6 | 1 | [{"id": "G0", "claim": "The error message should drop the capital at the start and the period at the end for consistency.", "category": "style", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Idiomatically there is no need to use `return` there; the `Err(..)` should just be the... | null |
rust-lang__rustup__4469 | rust-lang/rustup | 4,469 | defect | fc0a76bd280293da1bdb8fab484d6468109d6ccd | 2c0f42434ee691656ff4c7e587fffb7dfcaf239c | feat(install): warn if default linker (`cc`) is missing from PATH | Closes #4356
Test was run in the same environment outlined in the original issue (using `docker run --rm -it debian:testing bash`) and simulates an environment where `cc` is not installed.
<br>
<img width="730" height="563" alt="image" src="https://github.com/user-attachments/assets/1978fe0a-fc6a-43f4-abd9-ae9612... | diff --git a/src/cli/self_update.rs b/src/cli/self_update.rs
index 5e4f1e351b9..d3f0ea6f095 100644
--- a/src/cli/self_update.rs
+++ b/src/cli/self_update.rs
@@ -610,6 +610,8 @@ pub(crate) async fn install(
};
md(&mut term, msg);
+ warn_if_default_linker_missing(process);
+
#[cfg(windows)]
if !n... | 7 | 5 | 2 | [{"id": "G0", "claim": "The log messages should not give distro-specific advice such as pointing Debian/Ubuntu users at `sudo apt install build-essential`.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The `_process` parameter of `warn_if_default_linker... | null |
rust-lang__rustup__4518 | rust-lang/rustup | 4,518 | defect | 1837fa5a751cc922238052d6f42e7b510454bcce | da1223a87ce44fd0437866af0dcb943ded375844 | Set `RUSTUP_TOOLCHAIN_SOURCE` | This PR is in pursuit of https://github.com/rust-lang/cargo/issues/11036. Specifically, it sets an environment variable `RUST_TOOLCHAIN_SOURCE`. The variable's content will be used to issue a warning when a `cargo install` is performed with a non-default toolchain.
The variable's content is one of `cli`, `env`, `ove... | diff --git a/src/cli/proxy_mode.rs b/src/cli/proxy_mode.rs
index 1cb24f8252c..67829a6058b 100644
--- a/src/cli/proxy_mode.rs
+++ b/src/cli/proxy_mode.rs
@@ -5,8 +5,9 @@ use anyhow::Result;
use crate::{
cli::{common::set_globals, job, self_update},
command::run_command_for_dir,
+ config::ActiveReason,
... | 7 | 6 | 1 | [{"id": "G0", "claim": "RUSTUP_TOOLCHAIN_SOURCE is kept unchanged when already set, so a nested invocation that resolves its own toolchain (e.g. `cargo doc` run under `cargo +beta test` in a directory with a rust-toolchain file) is incorrectly reported as `cli`; it should only be inherited when the parent's toolchain i... | null |
rust-lang__rustup__4522 | rust-lang/rustup | 4,522 | defect | 6496be0418c76316ce81897c6aeb92a3d179c561 | bb4d4ed7788a2a8cc543150a4dbe48ae8d90692a | feat(rustup-mode): add `no_update` flag to `rustup toolchain install` | Closes #4505. Adding a flag to don't try to update already installed toolchains. | diff --git a/src/cli/rustup_mode.rs b/src/cli/rustup_mode.rs
index 67ec21b7cf5..c2433105e16 100644
--- a/src/cli/rustup_mode.rs
+++ b/src/cli/rustup_mode.rs
@@ -378,6 +378,10 @@ struct UpdateOpts {
#[arg(long)]
no_self_update: bool,
+ /// Don't try to update the installed toolchain
+ #[arg(long)]
+ ... | 2 | 2 | 2 | [{"id": "G0", "claim": "The new `--no-update` behaviour of `rustup toolchain install` should come with tests covering it.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G2", "claim": "The `cli_ui` snapshot tests are out of date with the new flag's help output and must... | null |
rust-lang__rustup__4570 | rust-lang/rustup | 4,570 | defect | 07cb9239519f914aab39c08ee76ea0115ab71411 | d9c0437a7d90a971133771d70a6c90586f5b0495 | Concurrent downloads & installation | This is what I had in mind. It seems to compile but I've done no testing or benchmarking.
@FranciscoTGouveia maybe that's something you can have a look at?
Alternative to
- #4471
Obsoletes
- #4567 | diff --git a/src/dist/download.rs b/src/dist/download.rs
index 31e89cef74e..e8989a3270c 100644
--- a/src/dist/download.rs
+++ b/src/dist/download.rs
@@ -12,6 +12,7 @@ use tracing::{debug, warn};
use url::Url;
use crate::config::Cfg;
+use crate::dist::DEFAULT_DIST_SERVER;
use crate::dist::temp;
use crate::download... | 3 | 1 | 1 | [{"id": "G0", "claim": "The new download/installation loop never exits, so toolchain installation hangs on the download of the last component.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "Because installations run on the same thread as downloads, ... | null |
rust-lang__rustup__4605 | rust-lang/rustup | 4,605 | defect | 4ae201236899838401d267d7975db66b5849707b | b9d36b6d7150a574ee9973e5310b93f87f5a0158 | dist: make installation asynchronous | cc @FranciscoTGouveia
https://github.com/user-attachments/assets/763a40ea-af3f-41a6-8863-aa895fe82dc3 | diff --git a/src/cli/rustup_mode.rs b/src/cli/rustup_mode.rs
index eb6026e7339..fe9666e345d 100644
--- a/src/cli/rustup_mode.rs
+++ b/src/cli/rustup_mode.rs
@@ -1012,7 +1012,7 @@ async fn update(
info!("cleaning up downloads & tmp directories");
utils::delete_dir_contents_following_links(&cfg.downlo... | 1 | 1 | 0 | [{"id": "G0", "claim": "Reduce some indentation in the nested code around InstallEvents (nit).", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
rust-lang__rustup__4631 | rust-lang/rustup | 4,631 | defect | fcd02c030edf73f22679c1620923302a171e445c | 6c4d909daf1e53422f94bb66a39aae216b57b5bc | download: statically bundle relevant trust anchors | This seems to compile at least. I still want to give it another look, but happy to get feedback from others, too.
Let me know if/where it needs more comments. | diff --git a/Cargo.lock b/Cargo.lock
index 76fd031a0e..10d9cd581e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2184,6 +2184,7 @@ dependencies = [
"rs_tracing",
"rustls",
"rustls-platform-verifier",
+ "rustls-webpki",
"same-file",
"scopeguard",
"semver",
@@ -2198,6 +2199,7 @@ dependencies = [
"threadpool",... | 5 | 4 | 0 | [{"id": "G0", "claim": "Establish a standard for generated files and include src/dist/triple/known.rs in it, e.g. by disabling rustfmt and/or clippy in generated files.", "category": "maintainability", "verdict": "opposed", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "Running rustfmt over the gene... | null |
rust-lang__rustup__4670 | rust-lang/rustup | 4,670 | defect | 8031de4922195521a3d53e44be808d7bc6d757ea | b495c33b82590672812e90b5303975a6310735a9 | Unify nightly component unavailable messages | fixes https://github.com/rust-lang/rustup/issues/4667
Unified two versions of the "sometimes not all components are available" message for nightly builds. Added `nightly_component_unavailable_help()` to generate a consistent `note/help` format. Removed parentheses from the error string in `component_unavailable_msg(... | diff --git a/src/dist/mod.rs b/src/dist/mod.rs
index bfb6603bcd4..4e488270d9f 100644
--- a/src/dist/mod.rs
+++ b/src/dist/mod.rs
@@ -21,7 +21,7 @@ use tracing::{debug, info, warn};
use crate::{
config::Cfg,
- errors::RustupError,
+ errors::{RustupError, nightly_component_unavailable_help},
process::P... | 1 | 1 | 1 | [{"id": "G0", "claim": "The fix for #4667 should not collapse the three distinct error messages into one, though the styling of the three messages could be unified.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
rust-lang__rustup__4678 | rust-lang/rustup | 4,678 | defect | 3382f6f7bf09e591bbda4bcda7daf2280a0061d9 | 29b6711e7f5acbd607151409af9f1503fd97144d | fix(utils): "Directory not empty" error when uninstalling multiple toolchains | Fixes #4657 - "Directory not empty" errors when uninstalling multiple toolchains sequentially.
The `remove_dir_all` crate with parallel feature can leave directories in an inconsistent state, causing intermittent failures:
```
error: could not remove 'install' directory: Directory not empty (os error 66)
```
Thi... | diff --git a/src/utils/raw.rs b/src/utils/raw.rs
index 53e45813d31..4e9aaaac761 100644
--- a/src/utils/raw.rs
+++ b/src/utils/raw.rs
@@ -7,6 +7,9 @@ use std::io::Write;
use std::path::Path;
use std::str;
+use retry::delay::{Fibonacci, jitter};
+use retry::{OperationResult, retry};
+
#[cfg(not(windows))]
use crate... | 4 | 4 | 2 | [{"id": "G0", "claim": "The original comments explaining why the custom remove_dir_all call exists should be kept, and placed so they match the remove_dir_all() call (moved down a line).", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The parent-di... | null |
rust-lang__rustup__4730 | rust-lang/rustup | 4,730 | defect | a373a2c8c4c0fc547dc200ec0f553b4a66ffdd3c | b096d4e1db240b1fd3efe69c58a4f8ae407da7a9 | fix(cli/self-update): fix output format for `rustup check` on TTY | Fixes https://github.com/rust-lang/rustup/issues/4560 by manually adding a newline if multi-progress bars from `indicatif` are used.
PS: On my machine this works with or without the newline, I cannot see any difference except when resizing the window/reloading the output afterwards (this doesn't get rid of all trail... | diff --git a/src/cli/rustup_mode.rs b/src/cli/rustup_mode.rs
index 9d1325571d7..c126253b134 100644
--- a/src/cli/rustup_mode.rs
+++ b/src/cli/rustup_mode.rs
@@ -892,7 +892,8 @@ async fn check_updates(cfg: &Cfg<'_>, opts: CheckOpts) -> Result<ExitCode> {
// If we are running in a TTY, we can use `buffer_unorder... | 1 | 1 | 0 | [{"id": "G0", "claim": "Instead of the HACK that writes a final blank newline after the progress bars in `check_updates()`, a new progress bar should be added to `multi_progress_bars`, which the reviewer suggests would be more idiomatic.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introd... | null |
rust-lang__rustup__4743 | rust-lang/rustup | 4,743 | defect | c43b0e761cc7617f6658253c0320038f0af3edb4 | 7c5d0288626493242afd6d2a9d73fa1e77b7a021 | use 'tuple' instead of 'triple' for env overrides | Redoing https://github.com/rust-lang/rustup/pull/4668 a piece at a time | diff --git a/build.rs b/build.rs
index c56f9df5205..9fee97e9c31 100644
--- a/build.rs
+++ b/build.rs
@@ -3,20 +3,32 @@ use std::env;
use platforms::Platform;
fn from_build() -> Result<String, String> {
- let triple =
- env::var("RUSTUP_OVERRIDE_BUILD_TRIPLE").unwrap_or_else(|_| env::var("TARGET").unwrap()... | 3 | 2 | 0 | [{"id": "G0", "claim": "Add a warning to deprecate the legacy RUSTUP_OVERRIDE_BUILD_TRIPLE variable (still accepted as a fallback) and eventually remove it, so people who use it despite it being undocumented get tipped off.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id":... | null |
rust-lang__rustup__4746 | rust-lang/rustup | 4,746 | defect | c43b0e761cc7617f6658253c0320038f0af3edb4 | d94b85d8f109bbe1878370bc28fdb4c39a917286 | Avoid printing a warning about `settings.toml` on a fresh install | Fixes (partially) #4744.
Now, in a fresh install, a warning about an already-existing `setting.toml` file is not printed.
Feedback on the wording of the comment is appreciated. | diff --git a/src/cli/self_update.rs b/src/cli/self_update.rs
index e37dc2556f3..f41d204367c 100644
--- a/src/cli/self_update.rs
+++ b/src/cli/self_update.rs
@@ -596,7 +596,7 @@ pub(crate) async fn install(
.is_none_or(|s| s != "yes")
{
check_existence_of_rustc_or_cargo_in_path(no_prompt, cfg.proc... | 3 | 3 | 0 | [{"id": "G0", "claim": "Invert the conditionals in check_existence_of_settings_file so the simple cases return early and indentation is reduced.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Use `PartialToolchainDesc::from_str(\"stable\")` inst... | null |
rust-lang__rustup__4797 | rust-lang/rustup | 4,797 | defect | 9f7bd9c2780bfed5d08c6d53ce8e196aa7a3a2e5 | 9bcc18098b766b572d7526890a23e5ef14a95a36 | Make component removal best-effort and preserve single-error behavior | Previously, `rustup component remove` parsed and removed components in a single pass,
which meant the command stopped on the first error after potentially removing earlier
valid components. As a result, behavior depended on argument order.
This change makes component removal best-effort by:
- first collecting all... | diff --git a/src/cli/rustup_mode.rs b/src/cli/rustup_mode.rs
index c2143b7f9e3..3bf93d0ee48 100644
--- a/src/cli/rustup_mode.rs
+++ b/src/cli/rustup_mode.rs
@@ -1481,12 +1481,33 @@ async fn component_remove(
let distributable = DistributableToolchain::from_partial(toolchain, cfg).await?;
let target = get_targ... | 2 | 2 | 1 | [{"id": "G0", "claim": "Reporting only the first invalid component name is not user friendly; the command should report every wrong name at once while still removing the correct ones, generalizing the existing error type.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "... | null |
rust-lang__rustup__4807 | rust-lang/rustup | 4,807 | defect | 5100b80375fade4ee4c7c0714c1132fec28319d9 | 6f0e432901805cf77082e202e3a2de29e1fa39d4 | Use `cc-rs` to detect the default linker, instead of assuming `cc` | On hosts like `illumos`, `cc` is not present in the path, leading to misleading warnings like:
```
warn: no default linker (`cc`) was found in your PATH
warn: many Rust crates require a system C toolchain to build
```
However, there is a linker present: `gcc`. Since this warning at install time is to help ensu... | diff --git a/Cargo.toml b/Cargo.toml
index 0bf848de9dc..c1a8d1556cd 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -44,6 +44,7 @@ test = ["dep:snapbox", "dep:walkdir", "clap-cargo/testing_colors"]
anstream = "1"
anstyle = "1.0.11"
anyhow = "1.0.69"
+cc = "1"
cfg-if = "1.0"
chrono = { version = "0.4", default-features... | 6 | 5 | 0 | [{"id": "G0", "claim": "Suggest chaining the cc::Build method calls instead of building the compiler value through a separate `let build` binding.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The new comment reads \"If we don't info from cc-rs... | null |
rust-lang__rustup__4819 | rust-lang/rustup | 4,819 | defect | d32f88bba027fda2efad7fc67ba34a03fa481fad | 96cbb9e2bb137ae2b32b994498b20d8bf5e87cef | Improve error message for incomplete toolchains | Improve the error message shown when `rustup` encounters a toolchain that is missing its manifest.
Interrupted installations can leave a partially installed toolchain behind. Rustup already improves the recovery experience when reinstalling such toolchains (#4725), but users can still encounter a confusing "Missing ... | diff --git a/src/errors.rs b/src/errors.rs
index 0a406f26993..8b56f02c1c0 100644
--- a/src/errors.rs
+++ b/src/errors.rs
@@ -71,7 +71,11 @@ pub enum RustupError {
DownloadingFile { url: Url, path: PathBuf },
#[error("could not download file from '{url}' to '{}'", .path.display())]
DownloadNotExists { url... | 4 | 4 | 1 | [{"id": "G0", "claim": "The help text's suggested remedy (\"run `rustup toolchain install <toolchain>` to reinstall\") may not actually repair an incomplete toolchain, so the test should verify the suggestion works or the text should be made less prescriptive.", "category": "correctness", "verdict": "supported", "prior... | null |
rust-lang__rustup__4840 | rust-lang/rustup | 4,840 | defect | 6fb0b6f0ad45577f1eda1794822a15298be1a677 | 42b4bea25c210d7fad999141c7345210bd25e8de | fix(cli/rustup_mode)!: skip auto-installation in some `rustup` commands | Closes #4836 by making it possible to skip `should_auto_install` 's dynamic detection entirely.
Whether the skip should be applied can be predetermined during `clap` dispatch (at least for `rustup_mode.rs`), so the only remaining question seems to be where we would want to apply the skip. | diff --git a/src/cli/proxy_mode.rs b/src/cli/proxy_mode.rs
index cb3df2b88fa..0e480e920fa 100644
--- a/src/cli/proxy_mode.rs
+++ b/src/cli/proxy_mode.rs
@@ -32,7 +32,7 @@ pub async fn main(arg0: &str, current_dir: PathBuf, process: &Process) -> Result
.skip(1 + toolchain.is_some() as usize)
.collect()... | 7 | 7 | 0 | [{"id": "G0", "claim": "`rustup show` bails out too early when auto-installation is disabled (a pre-existing issue), which the author intends to fix in this PR.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "pre_existing"}, {"id": "G1", "claim": "The per-subcommand auto-installation ma... | null |
rust-lang__rustup__4843 | rust-lang/rustup | 4,843 | defect | e3e810a46661300c18e1dc6c42474d9c35ab14a0 | 0ec844464846c0d5de136748de6cde79cca00634 | fix: rename partially "Triple" to "Tuple" to reflect the new terminology (pt.3) | Partial effort to #4826. Siblings: #4827, #4834
This PR still does not do functionality changes and should be the last PR in this series without such changes (next PR will include user-facing changes.) | diff --git a/src/cli/proxy_mode.rs b/src/cli/proxy_mode.rs
index e387cd7ed76..0f2b52d9b27 100644
--- a/src/cli/proxy_mode.rs
+++ b/src/cli/proxy_mode.rs
@@ -36,7 +36,7 @@ pub async fn main(arg0: &str, current_dir: PathBuf, process: &Process) -> Result
let (toolchain, source) = cfg
.local_toolchain(match t... | 1 | 1 | 0 | [{"id": "G0", "claim": "The getter named get_default_host_tuple (introduced by renaming get_default_host_triple) should drop the get_ prefix and be called default_host_tuple, per the Rust API guidelines on getter naming.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
rust-lang__rustup__4851 | rust-lang/rustup | 4,851 | defect | 228e4b4cea45565fedb3a332b86a968d3c8fe685 | 03d41fd00ae336d831aa73479c9189606bcb64e3 | feat(cli/self-update): refine wording of "already installed Rust" warning | Closes #3679 by mentioning https://rust-lang.github.io/rustup/installation/already-installed-rust.html in the `rustup-init` installer's output.
As discussed in https://github.com/rust-lang/rustup/issues/3679#issuecomment-4387717425, if a `rustup` packager chooses to skip the installer completely, it is the responsib... | diff --git a/src/cli/self_update.rs b/src/cli/self_update.rs
index 4628da4a30f..9be886d5fca 100644
--- a/src/cli/self_update.rs
+++ b/src/cli/self_update.rs
@@ -710,11 +710,13 @@ fn check_existence_of_rustc_or_cargo_in_path(no_prompt: bool, process: &Process)
if let Err(path) = rustc_or_cargo_exists_in_path(proces... | 2 | 1 | 0 | [{"id": "G0", "claim": "The new warning could confuse users if rustup is installed system-wide but not in the user override, or already installed in the user override — and mobiuscog asks whether the code checks prevent the text being shown in the latter case.", "category": "design", "verdict": "opposed", "priority": "... | null |
rust-lang__rustwide__115 | rust-lang/rustwide | 115 | defect | 319f2be5a2868aa6d0c45975b34a439ae55023e5 | 35f5db7701dc4429effa374930b627289f60abbc | return memory.peak after calling sandboxed commands | This is related to https://github.com/rust-lang/docs.rs/issues/878 (and https://github.com/rust-lang/docs.rs/issues/842), where we want to get the memory usage of the build and store it.
We will already have the `CommandError` kind after https://github.com/rust-lang/docs.rs/pull/3201, we show build durations since... | diff --git a/src/cmd/mod.rs b/src/cmd/mod.rs
index 2d4a4a2..c411e37 100644
--- a/src/cmd/mod.rs
+++ b/src/cmd/mod.rs
@@ -375,9 +375,9 @@ impl<'w> Command<'w, '_> {
/// Run the prepared command and return an error if it fails (for example with a non-zero exit
/// code or a timeout).
- pub fn run(self) -> ... | 1 | 1 | 0 | [{"id": "G0", "claim": "Reading /sys/fs/cgroup/memory.peak from the still-running container may not do what the author expects, since its semantics (lifetime peak of the whole cgroup) are poorly documented and the reviewer finds the behaviour strange.", "category": "correctness", "verdict": "supported", "priority": "P2... | null |
rust-lang__rustwide__20 | rust-lang/rustwide | 20 | defect | 0d3c2f6b80b88d03e7ef023c44a3296e82371158 | 8449451f82b9c6fa76d81317d5bafc84fb027cb3 | add actions on process_lines | Draft of how `Actions ` can be implemented. It uses maybe a little more memory than necessary because it duplicates the input line even if it's not modified but I believe that since the input is a single line and it goes out of scope as soon as it reads another line it's not very important to optimize this and this way... | diff --git a/src/cmd/actions.rs b/src/cmd/actions.rs
new file mode 100644
index 0000000..fef96e7
--- /dev/null
+++ b/src/cmd/actions.rs
@@ -0,0 +1,63 @@
+/// Represents actions that are available while reading live output from a process
+pub struct Actions {
+ lines: Vec<String>,
+}
+
+impl<'a> Actions {
+ pub(cr... | 5 | 5 | 0 | [{"id": "G0", "claim": "The struct `Actions` should be renamed to `ProcessLinesActions` (and the file renamed accordingly).", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "`next_input` should accept a `String` instead of `&str`, to avoid a `String -> &str... | null |
rust-lang__rustwide__21 | rust-lang/rustwide | 21 | defect | 0d3c2f6b80b88d03e7ef023c44a3296e82371158 | d18d8fb861fbfa5ce5adb34ccbd2e0e2e85a98fd | Fix process lines | Fix `process_lines` not working in sandboxed enviroments | diff --git a/src/cmd/mod.rs b/src/cmd/mod.rs
index 142d519..1a3591a 100644
--- a/src/cmd/mod.rs
+++ b/src/cmd/mod.rs
@@ -345,7 +345,12 @@ impl<'w, 'pl> Command<'w, 'pl> {
.env("CARGO_HOME", container_dirs::CARGO_HOME.to_str().unwrap())
.env("RUSTUP_HOME", container_dirs::RUSTUP_HOME.to... | 2 | 2 | 1 | [{"id": "G0", "claim": "The new test_process_lines only checks that process_lines is called eventually; it should instead assert that a known line outputted by `cargo run` was provided to the callback.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "A ch... | null |
rust-lang__rustwide__22 | rust-lang/rustwide | 22 | defect | 2b0d92b580a472bcfefe5a21aeefcc6c269731d0 | 6e4d09dd774aeac9851fa5fc1be41b11ad075af8 | add prepare step to remove ".cargo/config" | fixes: https://github.com/rust-lang/docs.rs/issues/650 | diff --git a/src/prepare.rs b/src/prepare.rs
index 52477e2..946cf5d 100644
--- a/src/prepare.rs
+++ b/src/prepare.rs
@@ -2,6 +2,7 @@ use crate::cmd::Command;
use crate::{build::CratePatch, Crate, Toolchain, Workspace};
use failure::{Error, Fail, ResultExt};
use log::info;
+use std::fs::remove_file;
use std::path::P... | 3 | 2 | 0 | [{"id": "G0", "claim": "Add an `info!` log line saying the `.cargo/config` file was deleted, so all changes done during prepare are logged.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add a changelog entry in a new \"Changed\" subsection unde... | null |
rust-lang__rustwide__26 | rust-lang/rustwide | 26 | defect | dfd4dfc5f3107ee65d0deb57061cca4601468f45 | d2a9e73fe07f3e4823bc7f019214b711505a3599 | Add the Workspace::purge_all_caches method | This PR adds a method to purge the contents of all the caches, with the goal of freeing up disk space. | diff --git a/CHANGELOG.md b/CHANGELOG.md
index b675a02..2c4fd95 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
+### Added
+
+- New method `Workspace::purge_all_caches`
+
### Changed
- Subcommands execu... | 2 | 1 | 1 | [{"id": "G0", "claim": "Questions why purge_all_caches manually chains the individual cache subdirectories instead of just running remove_dir_all on the top-level directories.", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "An index update during the test r... | null |
rust-lang__rustwide__31 | rust-lang/rustwide | 31 | defect | de7e3e71f95aefb39f0f715b60371aee4917f50e | b4b44a8170bea72457d42f83792348dff90ef9e0 | Don't normalize commands | Since commands are looked up in PATH, their `Path` is unreliable and
cannot be treated as a normal directory.
Closes https://github.com/rust-lang/rustwide/issues/30
r? @pietroalbini | diff --git a/src/cmd/mod.rs b/src/cmd/mod.rs
index ee4f01a..c619d5c 100644
--- a/src/cmd/mod.rs
+++ b/src/cmd/mod.rs
@@ -369,7 +369,7 @@ impl<'w, 'pl> Command<'w, 'pl> {
capture,
)
} else {
- let (binary, managed_by_rustwide) = match self.binary {
+ let (mut ... | 7 | 7 | 3 | [{"id": "G0", "claim": "normalize_path should always be called for binaries managed by rustwide and never for global binaries, instead of the S1 condition (is_relative && components().count() > 1).", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The ... | null |
rust-lang__rustwide__48 | rust-lang/rustwide | 48 | defect | d2c0723c88a7b05715b4942226acebf54d0b6328 | 3953a643546989d37cf3d3f7ddf39b6056ccbff9 | Support custom registries | Required for docs.rs with custom index location as stated in [this comment](https://github.com/rust-lang/docs.rs/issues/767#issuecomment-710296929).
UPD: Tested with docs-builder example for a private registry crate and it worked fine with `https://login:password@git.repo` url. Still doesn't work with ssh though. | diff --git a/Cargo.toml b/Cargo.toml
index 5cc3706..7c744ee 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -38,6 +38,7 @@ remove_dir_all = "0.5.2"
base64 = "0.12.0"
getrandom = { version = "0.1.12", features = ["std"] }
thiserror = "1.0.20"
+git2 = "0.13.12"
[target.'cfg(unix)'.dependencies]
nix = "0.11.0"
diff --g... | 10 | 10 | 4 | [{"id": "G0", "claim": "The index folder name should be produced with the same percent_encoding mechanism used elsewhere in rustwide (move ENCODE_SET into crate::utils and reuse it) instead of replacing characters with '-'.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"... | null |
rust-lang__rustwide__6 | rust-lang/rustwide | 6 | defect | 8e183b7bbafd6384ce74423bb9329163482bddab | 89362cd651aed1eb49f8cc4aff4d655f04268bac | API to allow applying patches to crates | This PR is part of rust-lang/crater#441 and adds a public api to allow adding patch tables to crates.
It adds a builder in front of the `BuildDirectory::build` method and adds any patches to the crate's Cargo.toml during tweaking.
Thanks! | diff --git a/src/build.rs b/src/build.rs
index df0dd1c..94897f2 100644
--- a/src/build.rs
+++ b/src/build.rs
@@ -1,9 +1,10 @@
use crate::cmd::{Command, MountKind, Runnable, SandboxBuilder};
use crate::prepare::Prepare;
-use crate::{Crate, Toolchain, Workspace};
+use crate::{Crate, Toolchain, Workspace, crates::CrateP... | 8 | 8 | 5 | [{"id": "G0", "claim": "The Builder should accept the toolchain, the crate and the sandbox in its constructor instead of via standalone methods, so that failing to provide all of them is a compile-time error rather than a runtime one.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduce... | null |
rust-lang__rustwide__60 | rust-lang/rustwide | 60 | defect | 534759472a57d240b226c3caf9e3f1279a83e717 | da384297d7400e79a879eed50f7df4fbb4979afb | Remove rust-toolchain before running builds | This avoids running with the wrong version of the toolchain.
I had the same experience as in https://github.com/rust-lang/docs.rs/issues/555#issuecomment-624631379 - the test succeeds even if I don't change rustwide, so it's not actually testing anything. | diff --git a/src/prepare.rs b/src/prepare.rs
index a49ad4a8..aaf60022 100644
--- a/src/prepare.rs
+++ b/src/prepare.rs
@@ -38,7 +38,7 @@ impl<'a> Prepare<'a> {
pub(crate) fn prepare(&mut self) -> Result<(), Error> {
self.krate.copy_source_to(self.workspace, self.source_dir)?;
self.validate_manife... | 3 | 2 | 1 | [{"id": "G0", "claim": "Add the remaining override-file synonyms (`.cargo/config.toml` and `rust-toolchain.toml`) to the list of files removed before a build.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Add a changelog line for this pull request'... | null |
rust-lang__rustwide__76 | rust-lang/rustwide | 76 | defect | ad5e792ccd19d04e1e1d013c83ddd4ca167365ed | 52c3e0b92aa0fb12d108c776f72ea68b71ca331c | migrate from failure to anyhow | I would love to get rid of some failure/anyhow compatibility code in docs.rs, and failure is unmaintained anyways.
| diff --git a/Cargo.toml b/Cargo.toml
index e05df74e..e9a7e61d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -18,7 +18,7 @@ unstable-toolchain-ci = []
[dependencies]
http = "0.2"
-failure = "0.1.3"
+anyhow = { version = "1.0.68", features = ["backtrace"]}
futures-util = "0.3.5"
log = "0.4.6"
tokio = { version = "1.... | 1 | 1 | 0 | [{"id": "G0", "claim": "Do not import `anyhow::Result` (shadowing the standard Result, and left unused in some modules after usages were made explicit); instead drop the import and always refer to it explicitly as `anyhow::Result`, everywhere.", "category": "maintainability", "verdict": "supported", "priority": "P2", "... | null |
rust-lang__rustwide__83 | rust-lang/rustwide | 83 | defect | fcc85e12303bf366f50efa2ac51ba5eea7b75874 | d2fbc313b198db0f4a37163d3ed29926cd6a5342 | add max_line_length to LogStorage | In https://github.com/rust-lang/docs.rs/issues/2441 we had an issue where a single log line was in the 10s of MB ( [see this zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/356853-t-docs-rs/topic/increase.20max.20build.20log.20size) ).
So now we want to truncate log-lines that are too wide, so we can k... | diff --git a/src/logging.rs b/src/logging.rs
index 52a40bb..be1eb12 100644
--- a/src/logging.rs
+++ b/src/logging.rs
@@ -113,6 +113,7 @@ pub struct LogStorage {
min_level: LevelFilter,
max_size: Option<usize>,
max_lines: Option<usize>,
+ max_line_length: Option<usize>,
}
impl LogStorage {
@@ -127,... | 1 | 1 | 1 | [{"id": "G0", "claim": "Truncating with `&message[..max_line_length - 3]` will panic if that byte index is not on a UTF-8 character boundary; the cut should be walked back to a char boundary instead.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}] | null |
rust-lang__socket2__164 | rust-lang/socket2 | 164 | defect | 9c4a404d5e44df1ecc56d62d35ee22109a886b5f | 092c53e94ff81fb99e47f1a23ba7a745f0e01580 | Add Fuchsia support and CI | In general, feature support is identical to Linux.
Updates #78. | diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index c7cb4a32..42888f3d 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -49,7 +49,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- target: [x86_64-unknown-redox]
+ target: [x86_64-unknow... | 3 | 2 | 1 | [{"id": "G0", "claim": "Revert to constructing the msghdr struct directly (in both recvmsg and sendmsg) instead of mem::zeroed(), because explicit construction forces a porter to check the structure's fields when moving to a new OS.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"},... | null |
rust-lang__socket2__232 | rust-lang/socket2 | 232 | defect | 3025b859b9ad2ca70438fb7efb86232078b32deb | 2f41a94b3e32681e4bc5505e1b8290a14ed1482b | Set noinherit on accepted sockets on Windows | Sockets created by `accept` will be inheritable by default, and this library does not make them non-inheritable even when calling `Socket::accept`. This change fixes that. | diff --git a/src/socket.rs b/src/socket.rs
index 91d7a5e6..4cb45726 100644
--- a/src/socket.rs
+++ b/src/socket.rs
@@ -260,7 +260,12 @@ impl Socket {
)))]
{
let (socket, addr) = self.accept_raw()?;
- set_common_flags(socket).map(|socket| (socket, addr))
+ let socket ... | 2 | 2 | 0 | [{"id": "G0", "claim": "The helper `assert_default_flags` should be renamed to `assert_common_flags` to match the `set_common_flags` naming, and possibly reference it in a comment.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The helper's `def... | null |
rust-lang__socket2__236 | rust-lang/socket2 | 236 | defect | 2843d44a3440a2d4b65bb15be275ec2e3e80ee4e | 065d6b341b66a31819afc37a869b202db4b9c742 | Implement bind_device for Apple devices | I've implemented `bind_device` for Apple devices (macOS and iOS), but I've only tested this on macOS. I've tried to maintain a similar interface as on the other platforms, as far as using an interface alias goes. The issue with that is the alias needs to be a null terminated string to resolve the interface index. Thes... | diff --git a/src/sys/unix.rs b/src/sys/unix.rs
index b76ce12f..634a48e7 100644
--- a/src/sys/unix.rs
+++ b/src/sys/unix.rs
@@ -25,6 +25,8 @@ use std::net::{Ipv4Addr, Ipv6Addr};
use std::num::NonZeroUsize;
#[cfg(feature = "all")]
use std::os::unix::ffi::OsStrExt;
+#[cfg(all(feature = "all", target_vendor = "apple"))]... | 4 | 4 | 3 | [{"id": "G0", "claim": "The setter should take an interface index (e.g. Option<NonZeroU32>, where None unbinds) instead of an interface name, and should not introduce two differently-behaving functions under the same name.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "unclear"}, {"id": "G1... | null |
rust-lang__socket2__249 | rust-lang/socket2 | 249 | defect | 1c67209c2eda5708b3093900a59befbc4a981b13 | 157094985281cfedb9f553cc223451849e1606d5 | Windows: Add support for Unix sockets | Newer versions of Windows support AF_UNIX stream sockets. This change
adds Windows support for the `SockAddr::unix` function and the
`Domain::UNIX` constant.
Since Unix sockets are now available on all tier1 platforms, this also
removes `all` feature requirement from the `SockAddr::unix` function. | diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 828f4253..0d9ba86e 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -33,7 +33,7 @@ add new tests.
All types and methods that are available on all tier 1 platforms are defined in
the first level of the source, i.e. `src/*.rs` files. Additional API that is
-pl... | 6 | 6 | 2 | [{"id": "G0", "claim": "unix_sockaddr should get the path as raw bytes via a Path/OsStr -> &[u8] conversion (as Unix does) instead of path.to_str(), since Windows paths are WTF-8 and to_str() rejects strings with unmatched surrogates — and, failing that, the limitation should be raised with the Rust project.", "categor... | null |
rust-lang__socket2__258 | rust-lang/socket2 | 258 | defect | cddb67b8534a46a372beb9fd63c5ce8d1473cbda | d817088c1a1ee3a6ebeade2d910df81a19a348d9 | Use correct socket option level and name to get/set freebind flag | `freebind()`/`set_freebind()` are currently getting/setting the reuseport flag because we are passing an incorrect socket level - `SOL_SOCKET` instead of `SOL_IP`, and `SO_REUSEPORT` happens to have the same value as `IP_FREEBIND` on Linux:
```
$ git -C ~/src/linux grep -h 'define \(SO_REUSEPORT\|IP_FREEBIND\)' -- ... | diff --git a/src/sys/unix.rs b/src/sys/unix.rs
index 7eff9d6f..1c7f5d54 100644
--- a/src/sys/unix.rs
+++ b/src/sys/unix.rs
@@ -1460,7 +1460,10 @@ impl crate::Socket {
}
}
- /// Get the value of the `IP_FREEBIND` option on this socket.
+ /// Get the value of the `IP_FREEBIND` or `IPV6_FREEBIND` opt... | 2 | 2 | 1 | [{"id": "G0", "claim": "Use SOL_SOCKET for an IPv6 option name is wrong, so fix the current functions by changing SOL_SOCKET to SOL_IP and add a new (set)_freebind_ipv6 variant instead of hiding a domain check inside the existing wrappers.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": ... | null |
rust-lang__socket2__284 | rust-lang/socket2 | 284 | defect | 271fd2e878be19aab9bbd416ea18ed54ac31af61 | 031cb28d6352704627da35c511857c376b6e88a1 | Implement {join,leave}_multicast_v4_n | See individual commit messages (please don't squash on merge). @Thomasdezeeuw | diff --git a/src/lib.rs b/src/lib.rs
index a1ece161..c7d5e5d7 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -119,11 +119,8 @@ mod sockaddr;
mod socket;
mod sockref;
-#[cfg(unix)]
-#[path = "sys/unix.rs"]
-mod sys;
-#[cfg(windows)]
-#[path = "sys/windows.rs"]
+#[cfg_attr(unix, path = "sys/unix.rs")]
+#[cfg_attr(window... | 2 | 2 | 1 | [{"id": "G0", "claim": "Add some documentation to each variant of the new InterfaceIndexOrAddress enum.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Include the libc update in the last commit to indicate it is required for this change, and add a... | null |
rust-lang__socket2__286 | rust-lang/socket2 | 286 | defect | 271fd2e878be19aab9bbd416ea18ed54ac31af61 | 829dca13fdc25fbe1908909b0e224993331cadf3 | Add support for the socket options TCP_CORK, TCP_QUICKACK and TCP_THIN_LINEAR_TIMEOUTS | Hi,
this is my first try and I ask for a review. I encounter one problem:
On my system TCP_QUICKACK is enabled by default. So the test fails. I could change the test, so that it deactivates TCP_QUICKACK, but on a different system it might be disabled by default. So that this test is flaky at the moment.
The t... | diff --git a/src/sys/unix.rs b/src/sys/unix.rs
index 0514ee2d..437581fc 100644
--- a/src/sys/unix.rs
+++ b/src/sys/unix.rs
@@ -1283,6 +1283,158 @@ impl crate::Socket {
}
}
+ /// Get the value of the `TCP_CORK` option on this socket.
+ ///
+ /// For more information about this option, see [`set_... | 2 | 2 | 1 | [{"id": "G0", "claim": "Put TCP_CORK in backticks in the TCP_CORK setter's doc comment.", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Change the quickack test to set the option to false since quickack defaults to true, which made the CI test fail... | null |
rust-lang__socket2__327 | rust-lang/socket2 | 327 | defect | 66690648402e7d6cff33192f353bfe372b7245c9 | 6c6e0fdaa53c25a9a6e1dacf74e5c24f8c2b5767 | Make SockAddr::vsock infallible | This code can never fail, but it was incorrect marked as fallible (by
returning an `io::Result`).
Updates #231. | diff --git a/src/sys/unix.rs b/src/sys/unix.rs
index 6411fec7..84e1b376 100644
--- a/src/sys/unix.rs
+++ b/src/sys/unix.rs
@@ -537,24 +537,17 @@ impl SockAddr {
docsrs,
doc(cfg(all(feature = "all", any(target_os = "android", target_os = "linux"))))
)]
- pub fn vsock(cid: u32, port: u32) -> io:... | 2 | 1 | 0 | [{"id": "G0", "claim": "The amount of unsafe in `SockAddr::vsock` can be reduced by calling `assume_init` on the zeroed `MaybeUninit` up front (`unsafe { MaybeUninit::<sockaddr_storage>::zeroed().assume_init() }`), which is sound because all fields are valid when zeroed.", "category": "maintainability", "verdict": "sup... | null |
rust-lang__socket2__349 | rust-lang/socket2 | 349 | defect | 07993fdc0c30692845df65182ce5c15d43d16d45 | 7d00d69796bb6d88fa4820063b25f4e0a6b7dc4c | support IPPROTO_MPTCP | Simply add the support for MPTCP protocol by adding and exposing the MPTCP const Protocol.
MPTCP allow end user to open multiple path (TCP) to the destination server using multiple interface. For example, one can use the LTE connection of his phone as well as a Wifi connection. Or Ethernet and Wifi.
Setting this ... | diff --git a/src/lib.rs b/src/lib.rs
index 4d588974..1994a540 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -302,6 +302,10 @@ impl Protocol {
/// Protocol corresponding to `UDP`.
pub const UDP: Protocol = Protocol(sys::IPPROTO_UDP);
+
+ #[cfg(target_os = "linux")]
+ /// Protocol corresponding to `MPTCP`... | 1 | 1 | 0 | [{"id": "G0", "claim": "Keep `tests` as an array literal with the MPTCP tuple written inline under `#[cfg(target_os = \"linux\")]`, instead of converting it to a mutable `Vec` and pushing to it.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
rust-lang__socket2__360 | rust-lang/socket2 | 360 | defect | a961449ec75956ab249f319578ffd0b21c4631fb | 850f5e7c905a69514b1de22ea36c678c92c49025 | Add support for SO_ORIGINAL_DST and IP6T_SO_ORIGINAL_DST. | Those values contain the original destination IPv4/IPv6 address
of the connection redirected using iptables REDIRECT or TPROXY.
Signed-off-by: Piotr Sikora <piotr@aviatrix.com> | diff --git a/src/sys/unix.rs b/src/sys/unix.rs
index 5f99bf0b..24a21b50 100644
--- a/src/sys/unix.rs
+++ b/src/sys/unix.rs
@@ -1789,6 +1789,68 @@ impl crate::Socket {
}
}
+ /// Get the value for the `SO_ORIGINAL_DST` option on this socket.
+ ///
+ /// This value contains the original destinatio... | 2 | 2 | 1 | [{"id": "G0", "claim": "The user should handle the getsockopt errors themselves, so original_dst and original_dst_ipv6 should not map ENOENT to Ok(None).", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "A test for original_dst should be added, even if it i... | null |
rust-lang__socket2__364 | rust-lang/socket2 | 364 | defect | 05ca98999bf63722e8c5f6eb2a89d2c42aa16730 | f300a30ca6a5242d1642286a6c3d014c22cf5cec | Add support for IPV6_TCLASS and IPV6_RECVTCLASS | A simple implementation of the IPV6_TCLASS and IPV6_RECVTCLASS modeled after the existing IP_TOS and IP_RECVTOS implementations.
close #363 | diff --git a/src/socket.rs b/src/socket.rs
index 5900e0c2..0d8c300b 100644
--- a/src/socket.rs
+++ b/src/socket.rs
@@ -1668,6 +1668,98 @@ impl Socket {
)
}
}
+
+ /// Set the value of the `IPV6_TCLASS` option for this socket.
+ ///
+ /// Specifies the traffic class field that is used ... | 6 | 6 | 1 | [{"id": "G0", "claim": "Remove the NOTE about the Microsoft docs not listing the option from the IPV6_TCLASS doc comments, since it is not needed.", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Drop the `let recv_tclass = i32::from(recv_tclass);` ... | null |
rust-lang__socket2__403 | rust-lang/socket2 | 403 | defect | 18a883653752116a10ec78f7d36f8d956e4c2e7c | 0285cdc8a9f3cbedfd02ad560faad380bca51ec4 | Match the standard library's interface for unix sockets on unix. | Following #332, currently unix only. Should this interface also be made available on Windows?
This PR adds to `SockAddr` methods to get the path of the unix socket address on unix.
It also adds the new methods to the tests. | diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index a6e40972..97c87acc 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -39,7 +39,7 @@ platforms the `all` feature is used, to indicate to the user that they're using
API that might is not available on all platforms.
The main `Socket` type is defined in `src/soc... | 7 | 6 | 2 | [{"id": "G0", "claim": "In `as_sockaddr_un`, an existing pointer accessor (`as_storage_ptr` or `as_ptr`) should be used instead of applying `ptr::addr_of!` to the storage field directly.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Since the d... | null |
rust-lang__socket2__437 | rust-lang/socket2 | 437 | defect | 6713533ef29a6792f1553c44a8cf580f8cbbed68 | 675b2ac8544cff1bb0e3d8194ecaf11f7e8c076d | Add support for getting SO_COOKIE socket option on linux | Add support for getting the socket cookie on Linux via the SO_COOKIE sockopt (#436)
There is only a getter, as the cookie is managed/created by the kernel itself. | diff --git a/src/sys/unix.rs b/src/sys/unix.rs
index 883a1260..f4447213 100644
--- a/src/sys/unix.rs
+++ b/src/sys/unix.rs
@@ -2418,6 +2418,18 @@ impl crate::Socket {
unsafe { setsockopt(self.as_raw(), libc::SOL_SOCKET, libc::SO_DETACH_FILTER, 0) }
}
+ /// Gets the value for the `SO_COOKIE` option on... | 1 | 1 | 1 | [{"id": "G0", "claim": "Add a quick smoke test for the new `cookie()` (SO_COOKIE) socket option to `tests/socket.rs`.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
rust-lang__socket2__465 | rust-lang/socket2 | 465 | defect | 66ed6b055a4352a26ed25e8d01981fb5b555f3d8 | 163059a37d03d4def94928ff8fcefa32fb557079 | Add support for vita | Needs https://github.com/rust-lang/libc/pull/3284 to compile | diff --git a/src/lib.rs b/src/lib.rs
index 7ed91054..b3219a2e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -433,6 +433,7 @@ pub struct TcpKeepalive {
target_os = "solaris",
target_os = "nto",
target_os = "espidf",
+ target_os = "vita",
)))]
interval: Option<Duration>,
#[c... | 2 | 2 | 1 | [{"id": "G0", "claim": "Asks whether CI can be set up for the new vita target, running `cargo test` or `cargo check`.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Some tests fail on vita because there is no `fcntl` for non-blocking sockets there, so t... | null |
rust-lang__socket2__470 | rust-lang/socket2 | 470 | defect | 712e483df4ac98ded7d77ae8c3ba1601c58bd7e6 | 71db4a95f4754dacb11b6bb802a9bc5096fd5db4 | Add `protocol` method for Windows. | Don't know why this method didn't appear on Windows before:) | diff --git a/src/sys/windows.rs b/src/sys/windows.rs
index 9f00895f..27176c5e 100644
--- a/src/sys/windows.rs
+++ b/src/sys/windows.rs
@@ -920,6 +920,21 @@ impl crate::Socket {
Ok(())
}
}
+
+ /// Returns the [`Protocol`] of this socket by checking the `SO_PROTOCOL_INFOW`
+ /// option on... | 1 | 1 | 0 | [{"id": "G0", "claim": "Move the `use windows_sys::Win32::Networking::WinSock::SO_PROTOCOL_INFOW;` import from inside `protocol()` to the other imports at the head of the file.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
rust-lang__socket2__499 | rust-lang/socket2 | 499 | defect | faa59e97451273e2b60963bfccec2966adfd59d0 | dc71380335fde833a3b8d66616e806c17a060891 | Add MSG_CONFIRM and MSG_DONTROUTE to RecvFlags | This is useful when reading from SocketCAN sockets. The MSG_CONFIRM flag is used to indicate a successful transmission of a CAN frame.
Reference: https://www.kernel.org/doc/html/next/networking/can.html#raw-socket-option-can-raw-join-filters
Is there any reason the raw flags value is not exposed to the user? The... | diff --git a/src/sys/unix.rs b/src/sys/unix.rs
index 805b6d55..c5196a80 100644
--- a/src/sys/unix.rs
+++ b/src/sys/unix.rs
@@ -573,6 +573,37 @@ impl RecvFlags {
pub const fn is_out_of_band(self) -> bool {
self.0 & libc::MSG_OOB != 0
}
+
+ /// Check if the confirm flag is set
+ ///
+ /// This... | 6 | 6 | 2 | [{"id": "G0", "claim": "The build is failing on some targets due to missing fields, so the new functions should be limited to target_os = \"linux\" (with the all feature as well).", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "The new flags should b... | null |
rust-lang__socket2__518 | rust-lang/socket2 | 518 | defect | 6a13053e528fe1bbbfff85461589bafc7425f7b0 | 40e7810ed9548c67fcf295a20ee0cca02c0db0de | Add: header_included_v6() and set_header_included_v6() | Also, deprecate header_included() and set_header_included() in favor of header_included_v4() and set_header_included_v4()
Close #517 | diff --git a/src/socket.rs b/src/socket.rs
index 19f269cf..620ab836 100644
--- a/src/socket.rs
+++ b/src/socket.rs
@@ -1148,6 +1148,7 @@ impl Socket {
docsrs,
doc(cfg(all(feature = "all", not(any(target_os = "redox", target_os = "espidf")))))
)]
+ // TODO: Since it is especific for IPv4, it sh... | 3 | 1 | 1 | [{"id": "G0", "claim": "The PR should follow #432's pattern: rename the IPv4 methods to header_included_v4/set_header_included_v4 and deprecate the unsuffixed versions.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The reviewer questioned why the allow(... | null |
rust-lang__socket2__529 | rust-lang/socket2 | 529 | defect | 3a938932829ea6ee3025d2d7a86c7b095c76e6c3 | 6c160faa061a9a8fb67f878b00218bb8597ab73d | feat: add support for original_dst for windows | I noticed there wasn't support for original dst in Windows, so I added it. Also add windows gnu target to allow cross compiling | diff --git a/Cargo.toml b/Cargo.toml
index 8ef85ebc..024ee548 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -29,7 +29,7 @@ include = [
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
-targets = ["aarch64-apple-ios", "aarch64-linux-android", "x86_64-apple-darwin", "x86_64-unknown... | 5 | 5 | 1 | [{"id": "G0", "claim": "The original_dst/original_dst_ipv6 functions should be unified across OSes — the public API should live in src/socket.rs with a single shared implementation instead of OS-specific duplicates.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G4", "... | null |
rust-lang__socket2__543 | rust-lang/socket2 | 543 | defect | 60d118fa4724f756c31944c86dc1ecd5dfc4c9b7 | 74fd9f4bac941726dfabe380b0a6101dc7dc59e7 | Ipv6 incl hop limit | Adding support for enabling IPV6_RECVHOPLIMIT on sockets for Linux OS | diff --git a/src/socket.rs b/src/socket.rs
index 4e41793c..32c8dd9d 100644
--- a/src/socket.rs
+++ b/src/socket.rs
@@ -2018,6 +2018,36 @@ impl Socket {
)
}
}
+
+ /// Set the value of the `IPV6_RECVHOPLIMIT` option for this socket.
+ ///
+ /// The received hop limit is returned as anc... | 3 | 2 | 2 | [{"id": "G0", "claim": "The newly added cfg block for the IPV6_RECVHOPLIMIT import duplicates the identical target_os exclusion list above; use a single combined `pub(crate) use libc::{IPV6_RECVHOPLIMIT, IPV6_RECVTCLASS};` instead.", "category": "maintainability", "verdict": "opposed", "priority": "P2", "scope": "intro... | null |
rust-lang__socket2__557 | rust-lang/socket2 | 557 | defect | 62479f73a41063501ded9ef82ebb215ae1d3053a | 3b6ea10cc0fde38a8819e05b338f9a3629c03ad6 | Add tcp retries to windows | Bump windows sys and add support for retries on Windows | diff --git a/Cargo.toml b/Cargo.toml
index 18331f61..741871e9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -38,6 +38,7 @@ targets = [
"x86_64-apple-darwin",
"x86_64-pc-solaris",
"x86_64-pc-windows-msvc",
+ "x86_64-pc-windows-gnu",
"x86_64-unknown-freebsd",
"x86_64-unknown-fuchsia",
"x86_64-unknown-ill... | 1 | 1 | 1 | [{"id": "G0", "claim": "The windows-sys 0.52 to 0.59 version bump in Cargo.toml is a breaking change that cannot be accepted at the moment (see #526).", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
rust-lang__socket2__604 | rust-lang/socket2 | 604 | defect | 3cc3b285396aa09824b89088711efce0da8c8eaf | b4ceefb607828f9a2ba27198fe517ee1a6387b26 | Add support for Windows Registered I/O | This allows to create socket with the `WSA_FLAG_REGISTERED_IO` flag. | diff --git a/Cargo.toml b/Cargo.toml
index 02b12b48..5b6b07da 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -65,6 +65,8 @@ features = [
[features]
# Enable all API, even ones not available on all OSs.
all = []
+# Enable Windows Registered I/O support.
+registered-io = []
[package.metadata.cargo_check_external_types... | 6 | 5 | 2 | [{"id": "G0", "claim": "The new registered-io Cargo feature is unnecessary and should be removed.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The one-line private wrapper `_registered_io` is unnecessary and should be inlined into the public `registere... | null |
rust-lang__socket2__608 | rust-lang/socket2 | 608 | defect | 15ade5100c865629518190f4234247c8b6e5b1fd | 02d706082a363a1320b623d4d3b85d19ba723616 | add IPV6_TRANSPARENT for tproxy | Add the IPv6 transparent socket option for TPROXY on linux. Also added a macro pattern for IPv4 and IPv6 sockets with attributes to allow the ignore directive to work with IPv4 and IPv6 only tests | diff --git a/src/socket.rs b/src/socket.rs
index 22fe858b..77d17a6a 100644
--- a/src/socket.rs
+++ b/src/socket.rs
@@ -1736,6 +1736,46 @@ impl Socket {
}
}
+ /// Get the value of the `IPV6_TRANSPARENT` option on this socket.
+ ///
+ /// For more information about this option, see [`set_ip_trans... | 3 | 3 | 0 | [{"id": "G0", "claim": "Revert the permission change the pull request made to tests/socket.rs.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new IPV6_TRANSPARENT getter/setter should also be compiled on Android, not gated to Linux only.", "... | null |
rust-lang__socket2__620 | rust-lang/socket2 | 620 | defect | d0ba3d39a6328115a49f470b11be25fd5eba686d | cef0107d53a8b7d69c42a929979ad2545d8f7b1f | Update FreeBSD CI environment | To the latest stable release: 14.3. And fix the tcp_congestion test:
* On FreeBSD 14 or later, it requires the cc_newreno kernel module to be loaded. By default it is not.
* If newreno happens to be the default, switch to cubic for the second part of the test, just as on Linux. | diff --git a/.cirrus.yml b/.cirrus.yml
index dc68cea5..57a00d4f 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -1,5 +1,5 @@
freebsd_instance:
- image: freebsd-13-2-release-amd64
+ image: freebsd-14-3-release-amd64-ufs
env:
RUST_BACKTRACE: full
@@ -9,6 +9,7 @@ task:
setup_script:
- fetch https://sh.rustu... | 1 | 1 | 0 | [{"id": "G0", "claim": "The ESRCH panic message should print the congestion-control algorithm actually being set (new_tcp_ca) instead of hardcoding OPTIONS[1].", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
rust-lang__socket2__632 | rust-lang/socket2 | 632 | defect | 4af7d3dcdb2583e7462b27ee3e2d8521b317294d | d24a0d3c2052cedefb67b10f21afd28c6ae8f82b | Don't set SO_NOSIGPIPE when accepting sockets | This is inherited from the parent socket. Furthermore when attempting to set it on a Unix socket domain it will result in an error.
Closes #631 | diff --git a/src/socket.rs b/src/socket.rs
index 22fe858b..5d865239 100644
--- a/src/socket.rs
+++ b/src/socket.rs
@@ -285,7 +285,7 @@ impl Socket {
)))]
{
let (socket, addr) = self.accept_raw()?;
- let socket = set_common_flags(socket)?;
+ let socket = set_common_ac... | 2 | 2 | 0 | [{"id": "G0", "claim": "The doc comment of `set_common_flags` should state that sockets created via `accept` should use `set_common_accept_flags` instead.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The doc comment should say NOSIGPIPE is inher... | null |
rust-lang__socket2__638 | rust-lang/socket2 | 638 | defect | 9a30f4f657370e9e1aede3351ab2bd33eedb9c95 | 91b9157a7e22e06b70384cac1fb0b375fdededb2 | Added capability to set TCP ACK Frequency on Windows | Adds capability to leverage `SIO_TCP_SET_ACK_FREQUENCY` IOCTL defined in `mstcpip.h` on Windows. Closes #637. | diff --git a/src/socket.rs b/src/socket.rs
index 6a4423ad..87b3fa45 100644
--- a/src/socket.rs
+++ b/src/socket.rs
@@ -2280,6 +2280,35 @@ impl Socket {
)
}
}
+
+ /// Sets the number of TCP segments that must be received
+ /// before the delayed ACK timer is ignored for this socket.
+ ... | 3 | 2 | 1 | [{"id": "G0", "claim": "The new method's doc comment is more verbose than any other method's and adds little, so it should be scaled back to something like \"On Windows this sets `SIO_TCP_SET_ACK_FREQUENCY`\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", ... | null |
rust-lang__socket2__639 | rust-lang/socket2 | 639 | defect | 43ba0ed1f033d6e66948c7ed78a9be2a4b0c7a68 | 6e5c3f56bc01ac2235775cbb8915047c6b2cdde1 | Add wasm32-wasip2 target support | Rework of #532 by @nickrum, addressing review feedback from @Darksonn
and @Thomasdezeeuw:
- Reuses sys/unix.rs instead of creating sys/wasi.rs (per @Thomasdezeeuw's
code review feedback)
- MaybeUninitSlice stays unconditional since libc::iovec is available on WASI,
eliminating 11+ scattered cfg gates (per @Darkson... | diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 1f8e67e8..6fb41acb 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -105,6 +105,7 @@ jobs:
- x86_64-unknown-netbsd
- x86_64-unknown-openbsd
- x86_64-unknown-redox
+ - wasm32-wa... | 4 | 2 | 0 | [{"id": "G0", "claim": "Darksonn asks what the minimum required libc version is.", "category": "documentation", "verdict": "uncertain", "priority": "P3", "scope": "pre_existing"}, {"id": "G1", "claim": "Keep the 'Loopback has special behavior on vita' comment on the connect_timeout_unbound test's cfg attribute when wid... | null |
rust-lang__stdarch__1027 | rust-lang/stdarch | 1,027 | defect | 77e5b51164e50d6371fb3be80c36c3871cda4480 | 4bd13c128b54cbd3ab529147775edb47abb0c5f8 | Convert vsli_n_* neon methods to const generics | Use generic const in the following methods:
vsli_n_*
vsliq_n_*
Fixes #1017 | diff --git a/crates/core_arch/src/aarch64/neon/mod.rs b/crates/core_arch/src/aarch64/neon/mod.rs
index 227d227f4e..a0c2f3b9cb 100644
--- a/crates/core_arch/src/aarch64/neon/mod.rs
+++ b/crates/core_arch/src/aarch64/neon/mod.rs
@@ -2318,362 +2318,362 @@ pub unsafe fn vcvtq_u32_f32(a: float32x4_t) -> uint32x4_t {
#[inli... | 1 | 1 | 1 | [{"id": "G0", "claim": "Use `static_assert!` instead of `assert!` for the `0 <= N && N <= 7` range check in the const-generic `vsli_n_s8`.", "category": "maintainability", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
rust-lang__stdarch__1085 | rust-lang/stdarch | 1,085 | defect | 78e32f8d810a06dea7b9dc65962760624aee0abc | 4253ac0c58f1f2a2bf13a239982fde9e72dfd5ae | add neon instruction vmov_n_* and vmovq_n_* | add neon instruction vmov_n_* and vmovq_n_*
vmov_n_* : Duplicate vector element to vector or scalar. This instruction duplicates the vector element at the specified element index in the source SIMD&FP register into a scalar or each element in a vector, and writes the result to the destination SIMD&FP register.
Wit... | diff --git a/crates/core_arch/src/aarch64/neon/mod.rs b/crates/core_arch/src/aarch64/neon/mod.rs
index 207d4b5ed7..3d06576c22 100644
--- a/crates/core_arch/src/aarch64/neon/mod.rs
+++ b/crates/core_arch/src/aarch64/neon/mod.rs
@@ -1512,6 +1512,70 @@ pub unsafe fn vcombine_p64(low: poly64x1_t, high: poly64x1_t) -> poly6... | 2 | 2 | 1 | [{"id": "G0", "claim": "The PR omits vmov_n_p64 and vmovq_n_p64, which both GCC and Clang have, so the author should add them and add an exception in stdarch-verify for these intrinsics.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Add a small com... | null |
rust-lang__stdarch__1122 | rust-lang/stdarch | 1,122 | defect | 3fd6dd18be5c7a32634aaae621674be49b5673c6 | e96ac0197b09354e2a3fa0ebc5842c0a84d4ba80 | add neon instruction vfma_n_* | vfma_n_* : Floating-point fused Multiply-Add to accumulator (vector). This instruction multiplies corresponding floating-point values in the vectors in the two source SIMD&FP registers, adds the product to the corresponding vector element of the destination SIMD&FP register, and writes the result to the destination SI... | diff --git a/crates/core_arch/src/aarch64/neon/generated.rs b/crates/core_arch/src/aarch64/neon/generated.rs
index 78e11e6915..d70ad38f38 100644
--- a/crates/core_arch/src/aarch64/neon/generated.rs
+++ b/crates/core_arch/src/aarch64/neon/generated.rs
@@ -2810,6 +2810,27 @@ pub unsafe fn vfmaq_f64(a: float64x2_t, b: flo... | 1 | 1 | 0 | [{"id": "G0", "claim": "The vfmaq_n_f64 implementation could be much simpler, building the vector directly with f64x2::new(c, c) instead of the simd_insert/simd_shuffle2 sequence.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
rust-lang__stdarch__1171 | rust-lang/stdarch | 1,171 | defect | 2ecb2ce74d32d21d7387208f88d69f755b40bd90 | 830fb544ee3508a606ff8b041fa86b1ea03a0826 | Add vst1_* neon intrinsics. | I took the vld1_* implementation as an example while writing the vst1_* implementation.
While the arm intrinsics use the LLVM provided intrinsics, I had to copy the approach taken by the SSE unaligned store intrinsics for the aarch64 implementation.
I also ported the SSE tests for the unaligned stores.
I'm not... | diff --git a/crates/core_arch/src/aarch64/neon/mod.rs b/crates/core_arch/src/aarch64/neon/mod.rs
index 9097d26989..6bfbfbfeef 100644
--- a/crates/core_arch/src/aarch64/neon/mod.rs
+++ b/crates/core_arch/src/aarch64/neon/mod.rs
@@ -12,7 +12,8 @@ pub use self::generated::*;
use crate::{
core_arch::{arm_shared::*, s... | 2 | 2 | 1 | [{"id": "G0", "claim": "The vst1_* stores should copy elements of the pointer's own type (i16, i32, i64, ...) rather than u8, since Clang requires these pointers to be aligned to the element size.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The v... | null |
rust-lang__stdarch__1388 | rust-lang/stdarch | 1,388 | defect | 15c760e75c58e49f15d32e76022b04d597c308e8 | 9efe327dfee1f900f246a2df65f9a5c34f815322 | std_detect: Support run-time detection of fp on aarch64 Windows | According to google/cpu_features, IsProcessorFeaturePresent(PF_ARM_VFP_32_REGISTERS_AVAILABLE) returns whether fp is available.
https://github.com/google/cpu_features/blob/a6bf4f9031ec601f905660b8cef82d7478b33d64/src/impl_aarch64_windows.c#L112-L113
~~Also, update to respect feature dependencies based on LLVM's fea... | diff --git a/crates/std_detect/src/detect/os/windows/aarch64.rs b/crates/std_detect/src/detect/os/windows/aarch64.rs
index 119c905e03..0f51b8ce8c 100644
--- a/crates/std_detect/src/detect/os/windows/aarch64.rs
+++ b/crates/std_detect/src/detect/os/windows/aarch64.rs
@@ -11,6 +11,7 @@ pub(crate) fn detect_features() -> ... | 1 | 1 | 0 | [{"id": "G0", "claim": "The dependency guards this PR adds (fp && on jsconv, and likewise asimd && on the crypto features) are unnecessary pedantry, since it is impossible for an AArch64 CPU to support jsconv without fp or the crypto extensions without asimd, so they should be removed.", "category": "maintainability", ... | null |
rust-lang__stdarch__1490 | rust-lang/stdarch | 1,490 | defect | 4935bf0985b3a1a52c33b0035da4fa2ae76f5739 | 92180b8fe7f8d330270965d6feb6af60d50d01f7 | Fix some minor intrinsic-test issues. | Notably, fix some warnings that flood the console, making it awkward to debug Arm tests.
| diff --git a/ci/run.sh b/ci/run.sh
index 20cd4c5643..a13e5963f8 100755
--- a/ci/run.sh
+++ b/ci/run.sh
@@ -11,6 +11,7 @@ set -ex
#export RUST_TEST_THREADS=1
export RUSTFLAGS="${RUSTFLAGS} -D warnings -Z merge-functions=disabled "
+export HOST_RUSTFLAGS="${RUSTFLAGS}"
export STDARCH_DISABLE_DEDUP_GUARD=1
@@ -14... | 1 | 1 | 0 | [{"id": "G0", "claim": "The doc-comment example for `Language::C` should use `{}` braces instead of `[]`, matching the initialiser the code actually generates; Amanieu asks this inline and his LGTM requires this minor typo in the comment to be fixed.", "category": "documentation", "verdict": "supported", "priority": "P... | null |
rust-lang__stdarch__1601 | rust-lang/stdarch | 1,601 | defect | 165996e6359fd57e16770c01c8c85ff443520ccf | 72724623cccb5ab8fe4a5449a5f9cbc677ad1b30 | Update Intel SDE | Update Intel SDE to v9.33.0 (The latest v9.38.0 is buggy in Linux)
Disabled `assert_instr` in the emulated run. Some interaction between `pinkit` and `objdump` results in an `SIGSEGV`. We still have `assert_instr` in the other runs - which is more than enough verification.
Added support for `SSE4a` and `TBM` in t... | diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index d6ea2ea2cd..e895fd9784 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -114,7 +114,7 @@ jobs:
- target: x86_64-unknown-linux-gnu-emulated
os: ubuntu-latest
test_everything: true
- ... | 1 | 1 | 0 | [{"id": "G0", "claim": "Do not leave commented-out test code in crates/core_arch/src/x86_64/xsave.rs: remove the untestable tests entirely and add a comment explaining that they cannot be tested because they are privileged instructions.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope":... | null |
rust-lang__stdarch__1618 | rust-lang/stdarch | 1,618 | defect | 11578e753b026f6e70e93c3c6bd7175d0498f73a | 873e831fd87042bc7fa0dd5353a01db8f2299378 | initial commit to enable amx | As mentioned in [x86_amx_intrinsics](https://github.com/rust-lang/rust/issues/126622)
Completed AMX Intrinsics:
`amx-tile`
- _tile_loadconfig
- _tile_storeconfig
- _tile_loadd
- _tile_release
- _tile_stored
- _tile_stream_loadd
- _tile_zero
`amx-int8`
- _tile_dpbssd
- _tile_dpbsud
- _tile_dpbusd
- _tile... | diff --git a/crates/core_arch/src/lib.rs b/crates/core_arch/src/lib.rs
index 1901149074..d6f7de619e 100644
--- a/crates/core_arch/src/lib.rs
+++ b/crates/core_arch/src/lib.rs
@@ -34,7 +34,9 @@
target_feature_11,
generic_arg_infer,
asm_experimental_arch,
- sha512_sm_x86
+ sha512_sm_x86,
+ x86_amx... | 8 | 8 | 4 | [{"id": "G0", "claim": "The manual `Default` impl for `__tilecfg` should be replaced by `derive` (also deriving `Clone` and `Debug`).", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "`_init_amx` should not live in the `stdarch-test` crate but in `... | null |
rust-lang__stdarch__1706 | rust-lang/stdarch | 1,706 | defect | cf10e913390d1f55c7a5a82e84e7f8bfd41d90f7 | 5fe66383813792177230f3da55880fd38f4c498d | Add keylocker (`kl` and `widekl`) intrinsics and runtime feature detection | This is an effort towards rust-lang/rust#134813
`_mm_loadiwkey` is only allowed to be called from CPL0, so we are skipping testing it. | diff --git a/crates/core_arch/missing-x86.md b/crates/core_arch/missing-x86.md
index 2ea66f3e6e..a190cbe922 100644
--- a/crates/core_arch/missing-x86.md
+++ b/crates/core_arch/missing-x86.md
@@ -137,27 +137,6 @@
</p></details>
-<details><summary>["KEYLOCKER"]</summary><p>
-
- * [ ] [`_mm_aesdec128kl_u8`](https://... | 1 | 1 | 0 | [{"id": "G0", "claim": "Rather than special-casing padding NOPs by raising the instruction limit to 29 for the wide keylocker instructions, the test suite could be changed to ignore any instructions after `ret`.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
rust-lang__stdarch__1732 | rust-lang/stdarch | 1,732 | defect | c114d398156074e7711249b6175fd443fa34a444 | 6878d88af3883e865a40fccc5d36c0e27f030e24 | Feat - Aarch64 FEAT_FAMINMAX | These intrinsics have been excluded from the tests because they require a Clang version with LLVM 20, and QEMU does not yet support the famax or famin instructions. | diff --git a/crates/core_arch/src/aarch64/neon/generated.rs b/crates/core_arch/src/aarch64/neon/generated.rs
index 82e196baad..2f55f9e69d 100644
--- a/crates/core_arch/src/aarch64/neon/generated.rs
+++ b/crates/core_arch/src/aarch64/neon/generated.rs
@@ -821,6 +821,102 @@ pub fn vaddvq_u64(a: uint64x2_t) -> u64 {
... | 1 | 1 | 1 | [{"id": "G0", "claim": "New intrinsics should always be added as unstable with a tracking issue, not stable.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
rust-lang__stdarch__1770 | rust-lang/stdarch | 1,770 | defect | 67802775f5e0312157e847f902659dd962abc8c6 | 3c93a6acd8b3b8ab0ac72c0a28904819c41abcce | RISC-V: `riscv_hwprobe`-based feature detection on Linux / Android | This PR implements full `riscv_hwprobe`-based feature detection on newer Linux kernel and implements OS-independent extension implication logic to make extension handling easier.
This PR is a superset of #1769.
This PR is based on #1762 by @taiki-e. Commits with @taiki-e's code (with or without modification) are... | diff --git a/crates/std_detect/README.md b/crates/std_detect/README.md
index 5191b2f665..0053d777aa 100644
--- a/crates/std_detect/README.md
+++ b/crates/std_detect/README.md
@@ -56,11 +56,14 @@ crate from working on applications in which `std` is not available.
[`cupid`](https://crates.io/crates/cupid) crate.
* ... | 2 | 2 | 1 | [{"id": "G0", "claim": "The base-ISA detection should use `target_arch` instead of `target_pointer_width` (with the comment updated to say so), because `target_pointer_width` misdetects experimental ABIs such as RV64ILP32.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"... | null |
rust-lang__stdarch__1812 | rust-lang/stdarch | 1,812 | defect | e0e82cae718ad7c4f5f805b782f46ec41fe07d1e | f30cc4204bd69e9077f41425601c19fd7c7d5dd5 | Coding style modernization to deal with Clippy warnings | In the development of `stdarch`, we encounter many warnings (mainly from Clippy; currently 133 as counted by Rust Analyzer and 132 as counted by `cargo clippy`) and hid real warnings we need to take care of.
However, the author found that source of such changes are mainly from old Rust code (which does not know newe... | diff --git a/crates/intrinsic-test/src/arm/compile.rs b/crates/intrinsic-test/src/arm/compile.rs
index b76dcc79fa..8276cd87c1 100644
--- a/crates/intrinsic-test/src/arm/compile.rs
+++ b/crates/intrinsic-test/src/arm/compile.rs
@@ -2,7 +2,7 @@ use crate::common::compile_c::CompilationCommandBuilder;
use crate::common::... | 3 | 3 | 0 | [{"id": "G0", "claim": "The range-contains rewrite of the EVAL_INF assert in examples/connect5.rs is less clear than the previous code and that specific line should be reverted.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The redundant double... | null |
rust-lang__stdarch__1845 | rust-lang/stdarch | 1,845 | defect | fdb4b91ddbce934cce5178df70175630794beb4b | c4521cf5d4033fc89ea78bc037d586fbf67cd50d | get rid of some clippy warnings | I'm trying to remove clippy warnings from rustc, which is how I found myself here.
<del>This does get rid of all clippy warnings, but some of the generated code expanded, which seems bad. Please let me know if there is a better way of doing this.</del> | diff --git a/crates/core_arch/src/aarch64/neon/generated.rs b/crates/core_arch/src/aarch64/neon/generated.rs
index 96ed82021b..3c013a2212 100644
--- a/crates/core_arch/src/aarch64/neon/generated.rs
+++ b/crates/core_arch/src/aarch64/neon/generated.rs
@@ -7925,7 +7925,7 @@ pub fn vcvth_f16_u64(a: u64) -> f16 {
#[unstab... | 1 | 1 | 1 | [{"id": "G0", "claim": "Removing the intermediate `Let`/transmute variables in the vqtbx1 spec compose block (and the similar vqtbl1 change below) triggers the generator to add all the shuffles, so the reviewer asks to remove these changes so the rest of the PR can be merged without issue.", "category": "correctness", ... | null |
rust-lang__stdarch__1861 | rust-lang/stdarch | 1,861 | defect | 8531b8c388ad06383a91f6d0114177ac6e6de59a | d2a815eebffe23e5800ea0e07c5627b4c3a2ef62 | `intrinsic-test`: streamline c compilation | Preparation for combining the C files. That is the biggest speedup, so I want to do that first to make later refactorings less painful. | diff --git a/Cargo.lock b/Cargo.lock
index 80f424dfdd..13cc938ef5 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -73,20 +73,20 @@ version = "0.1.0"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.102",
+ "syn 2.0.104",
]
[[package]]
name = "autocfg"
-version = "1.4.0"
+version = "1.5.0"
source = "registry+h... | 3 | 1 | 0 | [{"id": "G0", "claim": "gcc can still be used to link C++ object files, so the Dockerfile's switch of the linker from gcc to g++ may be unnecessary.", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The custom linker machinery (the separate aarch64_be g++ lin... | null |
rust-lang__stdarch__1938 | rust-lang/stdarch | 1,938 | defect | 5adf0516d06244edbb7d4d7696be3be06364eec9 | c9858374ad3c32420a63f13795b376be35e09fcf | Implement fjcvtzs under the name __jcvt like the C intrinsic | This instruction is only available when the `jsconv` target_feature is available, so on ARMv8.3 or higher.
It is used e.g. by [Ruffle](https://github.com/ruffle-rs/ruffle/pull/21780) to speed up its conversion from `f64` to `i32`, or by any JS engine probably.
I got redirected to this repository from https://gith... | diff --git a/crates/core_arch/src/aarch64/neon/generated.rs b/crates/core_arch/src/aarch64/neon/generated.rs
index f53f618cd7..4dc5e9522c 100644
--- a/crates/core_arch/src/aarch64/neon/generated.rs
+++ b/crates/core_arch/src/aarch64/neon/generated.rs
@@ -46,6 +46,22 @@ pub fn __crc32d(crc: u32, data: u64) -> u32 {
... | 2 | 2 | 2 | [{"id": "G0", "claim": "The new __jcvt intrinsic should not ship as stable: it must be marked unstable under a new feature name (with a tracking issue opened), since stabilization requires T-libs-api approval after time on nightly.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}... | null |
rust-lang__stdarch__1967 | rust-lang/stdarch | 1,967 | defect | 50134e10cbd2f81a068259d7796aff2471aae7c1 | 10a4851a503f4f06a63302a6c7d62403acdaca2a | Updates CI pipeline to run tests under in debug as well as release | - This patch begins modifies the CI pipeline to run all the tests under both release and dev profiles, as currently they are just being ran in release twice.
This is part 2/2 of this [PR](https://github.com/rust-lang/stdarch/pull/1949) | diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 28c15cf473..92083443e4 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -220,7 +220,7 @@ jobs:
if: matrix.build_std != ''
# Configure some env vars based on matrix configuration
- - run: echo "PROFILE=... | 6 | 2 | 1 | [{"id": "G0", "claim": "Adding _mm256_fnmsub_ph and _mm256_fnmadd_ph to missing_x86.txt under '# Fail in dev mode' is surprising given their implementation, and as written the entries also cause the functions to be ignored in release mode, so a different test input should be chosen instead.", "category": "testing", "ve... | null |
rust-lang__stdarch__2040 | rust-lang/stdarch | 2,040 | defect | 16ab994aa16a66d9f3ebcfed59c4acf303f1f4b2 | 5c271992588aedb0f7b449a1252441be34c74826 | Add missing runtime test for _mm_comige_ss and fix _mm_comigt_ss test | Add missing test for "_mm_comige_ss" and fix "_mm_comigt_ss"
While looking at issue rust-lang/stdarch#798, I noticed two things in the SSE test suite:
1. "test_mm_comigt_ss" was calling "_mm_comige_ss" instead of "_mm_comigt_ss",
and had an incorrect expected value — "3.0 > 3.0" was expected to return 1,
... | diff --git a/crates/core_arch/src/x86/sse.rs b/crates/core_arch/src/x86/sse.rs
index 2c4439a3f3..3f7781cc7d 100644
--- a/crates/core_arch/src/x86/sse.rs
+++ b/crates/core_arch/src/x86/sse.rs
@@ -2816,14 +2816,32 @@ mod tests {
let aa = &[3.0f32, 12.0, 23.0, NAN];
let bb = &[3.0f32, 47.5, 1.5, NAN];
... | 1 | 1 | 0 | [{"id": "G0", "claim": "Remove the `_mm_comige_ss` entry from the skip list in crates/stdarch-verify/tests/x86-intel.rs, since it bypasses the normal checks for the existence of tests.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}] | null |
rust-lang__stdarch__2041 | rust-lang/stdarch | 2,041 | defect | 16ab994aa16a66d9f3ebcfed59c4acf303f1f4b2 | 5ba887d2ee96674e77a2c5333c3e7bca81b49811 | Add missing runtime tests for SSE alias intrinsics | Add missing runtime tests for SSE alias intrinsics
While working through issue rust-lang/stdarch#798, I noticed several alias intrinsics had no
runtime tests even though their underlying functions were already tested.
This PR adds tests for:
- "test_mm_cvt_ss2si" (alias for "mm_cvtss_si32")
- "test_mm_cvtt_ss... | diff --git a/crates/core_arch/src/x86/sse.rs b/crates/core_arch/src/x86/sse.rs
index 2c4439a3f3..aaf2378fef 100644
--- a/crates/core_arch/src/x86/sse.rs
+++ b/crates/core_arch/src/x86/sse.rs
@@ -2995,6 +2995,22 @@ mod tests {
}
}
+ #[simd_test(enable = "sse")]
+ fn test_mm_cvt_ss2si() {
+ l... | 10 | 10 | 2 | [{"id": "G0", "claim": "The now-tested aliases should also be removed from the skip list in crates/stdarch-verify/tests/x86-intel.rs (around lines 250-253).", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Fully repeating the test bodies for each alias is... | null |
rust-lang__stdarch__2050 | rust-lang/stdarch | 2,050 | defect | 11d18f53cbf40e7f8f707723467397365863f99d | 6ff8b9b94ee7c6935fb8598a61d8a6d81b094bda | add ACLE random number generation intrinsics | tracking issue: https://github.com/rust-lang/rust/issues/153514 | diff --git a/crates/core_arch/src/aarch64/mod.rs b/crates/core_arch/src/aarch64/mod.rs
index b48bdac57e..d7295659c3 100644
--- a/crates/core_arch/src/aarch64/mod.rs
+++ b/crates/core_arch/src/aarch64/mod.rs
@@ -17,6 +17,10 @@ mod mte;
#[unstable(feature = "stdarch_aarch64_mte", issue = "129010")]
pub use self::mte::*... | 2 | 2 | 0 | [{"id": "G0", "claim": "The `cfg_attr(any(target_arch = ..., link_name = ...))` wrappers are unnecessary in the aarch64 module and should be removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The rand intrinsics should carry `assert_instr` ... | null |
rust-lang__stdarch__2087 | rust-lang/stdarch | 2,087 | defect | 0d9e26a1d1db09b3f5865bdbf3d47dceb11bf95e | 9b2717a367cd02813aba10cb911ab2d2ec9608e1 | Fix lane-swapping on pairwise big endian Neon intrinsic | This PR also includes some minor improvements to intrinsic-test | diff --git a/crates/core_arch/src/arm_shared/neon/generated.rs b/crates/core_arch/src/arm_shared/neon/generated.rs
index cf4d10162e..106c814749 100644
--- a/crates/core_arch/src/arm_shared/neon/generated.rs
+++ b/crates/core_arch/src/arm_shared/neon/generated.rs
@@ -33834,7 +33834,6 @@ pub fn vpadd_s32(a: int32x2_t, b:... | 2 | 1 | 0 | [{"id": "G0", "claim": "The reviewer asks whether it is right that the PR now removes the \"const \" prefix in both to_c_type and c_type, i.e. whether constant arguments still get const handling in the generated C output.", "category": "correctness", "verdict": "opposed", "priority": "P1", "scope": "introduced"}, {"id"... | null |
rust-lang__stdarch__689 | rust-lang/stdarch | 689 | defect | f88599dfa587908f73d9744a36fc32b643554bd5 | c2800251a4b226baba7e2e8de79480e0104aba94 | A few more cosmetic improvements | Sorry, just a few more I forgot to include! Not big at all.
r? @gnzlbg | diff --git a/crates/core_arch/src/x86/bmi1.rs b/crates/core_arch/src/x86/bmi1.rs
index 47a62d1f64..1e37496a44 100644
--- a/crates/core_arch/src/x86/bmi1.rs
+++ b/crates/core_arch/src/x86/bmi1.rs
@@ -87,7 +87,7 @@ pub unsafe fn _blsr_u32(x: u32) -> u32 {
/// Counts the number of trailing least significant zero bits.
... | 1 | 1 | 0 | [{"id": "G0", "claim": "The TODO comment in test_blsr_u64 should write the zero input as code-formatted `0`.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
rust-lang__stdarch__696 | rust-lang/stdarch | 696 | defect | 32af6780080ade6525bf52c53d0bb7e172f70e7a | b31d11b379b717d4d9dfb963ca44396b731da324 | ACLE/SIMD32: add `ssub8` and `usub8` |
- add `ssub8` and `usub8`
- bump instruction limit to 29
cc @japaric | diff --git a/crates/core_arch/src/acle/simd32.rs b/crates/core_arch/src/acle/simd32.rs
index 59a1f0a47d..e5d00e1451 100644
--- a/crates/core_arch/src/acle/simd32.rs
+++ b/crates/core_arch/src/acle/simd32.rs
@@ -16,13 +16,13 @@
//! - [x] __sadd8
//! - [x] __shadd8
//! - [x] __shsub8
-//! - [ ] __ssub8
+//! - [x] __ss... | 1 | 1 | 0 | [{"id": "G0", "claim": "The documentation of __usub8 omits that the instruction also sets the GE bits of the APSR.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
rust-lang__stdarch__703 | rust-lang/stdarch | 703 | defect | f649570cb8d6b2ee56607418b07a00a8c7200f6e | 817058e30fa75c792bc4459d448efbacae78e05c | Add bittest instructions for x86 | Closes #553
---
* ~I don't think the `assert_instr` lines are doing anything so not sure if I'm using them wrong or they just aren't applicable here.~ Ah. It does run on CI.
* I know the API differs slightly than what's prescribed in https://github.com/rust-lang-nursery/stdsimd/issues/553#issuecomment-41570... | diff --git a/crates/core_arch/src/x86/bt.rs b/crates/core_arch/src/x86/bt.rs
new file mode 100644
index 0000000000..6c9917d43f
--- /dev/null
+++ b/crates/core_arch/src/x86/bt.rs
@@ -0,0 +1,105 @@
+#[cfg(test)]
+use stdsimd_test::assert_instr;
+
+/// Return the bit at index `b` of 32-bit integer `a`.
+#[inline]
+#[cfg_a... | 9 | 8 | 6 | [{"id": "G0", "claim": "The unstable feature gate should be named `simd_x86_bittest` rather than `bittest`, which will need support upstream.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The reference parameters are the wrong API shape: the API validat... | null |
rust-lang__stdarch__726 | rust-lang/stdarch | 726 | defect | 29d1f2e3a3c5d8edb7759207c35f24867fd5ee89 | 95b4f727371744def32914a65a502659e8f8b8d1 | add rtm cpu feature intrinsics | Blocked by https://github.com/rust-lang/rust/pull/60060
This does not include any HLE functions (xacquire/xrelease prefixed operations).
Let me know what needs changing. | diff --git a/crates/core_arch/src/lib.rs b/crates/core_arch/src/lib.rs
index fb621808b6..fcab304d40 100644
--- a/crates/core_arch/src/lib.rs
+++ b/crates/core_arch/src/lib.rs
@@ -32,6 +32,7 @@
wasm_target_feature,
abi_unadjusted,
adx_target_feature,
+ rtm_target_feature,
external_doc
)]
#![cfg_... | 4 | 3 | 1 | [{"id": "G0", "claim": "Make the newly added `_xabort_code` helper a `const fn`.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new tests should use `#[simd_test]`, which does run-time feature detection, instead of plain `#[test]`, so they only execu... | null |
rust-lang__stdarch__790 | rust-lang/stdarch | 790 | defect | 65c9fa511acb1841bac37f92ad9b586ca45f1df7 | cb05d6fba4b50a04f433f808a4eac36b29ea761b | Use more simd_* intrinsics | I currently only did this for x86. Also I skipped `_mm_sqrt_ps` and some more, as llvm emitted `rsqrtps` combined with a lot of extra instructions instead of `sqrtps`, causing slight rounding errors and non optimal codegen.
cc #788 | diff --git a/crates/core_arch/src/simd_llvm.rs b/crates/core_arch/src/simd_llvm.rs
index 717ba5991a..c01a77d1d7 100644
--- a/crates/core_arch/src/simd_llvm.rs
+++ b/crates/core_arch/src/simd_llvm.rs
@@ -55,5 +55,7 @@ extern "platform-intrinsic" {
pub fn simd_fmax<T>(a: T, b: T) -> T;
pub fn simd_fsqrt<T>(a:... | 4 | 1 | 0 | [{"id": "G0", "claim": "It needs to be confirmed that `simd_fma` is guaranteed to be an FMA with the same semantics as the vfmadd llvm intrinsics, rather than something that only 'might use' FMA.", "category": "correctness", "verdict": "opposed", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The llvm... | null |
rust-lang__stdarch__855 | rust-lang/stdarch | 855 | defect | ec6fccd34c30003a7ebf4e7a9dfe4e31f5b76e1b | a22087c72fda5bf404233f541d8ec08f4890b48e | Implementation for Aarch64 TME intrinsics | This enables Aarch64 TME intrinsics and documents them. We need to enable `tme` feature at `rust-lang/rust` before merging this. | diff --git a/crates/core_arch/src/aarch64/mod.rs b/crates/core_arch/src/aarch64/mod.rs
index 190383df21..700fa87e46 100644
--- a/crates/core_arch/src/aarch64/mod.rs
+++ b/crates/core_arch/src/aarch64/mod.rs
@@ -15,6 +15,9 @@ pub use self::neon::*;
mod crypto;
pub use self::crypto::*;
+mod tme;
+pub use self::tme::*... | 9 | 8 | 3 | [{"id": "G0", "claim": "Some items in tme.rs lack doc comments (e.g. the constants shown with empty `///` comments), and they should be documented.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The `_tcancel_code` helper is not in any ARM documen... | null |
rust-lang__stdarch__870 | rust-lang/stdarch | 870 | defect | b17efd88af158b14b32ff394efb57c1b90179bf5 | 8ed548d79ea98005a00607f753b1f431b0bbde71 | Add _mm_loadu_si64 | Fix #40 | diff --git a/crates/core_arch/src/x86/sse.rs b/crates/core_arch/src/x86/sse.rs
index 1b2b8349b1..fd3f171cf9 100644
--- a/crates/core_arch/src/x86/sse.rs
+++ b/crates/core_arch/src/x86/sse.rs
@@ -1251,6 +1251,25 @@ pub unsafe fn _mm_loadr_ps(p: *const f32) -> __m128 {
simd_shuffle4(a, a, [3, 2, 1, 0])
}
+/// Loa... | 9 | 6 | 4 | [{"id": "G0", "claim": "The implementation of _mm_loadu_si64 could be simplified to reading the value with ptr::read_unaligned and building the vector with _mm_set_epi64x.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The parameter of _mm_loadu... | null |
rust-lang__stdarch__881 | rust-lang/stdarch | 881 | defect | 2e9093f12991b4c8876e85263918d703de92606f | abeb0ef8944c4f464ca8af263dec70abb3630d9c | add more things that do adds | I'm doing this on an arm32 device so I've already run all those tests and squared that away, but for arm64 we'll have to rely on the CI.
* The last two "add"
* "add across vector" (aka horizontal add)
* "add pairwise"
| diff --git a/crates/core_arch/src/aarch64/neon/mod.rs b/crates/core_arch/src/aarch64/neon/mod.rs
index 66da36463a..510ce1edb1 100644
--- a/crates/core_arch/src/aarch64/neon/mod.rs
+++ b/crates/core_arch/src/aarch64/neon/mod.rs
@@ -82,8 +82,44 @@ extern "C" {
#[link_name = "llvm.aarch64.neon.pmull64"]
fn vmull... | 5 | 4 | 3 | [{"id": "G0", "claim": "The vpaddq wrappers could use `simd_add` instead of calling the LLVM externs.", "category": "design", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The `.i32` result-type component of the `llvm.aarch64.neon.*addv` link names is wrong and should be the i... | null |
rust-lang__stdarch__918 | rust-lang/stdarch | 918 | defect | 6408c20cb53903323a1039804da4e4c537350600 | aa6c0f4b4148633a3a1106ecd4ac034fb7fb179c | Implement prefetch hints for aarch64 | Co-authored-by: Wang Maozhang <wangmaozhang@huawei.com>
This implements prefetch hints for aarch64 via LLVMs `prefetch` instrinsic.
We wintness ~20% performance gain in seal_pre_commit_phase1 of Filecoin with 32GB data input.
Verified with `cargo +nightly test` and `cargo +nightly test --release`.
There are f... | diff --git a/crates/core_arch/src/aarch64/mod.rs b/crates/core_arch/src/aarch64/mod.rs
index 700fa87e46..ec2c6924b9 100644
--- a/crates/core_arch/src/aarch64/mod.rs
+++ b/crates/core_arch/src/aarch64/mod.rs
@@ -21,6 +21,9 @@ pub use self::tme::*;
mod crc;
pub use self::crc::*;
+mod prefetch;
+pub use self::prefetch... | 3 | 3 | 2 | [{"id": "G0", "claim": "The CI check fails with E0723 (`transmute` in a `const fn`) in wasm32/simd128.rs code this PR does not touch, apparently due to an issue on the latest Rust nightly, and can be fixed by adding the `const_fn_transmute` feature to the list in crates/core_arch/src/lib.rs.", "category": "correctness"... | null |
rust-lang__stdarch__936 | rust-lang/stdarch | 936 | defect | 9142a8a22d9ab4470167187e81aec503c2d70f60 | c8d6d57cfa7008a91409607c1dcb722ef08348cf | Add shift-and-insert Arm intrinsics. | This PR adds Arm and Aarch64 Neon intrinsics for [shift-left-and-insert](https://developer.arm.com/architectures/instruction-sets/simd-isas/neon/intrinsics?search=vsli) and [shift-right-and-insert](https://developer.arm.com/architectures/instruction-sets/simd-isas/neon/intrinsics?search=vsri).
The LLVM codegen for t... | diff --git a/crates/core_arch/src/aarch64/neon/mod.rs b/crates/core_arch/src/aarch64/neon/mod.rs
index 438b1ac771..90c4a6b71d 100644
--- a/crates/core_arch/src/aarch64/neon/mod.rs
+++ b/crates/core_arch/src/aarch64/neon/mod.rs
@@ -9,6 +9,7 @@ pub use self::generated::*;
use crate::{
core_arch::{arm::*, simd_llv... | 2 | 1 | 1 | [{"id": "G0", "claim": "The intrinsics had to be added to the skip list of verify_all_signatures for the tests to pass, which the author suspects is because the shift-and-insert tests are generated in their own file rather than being detected.", "category": "testing", "verdict": "uncertain", "priority": "P2", "scope": ... | null |
rust-minidump__rust-minidump__1140 | rust-minidump/rust-minidump | 1,140 | defect | df483d5774cae0fa1bb847eaa3dd8f4a15c7e9d9 | c9d99d20d3e42cde1c4fb968d722d55004173272 | Add process uptime to json output | Due to automatical dumps parse its quite useful to have the field output in the --json as well, just like in the --human version. | diff --git a/minidump-processor/src/process_state.rs b/minidump-processor/src/process_state.rs
index 23ea304d..06b39101 100644
--- a/minidump-processor/src/process_state.rs
+++ b/minidump-processor/src/process_state.rs
@@ -1055,6 +1055,9 @@ Unknown streams encountered:
})
}).collect::<Vec<... | 3 | 3 | 3 | [{"id": "G0", "claim": "Update minidump-processor/json-schema.md to include a description of the new process_uptime field.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The insta snapshot tests are now failing because the test result data does no... | null |
rust-minidump__rust-minidump__124 | rust-minidump/rust-minidump | 124 | defect | 05818263fd72bf8035805be9e715596d0504fa67 | 0d03538d6c85b1cd53ea08d78d6f9c24df1e81f9 | Fix Rust Edition 2018 idioms | This is a follow-up to #109, applying `cargo fix --edition-idioms` and removing all `extern crate` declarations.
cc @flub | diff --git a/README.md b/README.md
index e4b953ec2..85f8dfe7b 100644
--- a/README.md
+++ b/README.md
@@ -11,8 +11,6 @@ It's fairly heavily modeled after the [Google Breakpad](https://chromium.googles
Print the raw details of the exception stream from a minidump:
```rust
-extern crate minidump;
-
use minidump::{Err... | 2 | 1 | 0 | [{"id": "G0", "claim": "The find-and-replace that removed the `extern crate` lines left stray blank lines behind (e.g. in examples/dumpmodules.rs), and the reviewer asks that those blank lines be removed before merging.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {... | null |
rust-minidump__rust-minidump__137 | rust-minidump/rust-minidump | 137 | defect | 944368e961b07d1b7f186d2e51b87f54944df265 | b0cb31b1b7d047ab883807bab21d1478707063d1 | Parse the MISC_INFO_5 format in minidumps | Fixes #16
This is a bit messy because I misunderstood the scope of #16 and started working towards actually walking through the XSAVE entries that MISC_INFO_5 describes before realizing that wasn't actually desired at the moment. So this has some extra "useless" definitions that cover what the meaning of the enabled... | diff --git a/minidump-common/src/format.rs b/minidump-common/src/format.rs
index 0b523e759..0542dd1ca 100644
--- a/minidump-common/src/format.rs
+++ b/minidump-common/src/format.rs
@@ -1389,33 +1389,74 @@ multi_structs! {
pub build_string: [u16; 260], // MAX_PATH
pub dbg_bld_str: [u16; 40],
}
+
+... | 5 | 3 | 1 | [{"id": "G0", "claim": "The naming scheme in format.rs is all over the place, and it is unclear where SCREAMING_CASE versus RustCase should be used because MISC_INFO_3+ do not come from the official headers.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", ... | null |
rust-minidump__rust-minidump__176 | rust-minidump/rust-minidump | 176 | defect | bd19df3fc6dc927aca1197fab33736f41ba12ed2 | 933c21d5ef00a3bed6a582487435fbbe8f3fe870 | Implement cpu_info/os_ver | Fixes #19
I'm a bit fuzzy on what parts should be in minidump vs minidump_processor -- I kinda settled on "the parts that use scroll or resolve rva's should go in minidump" | diff --git a/minidump-processor/src/processor.rs b/minidump-processor/src/processor.rs
index b568af65a..a812b624f 100644
--- a/minidump-processor/src/processor.rs
+++ b/minidump-processor/src/processor.rs
@@ -8,6 +8,7 @@ use std::boxed::Box;
use std::ops::Deref;
use breakpad_symbols::{FrameSymbolizer, FrameWalker, ... | 4 | 3 | 1 | [{"id": "G0", "claim": "The x86 CPU vendor ID should be built by iterating over the u32s and mapping char::from over their little-endian bytes, instead of the twelve hand-written shift/mask lines.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "T... | null |
rust-minidump__rust-minidump__432 | rust-minidump/rust-minidump | 432 | defect | 7731bad013a9e3ebdd94859eab38756df5c2b624 | f62d4c0edad1d90d28a08152ac8a60f57ab329f4 | Switch to debugid crate instead of strings | The Debug ID and Code ID were represented by strings in the breakpad
format. This switches this to the DebugId and CodeId types from the
debugid crate as also used by symbolic.
The benefit is strong types and that DebugId becomes Copy.
As a result of this some tests which used invalid Debug IDs had to be chang... | diff --git a/Cargo.lock b/Cargo.lock
index 67becdcb2..c3a8561ab 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -64,6 +64,7 @@ name = "breakpad-symbols"
version = "0.9.6"
dependencies = [
"circular",
+ "debugid",
"log",
"minidump-common",
"nom",
@@ -176,6 +177,15 @@ dependencies = [
"cfg-if",
]
+[[package]]
... | 3 | 2 | 0 | [{"id": "G0", "claim": "The Pdb20 branch of debug_identifier() has no test coverage, may be the wrong conversion, and the previous string it replaces was not a valid breakpad debugid because it was too short.", "category": "correctness", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id": "G1", "cl... | null |
rust-minidump__rust-minidump__471 | rust-minidump/rust-minidump | 471 | defect | d77b26b2e0d10e8f8fe5f8b944c0f142cde3a705 | ec0c271358716f9d40df25e3744cc34a9cbf29fa | Return a nil code ID when a module doesn't have a recognizable CodeView signature | Sentry's currently in the process of testing out rust-minidump by comparing its results to breakpad's on various minidumps out in the wind. [It looks like modules in minidumps generated on Linux may omit CV records entirely if a build ID could not be found for them.](https://chromium.googlesource.com/breakpad/breakpad/... | diff --git a/minidump/src/minidump.rs b/minidump/src/minidump.rs
index 564f49733..cf8b8bc03 100644
--- a/minidump/src/minidump.rs
+++ b/minidump/src/minidump.rs
@@ -912,26 +912,31 @@ impl Module for MinidumpModule {
fn code_identifier(&self) -> CodeId {
match self.codeview_info {
- Some(CodeV... | 3 | 2 | 1 | [{"id": "G0", "claim": "Double-check that the removal of the 'TODO: Breakpad stubs this out on non-Windows' fallback is safe and correctly addressed, since the PR now has well-defined behaviours for all three known CodeView signatures as well as unknown ones.", "category": "correctness", "verdict": "uncertain", "priori... | null |
rust-minidump__rust-minidump__779 | rust-minidump/rust-minidump | 779 | defect | 5cd13887148c9917d4e740074b8b04f0ecdfc6ec | c1e5f66c23f994a48838aa557f6f162cf68c341d | Test for bit flips on faulting addresses if they don't map to valid memory. | This is a fairly naive test. Generally speaking, it could end up being fairly easy to get a "hit" on valid memory by trying increasingly far offsets (by flipping each bit). This could be improved to account for memory region read/write/execute permissions in combination with the exception type (e.g. if the exception wa... | diff --git a/minidump-processor/src/process_state.rs b/minidump-processor/src/process_state.rs
index 165a37d8f..a1ed73c0b 100644
--- a/minidump-processor/src/process_state.rs
+++ b/minidump-processor/src/process_state.rs
@@ -288,6 +288,10 @@ pub struct ExceptionInfo {
pub instruction_str: Option<String>,
/// ... | 5 | 5 | 4 | [{"id": "G0", "claim": "The bit-flip check could easily report a hit on valid memory, so it should account for memory region read/write/execute permissions in combination with the exception type (e.g. if the exception was a memory write error, only consider memory regions which were writable as valid intended addresses... | null |
rust-minidump__rust-minidump__812 | rust-minidump/rust-minidump | 812 | defect | 624ad66275c487729127b094328fb21b2b2f9fed | 9fe578697a1f2772bcd6af4803f2af9bfe4ae973 | Use the procfs crate in minidump for parsing linux memory maps. | There are a handful of tests (and thus functionality) regarding malformed input that we'd have to give up to merge this. This gives up support for parsing files with messed up whitespace and memory map lines that only have partial information (e.g. only the mapped addresses).
I don't think these two cases are import... | diff --git a/Cargo.lock b/Cargo.lock
index 7a3c10f3..20892558 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -389,6 +389,16 @@ dependencies = [
"typenum",
]
+[[package]]
+name = "ctor"
+version = "0.1.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6d2301688392eb071b0bf1a37be05c469d... | 2 | 2 | 1 | [{"id": "G0", "claim": "The `procfs` crate the PR depends on currently does not support macOS/Windows, so that dependency will need to be changed (CI flagged it).", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "It might be better to move the memory-m... | null |
rust-minidump__rust-minidump__934 | rust-minidump/rust-minidump | 934 | defect | 362a4a0f0334a6abedaa8d4a039bbdce75025094 | 7b32b09cf9e9837b6eb1ec15cdbfcb4312c9f6d2 | Avoid requiring a dependency on memmap2 to use Minidump<'_, Mmap> | The main problem is that the dependency on memmap2 then needs to be the exact same as the one the minidump crate has, which doesn't necessarily line up.
Another option would be to reexport Mmap. | diff --git a/Cargo.lock b/Cargo.lock
index f3e440c9..657bd5d6 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1293,7 +1293,6 @@ dependencies = [
"debugid",
"doc-comment",
"futures-util",
- "memmap2 0.9.3",
"minidump",
"minidump-common",
"minidump-synth",
diff --git a/minidump-processor/Cargo.toml b/minidump-pr... | 1 | 1 | 0 | [{"id": "G0", "claim": "Put a doc comment on the new MmapMinidump type alias or on Minidump::read_path (or both) that tells users how to use it.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
rust-ml__linfa__137 | rust-ml/linfa | 137 | defect | 3a40b35c6d6f38530fbb302f1030e0a2f506d8f4 | 424745a7a32bea31792a7dfef6fc4949485accab | Parametrize KMeans by distance metric | Instead of calling `sq_l2_dist`, have KMeans use the distance function it was instantiated with when computing distances for the cluster assignment step. Also removed `KMeansHyperParamBuilder`. | diff --git a/algorithms/linfa-clustering/benches/k_means.rs b/algorithms/linfa-clustering/benches/k_means.rs
index 1d5b21054..64deca91f 100644
--- a/algorithms/linfa-clustering/benches/k_means.rs
+++ b/algorithms/linfa-clustering/benches/k_means.rs
@@ -2,7 +2,7 @@ use criterion::{
black_box, criterion_group, crite... | 3 | 1 | 0 | [{"id": "G0", "claim": "The reviewer asks why the `calc_inertia` test helper is written as a macro_rules! macro rather than a plain function.", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Validating hyperparameters by panicking (e.g. `panic!(\"`n_clusters... | null |
rust-mobile__android_logger-rs__62 | rust-mobile/android_logger-rs | 62 | defect | e8197a6cbe3186b0504fb6e7ddefe8291ef83ecc | ac56a5a047dfcfe9efc2ba9aaca296dfca61b22d | Fix bug only values equal to the set level are logged | The document says that if `Warn` is set, `Error` will also be logged, but not `Info`. But in fact, if `Warn` is set, only `Warn` is logged, not `Error`.
I think this is a bug caused by the comparison operator. | diff --git a/src/lib.rs b/src/lib.rs
index d443c91..1d875fb 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -137,7 +137,7 @@ impl Log for AndroidLogger {
fn enabled(&self, metadata: &Metadata) -> bool {
let config = self.config();
// todo: consider __android_log_is_loggable.
- Some(metadata.le... | 1 | 1 | 0 | [{"id": "G0", "claim": "The fix should be reworked to use log::LevelFilter in the config instead of comparing log::Level values.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "pre_existing"}] | null |
rust-ndarray__ndarray-linalg__104 | rust-ndarray/ndarray-linalg | 104 | defect | b9ed2c99645d9df588cb435efc4c9e4be341e557 | 110d0f79338f0af1f4f8b72e9e3d39607b405511 | Add methods to get natural log of determinant directly | When working with very small or very large determinants, it's more robust to deal with their natural logs than the determinants themselves. These methods are analogous to NumPy's [`numpy.linalg.slogdet()`](https://docs.scipy.org/doc/numpy/reference/generated/numpy.linalg.slogdet.html) function. | diff --git a/src/cholesky.rs b/src/cholesky.rs
index 9fdb743d..8bf3a1f6 100644
--- a/src/cholesky.rs
+++ b/src/cholesky.rs
@@ -102,12 +102,15 @@ where
type Output = <A as AssociatedReal>::Real;
fn detc(&self) -> Self::Output {
+ self.ln_detc().exp()
+ }
+
+ fn ln_detc(&self) -> Self::Output {
... | 3 | 2 | 0 | [{"id": "G0", "claim": "Add a comment documenting that `natural_log` returns negative infinity when the determinant is zero.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The `sign_ln_det` method name should be shortened by omitting the `sign_` p... | null |
rust-ndarray__ndarray-linalg__186 | rust-ndarray/ndarray-linalg | 186 | defect | cdc6db1fb5442c6e286c57e226933b1285211d92 | 9bd140914ee9e3e87e5b19ea0eba7181609ca24d | Add EigenValue/Vector for general matrix. | I added `eig` for calculating eigenvalues/vectors of general matrices using `*geev` of lapack.
Please confirm the performance with `tests/eig.rs` and `examples/eig.rs`. | diff --git a/examples/eig.rs b/examples/eig.rs
new file mode 100644
index 00000000..f4195dfc
--- /dev/null
+++ b/examples/eig.rs
@@ -0,0 +1,12 @@
+use ndarray::*;
+use ndarray_linalg::*;
+
+fn main() {
+ let a = arr2(&[[2.0, 1.0, 2.0], [-2.0, 2.0, 1.0], [1.0, 2.0, -2.0]]);
+ let (e, vecs) = a.clone().eig().unwrap... | 4 | 4 | 0 | [{"id": "G0", "claim": "The module doc comment of src/eig.rs wrongly says \"Eigenvalue decomposition for Hermite matrices\" and should say the decomposition is for non-symmetric square matrices.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The e... | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.