Skip to content

Commit 559d071

Browse files
committed
fix: rust nightly programs
1 parent 72c3574 commit 559d071

File tree

16 files changed

+35
-26
lines changed

16 files changed

+35
-26
lines changed

bench/algorithm/mandelbrot/9.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#![feature(portable_simd)]
1111

12-
use std::simd::{f64x8, StdFloat};
12+
use std::simd::{f64x8, SimdFloat, StdFloat};
1313

1414
const MAX_ITER: usize = 50;
1515
const VLEN: usize = 8;

bench/algorithm/nbody/3.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#![feature(portable_simd)]
99

1010
use std::f64::consts::PI;
11-
use std::simd::f64x4;
11+
use std::simd::{f64x4, SimdFloat};
1212

1313
const SOLAR_MASS: f64 = 4.0 * PI * PI;
1414
const YEAR: f64 = 365.24;
@@ -20,7 +20,7 @@ macro_rules! planet {
2020
Planet {
2121
position: f64x4::from_array([$x, $y, $z, 0.0]),
2222
velocity: f64x4::from_array([$vx, $vy, $vz, 0.0]),
23-
mass_ratio: f64x4::splat($mass_ratio),
23+
mass_ratio: f64x4::from_array([$mass_ratio, $mass_ratio, $mass_ratio, $mass_ratio]),
2424
mass: $mass_ratio * SOLAR_MASS,
2525
mass_half: $mass_ratio * SOLAR_MASS * 0.5,
2626
}

bench/algorithm/spectral-norm/8-m.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414

1515
use rayon::prelude::*;
1616
use std::ops::*;
17-
use std::simd::Simd;
17+
use std::simd::{Simd, SimdFloat};
1818

1919
const LANES: usize = 4;
2020
type IntType = i32;
2121
const LANES_INT: IntType = LANES as IntType;
2222
type F64Vec = Simd<f64, LANES>;
2323
type IntVec = Simd<IntType, LANES>;
2424

25-
const ONE: IntVec = IntVec::splat(1);
26-
const TWO: IntVec = IntVec::splat(2);
27-
const LANES_VEC: IntVec = IntVec::splat(LANES_INT);
25+
const ONE: IntVec = IntVec::from_array([1, 1, 1, 1]);
26+
const TWO: IntVec = IntVec::from_array([2, 2, 2, 2]);
27+
const LANES_VEC: IntVec = IntVec::from_array([LANES_INT, LANES_INT, LANES_INT, LANES_INT]);
2828
const J_ARRAY: IntVec = IntVec::from_array([0, 1, 2, 3]);
2929

3030
fn main() {

bench/algorithm/spectral-norm/8.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
#![feature(portable_simd)]
1515

1616
use std::ops::*;
17-
use std::simd::Simd;
17+
use std::simd::{Simd, SimdFloat};
1818

1919
const LANES: usize = 4;
2020
type IntType = i32;
2121
const LANES_INT: IntType = LANES as IntType;
2222
type F64Vec = Simd<f64, LANES>;
2323
type IntVec = Simd<IntType, LANES>;
2424

25-
const ONE: IntVec = IntVec::splat(1);
26-
const TWO: IntVec = IntVec::splat(2);
27-
const LANES_VEC: IntVec = IntVec::splat(LANES_INT);
25+
const ONE: IntVec = IntVec::from_array([1, 1, 1, 1]);
26+
const TWO: IntVec = IntVec::from_array([2, 2, 2, 2]);
27+
const LANES_VEC: IntVec = IntVec::from_array([LANES_INT, LANES_INT, LANES_INT, LANES_INT]);
2828
const J_ARRAY: IntVec = IntVec::from_array([0, 1, 2, 3]);
2929

3030
fn main() {

bench/bench_rust.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ problems:
8585
- 0.rs
8686
- 1.rs
8787
source_rename_to: main.rs
88-
compiler_version_command: rustc +stable -V
88+
compiler_version_command: rustc -V
8989
compiler_version_regex:
9090
runtime_version_parameter:
9191
runtime_version_regex:
@@ -103,7 +103,7 @@ environments:
103103
CXX: clang++
104104
include: rust
105105
include_sub_dir: src
106-
build: cargo +stable build --release --target-dir /tmp/rs/target -v
106+
build: cargo build --release --target-dir /tmp/rs/target -v
107107
after_build:
108108
- sudo mv /tmp/rs/target/release/_app out
109109
out_dir: out

bench/bench_rust_nightly.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ problems:
1818
- 8.rs
1919
- 8-m.rs
2020
source_rename_to: main.rs
21-
compiler_version_command: rustc +nightly -V
21+
compiler_version_command: rustc -V
2222
compiler_version_regex:
2323
runtime_version_parameter:
2424
runtime_version_regex:
@@ -32,7 +32,7 @@ environments:
3232
CXX: clang++
3333
include: rust-nightly
3434
include_sub_dir: src
35-
build: cargo +nightly build --release --target-dir /tmp/rsn/target -v
35+
build: cargo build --release --target-dir /tmp/rsn/target -v
3636
after_build:
3737
- sudo mv /tmp/rsn/target/release/_app out
3838
out_dir: out

bench/bench_wasm.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ environments:
6363
include: rust
6464
include_sub_dir: src
6565
before_build:
66-
- rustup target add wasm32-wasi
6766
- cargo build --release --target wasm32-wasi --no-default-features --features wasm --target-dir /tmp/rustwasm/target
6867
build: wasmer create-exe --llvm --enable-all -o out/app /tmp/rustwasm/target/wasm32-wasi/release/_app.wasm
6968
out_dir: out
@@ -78,7 +77,6 @@ environments:
7877
include: rust
7978
include_sub_dir: src
8079
before_build:
81-
- rustup target add wasm32-wasi
8280
- cargo build --release --target wasm32-wasi --no-default-features --features wasm --target-dir /tmp/rustwasm/target
8381
build: mv /tmp/rustwasm/target/wasm32-wasi/release/_app.wasm out
8482
out_dir: out
@@ -92,7 +90,6 @@ environments:
9290
include: rust
9391
include_sub_dir: src
9492
before_build:
95-
- rustup target add wasm32-wasi
9693
- cargo build --release --target wasm32-wasi --no-default-features --features wasm --target-dir /tmp/rustwasm/target
9794
build: mv /tmp/rustwasm/target/wasm32-wasi/release/_app.wasm out && cp wrapper.js out
9895
out_dir: out
@@ -109,7 +106,6 @@ environments:
109106
include: rust
110107
include_sub_dir: src
111108
before_build:
112-
- rustup target add wasm32-wasi
113109
- cargo build --release --target wasm32-wasi --no-default-features --features wasm --target-dir /tmp/rustwasm/target
114110
- deno bundle --unstable wrapper.ts app.ts
115111
build: deno compile --no-check --unstable --allow-env --allow-read -o out/app app.ts

bench/bench_wasm_graal.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ environments:
5454
include: rust
5555
include_sub_dir: src
5656
before_build:
57-
- rustup target add wasm32-wasi
5857
- cargo build --release --target wasm32-wasi --no-default-features --features wasm --target-dir /tmp/rustwasm/target
5958
build: mv /tmp/rustwasm/target/wasm32-wasi/release/_app.wasm out
6059
out_dir: out

bench/bench_wasm_wasm_edge.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ problems:
3535
- name: edigits
3636
source:
3737
- 1.rs
38-
# - name: coro-prime-sieve
39-
# source:
40-
# - 3.rs
38+
- name: coro-prime-sieve
39+
source:
40+
- 3.rs
4141
- name: nsieve
4242
source:
4343
- 1.rs
@@ -63,7 +63,6 @@ environments:
6363
include: rust
6464
include_sub_dir: src
6565
before_build:
66-
- rustup target add wasm32-wasi
6766
- cargo build --release --target wasm32-wasi --no-default-features --features wasm --target-dir /tmp/rustwasm/target
6867
build: wasmedgec --enable-all --generic-binary /tmp/rustwasm/target/wasm32-wasi/release/_app.wasm out/app.so
6968
out_dir: out

bench/include/kotlin-native/gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
[libraries]
44
bignum = {module = "com.ionspin.kotlin:bignum", version = "0.3.7"}
5-
kbignum = {module = "com.soywiz.korlibs.kbignum:kbignum", version = "3.0.0"}
5+
kbignum = {module = "com.soywiz.korlibs.kbignum:kbignum", version = "3.0.1"}
66

77
[bundles]

bench/include/rust-nightly/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
!Cargo.toml
2+
!rust-toolchain.toml
23
!.cargo
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[toolchain]
2+
channel = "nightly"

bench/include/rust/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
!Cargo.toml
2+
!rust-toolchain.toml
23
!*.js
34
!*.ts
45
!self_signed_certs/

bench/include/rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ axum-server = {version = "0.4", optional = true, features = ["tls-rustls"]}
5555
flume = {version = "0", optional = true}
5656
futures-lite = {version = "1", optional = true}
5757
reqwest = {version = "0.11", optional = true, default-features = false, features = ["json", "rustls-tls"]}
58-
tokio = {version = "1", optional = true}
58+
tokio = {version = "~1.20", optional = true}
5959
warp = {version = "0.3", optional = true, features = ["tls"]}
6060

6161
[profile.release]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[toolchain]
2+
channel = "stable"
3+
targets = ["wasm32-wasi"]

bench/update.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,11 @@ popd
1111
pushd include/kotlin-native
1212
./gradlew du
1313
popd
14+
15+
pushd include/rust
16+
cargo update
17+
popd
18+
19+
pushd include/rust-nightly
20+
cargo +nightly update
21+
popd

0 commit comments

Comments
 (0)