Skip to content

Commit

Permalink
Bug 1849874 - Update from packed_simd_2 to packed_simd. r=supply-chai…
Browse files Browse the repository at this point in the history
…n-reviewers,glandium

Differential Revision: https://phabricator.services.mozilla.com/D186716
  • Loading branch information
hsivonen committed Aug 28, 2023
1 parent d5f701c commit 1e1bec8
Show file tree
Hide file tree
Showing 228 changed files with 514 additions and 172 deletions.
4 changes: 2 additions & 2 deletions .cargo/config.in
Expand Up @@ -55,9 +55,9 @@ git = "https://github.com/hsivonen/chardetng_c"
rev = "ed8a4c6f900a90d4dbc1d64b856e61490a1c3570"
replace-with = "vendored-sources"

[source."git+https://github.com/hsivonen/packed_simd?rev=412f9a0aa556611de021bde89dee8fefe6e0fbbd"]
[source."git+https://github.com/hsivonen/packed_simd?rev=e588ceb568878e1a3156ea9ce551d5b63ef0cdc4"]
git = "https://github.com/hsivonen/packed_simd"
rev = "412f9a0aa556611de021bde89dee8fefe6e0fbbd"
rev = "e588ceb568878e1a3156ea9ce551d5b63ef0cdc4"
replace-with = "vendored-sources"

