Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust 1.72 #56

Merged
merged 3 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/container-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
env:
ZEPHYR_VERSION: ${{ matrix.zephyr_version }}
RUST_VERSION: 1.70.0
RUST_VERSION: 1.72.0

permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- run: false
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository }}:zephyr-rust-${{ matrix.zephyr_version }}-1.70.0
image: ghcr.io/${{ github.repository }}:zephyr-rust-${{ matrix.zephyr_version }}-1.72.0
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand Down
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Version Compatibility
=====================
**Zephyr**: v2.3, v2.7.3, v3.7. 3.0-3.6 not supported.

**Rust**: exactly 1.70.0
**Rust**: exactly 1.72.0

Please use one of the above Zephyr releases before reporting issues! At the
time you are reading this, Zephyr's main branch will likely not work, though it
Expand Down Expand Up @@ -79,13 +79,13 @@ included as a submodule of this project. In practice, using a different
compiler version often fails to compile because of Rust internally making heavy
use of unstable compiler features.

The current base is stable-1.70.0. Rustup is the default workflow, and the
The current base is stable-1.72.0. Rustup is the default workflow, and the
rust-toolchain file in this repo should cause rustup to automatically install
and use the right version. If not, manually install:

.. code-block:: console

rustup toolchain install 1.70.0
rustup toolchain install 1.72.0

If supplying your own rustc and cargo, make sure they are the version above.
The build will fail if it detects a version mismatch.
Expand Down
3 changes: 2 additions & 1 deletion ci/env.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/bash

ZEPHYR_RUST="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/.."
RUST_VERSION="$( rustc --version | awk '{print $2}' )"
RUST_VERSION="${RUST_VERSION:-$( rustc --version | awk '{print $2}' )}"
ZEPHYR_VERSION=${ZEPHYR_VERSION:-3.7.0}
# Set CONTAINER_REGISTRY to something like "zephyr-rust:" to use local images
CONTAINER_REGISTRY="zephyr-rust:"
CONTAINER_REGISTRY=${CONTAINER_REGISTRY:-ghcr.io/tylerwhall/zephyr-rust:zephyr-rust-}

echo RUST_VERSION=$RUST_VERSION
Expand Down
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 = "1.70.0"
channel = "1.72.0"
profile = "minimal"
2 changes: 1 addition & 1 deletion rust/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

HOST=$(rustc -vV | grep host: | cut -d ' ' -f 2)
CARGO_ARGS="-v build --target=${RUST_TARGET_SPEC} --release"
VERSION="1.70"
VERSION="1.72"
CURRENT_RUSTC_VERSION=$(rustc -vV | grep ^release: | cut -d ' ' -f 2 | cut -d '.' -f '1,2')

