diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3729db..4b89c9a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,8 +25,28 @@ jobs: all-features: true secrets: inherit + no-std: + name: no_std compatibility + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + + - name: Install Rust (stable) + uses: dtolnay/rust-toolchain@v1 + with: + toolchain: stable + + - name: Cache cargo + uses: Swatinem/rust-cache@v2 + with: + shared-key: no-std + save-if: ${{ github.ref == 'refs/heads/main' }} + + - name: Check no_std build + run: cargo check --no-default-features + update-changelog: - needs: ci + needs: [ci, no-std] uses: ./.github/workflows/reusable-changelog.yml secrets: GH_TOKEN: ${{ secrets.GH_TOKEN }} diff --git a/src/app_error/core/builder.rs b/src/app_error/core/builder.rs index 8af5337..299463a 100644 --- a/src/app_error/core/builder.rs +++ b/src/app_error/core/builder.rs @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: MIT -use alloc::{borrow::Cow, sync::Arc}; +use alloc::{borrow::Cow, string::String, sync::Arc}; use core::error::Error as CoreError; #[cfg(feature = "backtrace")] use std::backtrace::Backtrace; diff --git a/src/app_error/core/display.rs b/src/app_error/core/display.rs index 652f374..f12b92c 100644 --- a/src/app_error/core/display.rs +++ b/src/app_error/core/display.rs @@ -2,6 +2,7 @@ // // SPDX-License-Identifier: MIT +use alloc::string::ToString; use core::{ error::Error as CoreError, fmt::{Formatter, Result as FmtResult}, diff --git a/src/app_error/core/introspection.rs b/src/app_error/core/introspection.rs index 39ea124..67e29c6 100644 --- a/src/app_error/core/introspection.rs +++ b/src/app_error/core/introspection.rs @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: MIT -use alloc::borrow::Cow; +use alloc::{borrow::Cow, boxed::Box}; use core::error::Error as CoreError; #[cfg(feature = "backtrace")]