Skip to content

Commit

Permalink
Update to the latest c-gull and Rust nightly. (#49)
Browse files Browse the repository at this point in the history
This obviates the 'debug = false' workaround.

Disable the core_simd tests for now.
  • Loading branch information
sunfishcode committed Oct 5, 2024
1 parent 5866e05 commit 8a2f1f4
Show file tree
Hide file tree
Showing 15 changed files with 12 additions and 82 deletions.
16 changes: 6 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exclude = ["/.github", "ci"]
keywords = ["linux"]

[dependencies]
c-gull = { version = "0.17.0", default-features = false, features = ["eyra"] }
c-gull = { version = "0.18.0", default-features = false, features = ["eyra"] }

[dev-dependencies]
assert_cmd = "2.0.12"
Expand All @@ -23,14 +23,16 @@ libc = "0.2.151"
cfg-if = "1.0.0"
rand_xorshift = "0.3.0"

# Test that the ctor crate works under mustang.
# Test that the ctor crate works under eyra.
ctor = "0.2.0"

# Check if rustup is installed for tests
which = "6.0.0"

# Test that the core_simd crate works under mustang.
core_simd = { git = "https://github.com/rust-lang/portable-simd" }
# Test that the core_simd crate works under eyra.
# TODO: Reenable this when the crate compiles on nightly. Currently it gets:
# - error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: simd_shuffle index must be a SIMD vector of `u32`, got `[u32; 4]`
#core_simd = { git = "https://github.com/rust-lang/portable-simd" }

# When generating documentation for docs.rs, don't enable "be-std", since we
# don't need to duplicate std's documentation.
Expand Down Expand Up @@ -78,9 +80,3 @@ todo = ["c-gull/todo"]

# Enable `unimplemented!()` stubs for deprecated functions.
deprecated-and-unimplemented = ["c-gull/deprecated-and-unimplemented"]

# TODO: Remove this workaround when
# https://github.com/llvm/llvm-project/pull/105513
# makes it into the Rust compiler.
[profile.dev.package.unwinding]
debug = false
9 changes: 0 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,6 @@ fn main() {
}
```

And, to work around an LLVM bug, add the following to Cargo.toml:
```toml
# TODO: Remove this workaround when
# https://github.com/llvm/llvm-project/pull/105513
# makes it into the Rust compiler.
[profile.dev.package.unwinding]
debug = false
```

With that, `cargo build`, `cargo run`, `cargo test` (with Nightly) and so on
will work normally with any `*-unknown-linux-gnu*` target.

Expand Down
6 changes: 0 additions & 6 deletions example-crates/all-from-source/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,3 @@ codegen-units = 1

# This is just an example crate, and not part of the eyra workspace.
[workspace]

# TODO: Remove this workaround when
# https://github.com/llvm/llvm-project/pull/105513
# makes it into the Rust compiler.
[profile.dev.package.unwinding]
debug = false
6 changes: 0 additions & 6 deletions example-crates/extern-crate-eyra-optional-example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,3 @@ eyra = { path = "../..", optional = true }

# This is just an example crate, and not part of the eyra workspace.
[workspace]

# TODO: Remove this workaround when
# https://github.com/llvm/llvm-project/pull/105513
# makes it into the Rust compiler.
[profile.dev.package.unwinding]
debug = false
6 changes: 0 additions & 6 deletions example-crates/extern-crate-hello-world/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,3 @@ eyra = { path = "../.." }

# This is just an example crate, and not part of the eyra workspace.
[workspace]

# TODO: Remove this workaround when
# https://github.com/llvm/llvm-project/pull/105513
# makes it into the Rust compiler.
[profile.dev.package.unwinding]
debug = false
6 changes: 0 additions & 6 deletions example-crates/eyra-libc-example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,3 @@ libc = "0.2.148"

# This is just an example crate, and not part of the eyra workspace.
[workspace]

# TODO: Remove this workaround when
# https://github.com/llvm/llvm-project/pull/105513
# makes it into the Rust compiler.
[profile.dev.package.unwinding]
debug = false
6 changes: 0 additions & 6 deletions example-crates/eyra-optional-example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,3 @@ eyra = ["dep:std"]

# This is just an example crate, and not part of the eyra workspace.
[workspace]

# TODO: Remove this workaround when
# https://github.com/llvm/llvm-project/pull/105513
# makes it into the Rust compiler.
[profile.dev.package.unwinding]
debug = false
6 changes: 0 additions & 6 deletions example-crates/eyra-panic-example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,3 @@ std = { package = "eyra", path = "../.." }

# This is just an example crate, and not part of the eyra workspace.
[workspace]

# TODO: Remove this workaround when
# https://github.com/llvm/llvm-project/pull/105513
# makes it into the Rust compiler.
[profile.dev.package.unwinding]
debug = false
6 changes: 0 additions & 6 deletions example-crates/hello-world-lto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,3 @@ lto = true

# This is just an example crate, and not part of the eyra workspace.
[workspace]

# TODO: Remove this workaround when
# https://github.com/llvm/llvm-project/pull/105513
# makes it into the Rust compiler.
[profile.dev.package.unwinding]
debug = false
6 changes: 0 additions & 6 deletions example-crates/hello-world-small/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,3 @@ panic = "abort"

# This is just an example crate, and not part of the eyra workspace.
[workspace]

# TODO: Remove this workaround when
# https://github.com/llvm/llvm-project/pull/105513
# makes it into the Rust compiler.
[profile.dev.package.unwinding]
debug = false
6 changes: 0 additions & 6 deletions example-crates/hello-world/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,3 @@ std = { package = "eyra", path = "../.." }

# This is just an example crate, and not part of the eyra workspace.
[workspace]

# TODO: Remove this workaround when
# https://github.com/llvm/llvm-project/pull/105513
# makes it into the Rust compiler.
[profile.dev.package.unwinding]
debug = false
6 changes: 0 additions & 6 deletions example-crates/no-std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,3 @@ rustix-dlmalloc = { version = "0.1.0", features = ["global"] }

# This is just an example crate, and not part of the eyra workspace.
[workspace]

# TODO: Remove this workaround when
# https://github.com/llvm/llvm-project/pull/105513
# makes it into the Rust compiler.
[profile.dev.package.unwinding]
debug = false
5 changes: 4 additions & 1 deletion examples/test-simd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@

extern crate eyra;

use core::arch::asm;
//use core::arch::asm;

fn main() {
// TODO: Reenable this when the crate compiles on nightly.
/*
use core_simd::simd::*;
let mut a = f32x4::splat(2.0);
unsafe { asm!("# {}", in(reg) &mut a) };
assert_eq!(a, f32x4::splat(2.0));
assert_eq!(&a as *const _ as usize & 0xf, 0);
*/
}
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2024-08-19"
channel = "nightly-2024-10-01"
components = ["rustc", "cargo", "rust-std", "rust-src", "rustfmt"]
2 changes: 1 addition & 1 deletion tests/examples.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fn test_example(name: &str, features: &str, stdout: &str, stderr: &str) {

let mut command = Command::new("cargo");
if which::which("rustup").is_ok() {
command.arg("+nightly-2024-08-19");
command.arg("+nightly-2024-10-01");
}
command.arg("run").arg("--quiet");
if !features.is_empty() {
Expand Down

0 comments on commit 8a2f1f4

Please sign in to comment.