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

Fix no_std breakage #169

Merged
merged 4 commits into from
Jul 6, 2023
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
37 changes: 37 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,46 @@ on:
- master
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true

env:
URL_ROOT_PATH: /safer_ffi/

jobs:
# Check no_std #
check-nostd:
name: 'Check `#![no_std]`'
runs-on: ubuntu-latest
steps:
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2023-06-30
override: true
components: rust-src

- name: Clone repo
uses: actions/checkout@v2

- uses: actions-rs/cargo@v1
name: '`cargo +nightly check` without `std` nor `alloc`'
with:
command: check
args: |
--no-default-features
--target x86_64-unknown-linux-gnu -Zbuild-std=core

- uses: actions-rs/cargo@v1
name: '`cargo +nightly check` without `std` '
with:
command: check
args: |
--no-default-features --features alloc
--target x86_64-unknown-linux-gnu -Zbuild-std=core,alloc

# == CHECK == #
check:
name: Check nightly stable and MSRV
Expand Down Expand Up @@ -156,6 +192,7 @@ jobs:
all-good:
name: All the required checks
needs:
- check-nostd
- check
- check-features
- build-and-test
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

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

6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ path = "src/_lib.rs"

[package]
name = "safer-ffi"
version = "0.1.0" # Keep in sync
version = "0.1.1" # Keep in sync
authors = [
"Daniel Henry-Mantilla <[email protected]>",
]
Expand Down Expand Up @@ -40,6 +40,7 @@ nightly = []
alloc = []
std = [
"alloc",
"scopeguard/use_std",
]

proc_macros = [] # Deprecated
Expand Down Expand Up @@ -136,6 +137,7 @@ once_cell.version = "1.17.1"
paste.version = "1.0.12"

scopeguard.version = "1.1.0"
scopeguard.default-features = false

tokio.optional = true
tokio.version = "1.26.0"
Expand All @@ -159,7 +161,7 @@ version = "0.0.3"

[dependencies.safer_ffi-proc_macros]
path = "src/proc_macro"
version = "=0.1.0" # Keep in sync
version = "=0.1.1" # Keep in sync

[target.'cfg(not(target = "wasm32-unknown-unknown"))'.dependencies]
libc.version = "0.2.66"
Expand Down
4 changes: 2 additions & 2 deletions ffi_tests/Cargo.lock

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

4 changes: 2 additions & 2 deletions js_tests/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 src/proc_macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ proc-macro = true

[package]
name = "safer_ffi-proc_macros"
version = "0.1.0" # Keep in sync
version = "0.1.1" # Keep in sync
authors = ["Daniel Henry-Mantilla <[email protected]>"]
edition = "2021"

Expand Down