# Assert cargo version matches the certified version
Expand Down
2 changes: 1 addition & 1 deletion rust/libc
Submodule libc updated 79 files
+4 −4 .cirrus.yml
+4 −2 .github/PULL_REQUEST_TEMPLATE.md
+25 −29 .github/workflows/bors.yml
+1 −1 .github/workflows/docs.yml
+1 −1 .github/workflows/main.yml
+1 −1 Cargo.toml
+7 −7 README.md
+8 −0 build.rs
+3 −3 ci/README.md
+1 −2 ci/docker/sparc64-unknown-linux-gnu/Dockerfile
+1 −1 ci/linux-s390x.sh
+1 −1 ci/linux-sparc64.sh
+1 −1 ci/rust.css
+2 −2 libc-test/Cargo.toml
+112 −54 libc-test/build.rs
+7 −0 libc-test/semver/android.txt
+7 −0 libc-test/semver/apple.txt
+28 −0 libc-test/semver/dragonfly.txt
+55 −1 libc-test/semver/freebsd.txt
+6 −0 libc-test/semver/linux-gnu-loongarch64.txt
+3 −17 libc-test/semver/linux-gnu.txt
+136 −0 libc-test/semver/linux-loongarch64.txt
+86 −0 libc-test/semver/linux.txt
+15 −0 libc-test/semver/netbsd.txt
+17 −0 libc-test/semver/openbsd.txt
+15 −1 libc-test/semver/redox.txt
+11 −10 libc-test/test/cmsg.rs
+1 −0 src/fuchsia/aarch64.rs
+4 −1 src/fuchsia/mod.rs
+44 −0 src/fuchsia/riscv64.rs
+1,060 −19 src/unix/aix/mod.rs
+113 −39 src/unix/aix/powerpc64.rs
+174 −4 src/unix/bsd/apple/mod.rs
+14 −2 src/unix/bsd/freebsdlike/dragonfly/mod.rs
+10 −0 src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs
+10 −0 src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs
+10 −0 src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs
+10 −0 src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs
+7 −0 src/unix/bsd/freebsdlike/freebsd/freebsd14/x86_64.rs
+49 −4 src/unix/bsd/freebsdlike/freebsd/mod.rs
+155 −0 src/unix/bsd/freebsdlike/freebsd/x86.rs
+35 −1 src/unix/bsd/freebsdlike/mod.rs
+1 −0 src/unix/bsd/mod.rs
+69 −27 src/unix/bsd/netbsdlike/netbsd/mod.rs
+43 −9 src/unix/bsd/netbsdlike/openbsd/mod.rs
+48 −2 src/unix/haiku/mod.rs
+34 −2 src/unix/linux_like/android/mod.rs
+11 −0 src/unix/linux_like/linux/align.rs
+9 −4 src/unix/linux_like/linux/arch/generic/mod.rs
+3 −0 src/unix/linux_like/linux/arch/mips/mod.rs
+3 −0 src/unix/linux_like/linux/arch/powerpc/mod.rs
+1 −0 src/unix/linux_like/linux/gnu/b32/arm/mod.rs
+35 −0 src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs
+4 −4 src/unix/linux_like/linux/gnu/b64/loongarch64/align.rs
+22 −1 src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs
+35 −0 src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs
+12 −33 src/unix/linux_like/linux/gnu/mod.rs
+171 −34 src/unix/linux_like/linux/mod.rs
+1 −2 src/unix/linux_like/linux/musl/b32/mips/mod.rs
+5 −0 src/unix/linux_like/linux/musl/b32/powerpc.rs
+0 −16 src/unix/linux_like/linux/musl/b32/riscv32/mod.rs
+3 −0 src/unix/linux_like/linux/musl/b32/x86/mod.rs
+3 −0 src/unix/linux_like/linux/musl/b64/powerpc64.rs
+0 −16 src/unix/linux_like/linux/musl/b64/riscv64/mod.rs
+17 −12 src/unix/linux_like/linux/musl/b64/s390x.rs
+3 −0 src/unix/linux_like/linux/musl/b64/x86_64/mod.rs
+241 −0 src/unix/linux_like/linux/musl/lfs64.rs
+12 −11 src/unix/linux_like/linux/musl/mod.rs
+92 −50 src/unix/linux_like/mod.rs
+2 −2 src/unix/mod.rs
+39 −8 src/unix/newlib/mod.rs
+201 −0 src/unix/newlib/vita/mod.rs
+1 −1 src/unix/nto/mod.rs
+86 −0 src/unix/redox/mod.rs
+22 −2 src/unix/solarish/mod.rs
+1 −1 src/vxworks/mod.rs
+11 −7 src/windows/mod.rs
+2 −11 src/zephyr/mod.rs
+3 −1 triagebot.toml
2 changes: 1 addition & 1 deletion rust/rust
Submodule rust updated 9833 files
17 changes: 12 additions & 5 deletions rust/sysroot-stage1/Cargo.lock

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

9 changes: 9 additions & 0 deletions rust/zephyr-core/src/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ impl ThreadId {
self.0.as_ptr()
}

pub fn k_thread_suspend<C: ThreadSyscalls>(&self) {
C::k_thread_suspend(*self)
}

pub fn k_wakeup<C: ThreadSyscalls>(&self) {
C::k_wakeup(*self)
}
Expand All @@ -20,6 +24,7 @@ impl ThreadId {
}

pub trait ThreadSyscalls {
fn k_thread_suspend(thread: ThreadId);
fn k_wakeup(thread: ThreadId);
fn k_current_get() -> crate::thread::ThreadId;
fn k_object_access_grant<K: KObj>(kobj: &K, thread: ThreadId);
Expand All @@ -28,6 +33,10 @@ pub trait ThreadSyscalls {
macro_rules! trait_impl {
($context:ident, $context_struct:path) => {
impl ThreadSyscalls for $context_struct {
fn k_thread_suspend(thread: ThreadId) {
unsafe { zephyr_sys::syscalls::$context::k_thread_suspend(thread.tid()) }
}

fn k_wakeup(thread: ThreadId) {
unsafe { zephyr_sys::syscalls::$context::k_wakeup(thread.tid()) }
}
Expand Down
Loading