[source."git+https://github.com/jfkthame/mapped_hyph.git?rev=c7651a0cffff41996ad13c44f689bd9cd2192c01"]
Expand Down
13 changes: 7 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -190,7 +190,7 @@ cose = { git = "https://github.com/franziskuskiefer/cose-rust", rev = "43c22248d
firefox-on-glean = { path = "toolkit/components/glean/api" }
icu_testdata = { path = "intl/icu_testdata" }
libudev-sys = { path = "dom/webauthn/libudev-sys" }
packed_simd = { package = "packed_simd_2", git = "https://github.com/hsivonen/packed_simd", rev = "412f9a0aa556611de021bde89dee8fefe6e0fbbd" }
packed_simd = { git = "https://github.com/hsivonen/packed_simd", rev = "e588ceb568878e1a3156ea9ce551d5b63ef0cdc4" }
midir = { git = "https://github.com/mozilla/midir.git", rev = "519e651241e867af3391db08f9ae6400bc023e18" }
# Avoid the dependency on chrono
minidump-writer = { git = "https://github.com/rust-minidump/minidump-writer.git", rev = "a15bd5cab6a3de251c0c23264be14b977c0af09c" }
Expand Down
2 changes: 1 addition & 1 deletion config/makefiles/rust.mk
Expand Up @@ -249,7 +249,7 @@ endif
ifndef RUSTC_BOOTSTRAP
RUSTC_BOOTSTRAP := mozglue_static,qcms
ifdef MOZ_RUST_SIMD
RUSTC_BOOTSTRAP := $(RUSTC_BOOTSTRAP),encoding_rs,packed_simd_2
RUSTC_BOOTSTRAP := $(RUSTC_BOOTSTRAP),encoding_rs,packed_simd
endif
export RUSTC_BOOTSTRAP
endif
Expand Down
20 changes: 20 additions & 0 deletions supply-chain/audits.toml
Expand Up @@ -161,6 +161,14 @@ start = "2019-03-04"
end = "2024-05-05"
notes = "Lina developed this crate as Mozilla staff."

[[wildcard-audits.encoding_rs]]
who = "Henri Sivonen <hsivonen@hsivonen.fi>"
criteria = "safe-to-deploy"
user-id = 4484 # Henri Sivonen (hsivonen)
start = "2019-02-26"
end = "2024-08-28"
notes = "I, Henri Sivonen, wrote encoding_rs for Gecko and have reviewed contributions by others. There are two caveats to the certification: 1) The crate does things that are documented to be UB but that do not appear to actually be UB due to integer types differing from the general rule; https://github.com/hsivonen/encoding_rs/issues/79 . 2) It would be prudent to re-review the code that reinterprets buffers of integers as SIMD vectors; see https://github.com/hsivonen/encoding_rs/issues/87 ."

[[wildcard-audits.etagere]]
who = "Nicolas Silva <nical@fastmail.com>"
criteria = "safe-to-deploy"
Expand Down Expand Up @@ -2432,6 +2440,18 @@ who = "Mike Hommey <mh+mozilla@glandium.org>"
criteria = "safe-to-deploy"
delta = "6.3.0 -> 6.4.1"

[[audits.packed_simd]]
who = "Henri Sivonen <hsivonen@hsivonen.fi>"
criteria = "safe-to-deploy"
delta = "0.3.8 -> 0.3.9"
notes = "The update from 0.3.8 to 0.3.9 makes mechanical changes to accommodate renaming, compiler updates, and CI service updates."

[[audits.packed_simd]]
who = "Henri Sivonen <hsivonen@hsivonen.fi>"
criteria = "safe-to-deploy"
delta = "0.3.9 -> 0.3.9@git:e588ceb568878e1a3156ea9ce551d5b63ef0cdc4"
notes = "The patch on top of crates.io version 0.3.9 merely deletes code for a feature that Firefox does not use."

[[audits.packed_simd_2]]
who = "Mike Hommey <mh+mozilla@glandium.org>"
criteria = "safe-to-deploy"
Expand Down
6 changes: 3 additions & 3 deletions supply-chain/config.toml
Expand Up @@ -155,7 +155,7 @@ audit-as-crates-io = false
audit-as-crates-io = true
notes = "wgpu-core pins this crate."

[policy.packed_simd_2]
[policy.packed_simd]
audit-as-crates-io = true
notes = "Based on upstream, see bug 1719674."

Expand Down Expand Up @@ -655,8 +655,8 @@ criteria = "safe-to-deploy"
version = "0.4.1"
criteria = "safe-to-deploy"

[[exemptions.packed_simd_2]]
version = "0.3.7"
[[exemptions.packed_simd]]
version = "0.3.8"
criteria = "safe-to-deploy"

[[exemptions.phf]]
Expand Down
7 changes: 7 additions & 0 deletions supply-chain/imports.lock
Expand Up @@ -176,6 +176,13 @@ user-id = 3618
user-login = "dtolnay"
user-name = "David Tolnay"

[[publisher.encoding_rs]]
version = "0.8.33"
when = "2023-08-23"
user-id = 4484
user-login = "hsivonen"
user-name = "Henri Sivonen"

[[publisher.etagere]]
version = "0.2.7"
when = "2022-05-04"
Expand Down
2 changes: 1 addition & 1 deletion third_party/rust/encoding_rs/.cargo-checksum.json

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions third_party/rust/encoding_rs/Cargo.toml
Expand Up @@ -12,7 +12,7 @@
[package]
edition = "2018"
name = "encoding_rs"
version = "0.8.32"
version = "0.8.33"
authors = ["Henri Sivonen <hsivonen@hsivonen.fi>"]
description = "A Gecko-oriented implementation of the Encoding Standard"
homepage = "https://docs.rs/encoding_rs/"
Expand Down Expand Up @@ -40,9 +40,8 @@ lto = true
version = "1.0"

[dependencies.packed_simd]
version = "0.3.4"
version = "0.3.9"
optional = true
package = "packed_simd_2"

[dependencies.serde]
version = "1.0"
Expand Down
8 changes: 6 additions & 2 deletions third_party/rust/encoding_rs/README.md
Expand Up @@ -167,7 +167,7 @@ There are currently these optional cargo features:

### `simd-accel`

Enables SIMD acceleration using the nightly-dependent `packed_simd_2` crate.
Enables SIMD acceleration using the nightly-dependent `packed_simd` crate.

This is an opt-in feature, because enabling this feature _opts out_ of Rust's
guarantees of future compilers compiling old code (aka. "stability story").
Expand All @@ -188,7 +188,7 @@ feature.
_Note!_ If you are compiling for a target that does not have 128-bit SIMD
enabled as part of the target definition and you are enabling 128-bit SIMD
using `-C target_feature`, you need to enable the `core_arch` Cargo feature
for `packed_simd_2` to compile a crates.io snapshot of `core_arch` instead of
for `packed_simd` to compile a crates.io snapshot of `core_arch` instead of
using the standard-library copy of `core::arch`, because the `core::arch`
module of the pre-compiled standard library has been compiled with the
assumption that the CPU doesn't have 128-bit SIMD. At present this applies
Expand Down Expand Up @@ -450,6 +450,10 @@ To regenerate the generated code:

## Release Notes

### 0.8.33

* Use `packed_simd` instead of `packed_simd_2` again now that updates are back under the `packed_simd` name. Only affects the `simd-accel` optional nightly feature.

### 0.8.32

* Removed `build.rs`. (This removal should resolve false positives reported by some antivirus products. This may break some build configurations that have opted out of Rust's guarantees against future build breakage.)
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions third_party/rust/packed_simd/.cargo-checksum.json

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions third_party/rust/packed_simd/.github/workflows/benchmarks.yml
@@ -0,0 +1,31 @@
name: benchmarks

on:
push:
branches:
- master
pull_request:
workflow_dispatch:

jobs:
x86_64-unknown-linux-gnu:
uses: ./.github/workflows/run-ci-script.yml
with:
target: x86_64-unknown-linux-gnu
setup_script: ci/setup_benchmarks.sh
script: ci/benchmark.sh
norun: 1
verify: 1
# FIXME: figure out how to add downloaded ispc to PATH
# features: ispc
x86_64-apple-darwin:
uses: ./.github/workflows/run-ci-script.yml
with:
target: x86_64-apple-darwin
runner: macos-latest
setup_script: ci/setup_benchmarks.sh
script: ci/benchmark.sh
norun: 1
verify: 1
# FIXME: figure out how to add downloaded ispc to PATH
# features: ispc

0 comments on commit 1e1bec8

Please sign in to comment.