Skip to content

Upgrade rust dependencies #181

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

Merged
merged 13 commits into from
Mar 6, 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
33 changes: 18 additions & 15 deletions .cargo-deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
# this list would mean the nix crate, as well as any of its exclusive
# dependencies not shared by any other crates, would be ignored, as the target
# list here is effectively saying which targets you are building for.
targets = [
#targets = [
# The triple can be any string, but only the target triples built in to
# rustc (as of 1.40) can be checked against actual config expressions
#{ triple = "x86_64-unknown-linux-musl" },
# You can also specify which target_features you promise are enabled for a
# particular target. target_features are currently not validated against
# the actual valid features supported by the target architecture.
#{ triple = "wasm32-unknown-unknown", features = ["atomics"] },
]
#]
# When creating the dependency graph used as the source of truth when checks are
# executed, this field can be used to prune crates from the graph, removing them
# from the view of cargo-deny. This is an extremely heavy hammer, as if a crate
Expand All @@ -39,7 +39,7 @@ targets = [
# If true, metadata will be collected with `--all-features`. Note that this can't
# be toggled off if true, if you want to conditionally enable `--all-features` it
# is recommended to pass `--all-features` on the cmd line instead
all-features = true
# all-features = true
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These were all deprecated. More info in EmbarkStudios/cargo-deny#611

# If true, metadata will be collected with `--no-default-features`. The same
# caveat with `all-features` applies
# no-default-features = false
Expand All @@ -51,7 +51,7 @@ all-features = true
# This option is included since the graphs can be quite large and the addition
# of features from the crate(s) to all of the graph roots can be far too verbose.
# This option can be overridden via `--feature-depth` on the cmd line
feature-depth = 1
# feature-depth = 1

# This section is considered when running `cargo deny check advisories`
# More documentation for the advisories section can be found here:
Expand All @@ -62,15 +62,15 @@ db-path = "~/.cargo/advisory-db"
# The url(s) of the advisory databases to use
db-urls = ["https://github.com/rustsec/advisory-db"]
# The lint level for security vulnerabilities
vulnerability = "deny"
# vulnerability = "deny"
# The lint level for unmaintained crates
unmaintained = "deny"
# unmaintained = "deny"
# The lint level for crates that have been yanked from their source registry
yanked = "warn"
# The lint level for crates with security notices. Note that as of
# 2019-12-17 there are no security notice advisories in
# https://github.com/rustsec/advisory-db
notice = "warn"
# notice = "warn"
# A list of advisory IDs to ignore. Note that ignored advisories will still
# output a note when they are encountered.
ignore = [
Expand Down Expand Up @@ -98,35 +98,38 @@ ignore = [
# https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html
[licenses]
# The lint level for crates which do not have a detectable license
unlicensed = "allow"
# unlicensed = "allow"
# List of explicitly allowed licenses
# See https://spdx.org/licenses/ for list of possible licenses
# [possible values: any SPDX 3.11 short identifier (+ optional exception)].
allow = [
"MIT",
"Apache-2.0",
"Apache-2.0 WITH LLVM-exception",
"Zlib",
"BSD-3-Clause",
"ISC",
"Unicode-DFS-2016",
"LGPL-3.0"
]
# List of explicitly disallowed licenses
# See https://spdx.org/licenses/ for list of possible licenses
# [possible values: any SPDX 3.11 short identifier (+ optional exception)].
deny = [
#"Nokia",
]
# deny = ["Nokia"]
# Lint level for licenses considered copyleft
copyleft = "allow"
# copyleft = "allow"
# Blanket approval or denial for OSI-approved or FSF Free/Libre licenses
# * both - The license will be approved if it is both OSI-approved *AND* FSF
# * either - The license will be approved if it is either OSI-approved *OR* FSF
# * osi-only - The license will be approved if is OSI-approved *AND NOT* FSF
# * fsf-only - The license will be approved if is FSF *AND NOT* OSI-approved
# * neither - This predicate is ignored and the default lint level is used
allow-osi-fsf-free = "either"
# allow-osi-fsf-free = "either"
# Lint level used when no other predicates are matched
# 1. License isn't in the allow or deny lists
# 2. License isn't copyleft
# 3. License isn't OSI/FSF, or allow-osi-fsf-free = "neither"
default = "deny"
# default = "deny"
# The confidence threshold for detecting a license from license text.
# The higher the value, the more closely the license text must be to the
# canonical license text of a valid SPDX license file.
Expand All @@ -147,7 +150,7 @@ exceptions = [
# The name of the crate the clarification applies to
#name = "ring"
# The optional version constraint for the crate
#version = "*"
version = 2
# The SPDX expression for the license requirements of the crate
#expression = "MIT AND ISC AND OpenSSL"
# One or more files in the crate's source used as the "source of truth" for
Expand Down
61 changes: 31 additions & 30 deletions .github/workflows/pr-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,11 @@ jobs:
- name: Install Rust Toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af
with:
toolchain: stable
toolchain: nightly-2024-03-01
default: true
profile: minimal
profile: default
target: wasm32-unknown-unknown
override: true

- name: Cargo fmt
run: make format-check
Expand Down Expand Up @@ -121,33 +122,33 @@ jobs:
- name: Cargo build
run: make build
test_binary:
name: Generate bindgen and run c_example
runs-on: ubuntu-latest
needs: [verify, test, lint, build]
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Rust Toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af
with:
toolchain: stable
default: true
profile: minimal
target: wasm32-unknown-unknown
- name: Install libsodium
run: sudo apt-get install -y libsodium-dev
- name: Run tests for ffi
run: make test-ffi
- name: Upload artifacts dsnp_graph_sdk_ffi.h and libdsnp_graph_sdk_ffi.a
uses: actions/upload-artifact@v2
with:
name: dsnp_graph_sdk_ffi
path: |
bridge/ffi/src/c_example/dsnp_graph_sdk_ffi.h
bridge/ffi/src/c_example/libdsnp_graph_sdk_ffi.a
bridge/ffi/src/c_example/main.c
name: Generate bindgen and run c_example
runs-on: ubuntu-latest
needs: [verify, test, lint, build]
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Rust Toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af
with:
toolchain: stable
default: true
profile: minimal
target: wasm32-unknown-unknown
- name: Install libsodium
run: sudo apt-get install -y libsodium-dev
- name: Run tests for ffi
run: make test-ffi
- name: Upload artifacts dsnp_graph_sdk_ffi.h and libdsnp_graph_sdk_ffi.a
uses: actions/upload-artifact@v2
with:
name: dsnp_graph_sdk_ffi
path: |
bridge/ffi/src/c_example/dsnp_graph_sdk_ffi.h
bridge/ffi/src/c_example/libdsnp_graph_sdk_ffi.a
bridge/ffi/src/c_example/main.c
generate-docs:
name: Generate graph sdk rust docs
runs-on: ubuntu-latest
Expand Down Expand Up @@ -175,7 +176,7 @@ jobs:
uses: actions/configure-pages@v3
- name: Build Docs
run: |
RUSTDOCFLAGS="--enable-index-page -Zunstable-options" cargo doc --no-deps --all-features
RUSTC_BOOTSTRAP=1 RUSTDOCFLAGS="--enable-index-page -Zunstable-options" cargo doc --no-deps --all-features
- name: Fix file permissions
shell: sh
run: |
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,20 @@ jobs:
with:
fetch-depth: 0

- name: Install Rust Toolchain
- name: Install Rust Toolchain Stable
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af
with:
toolchain: stable
default: true
profile: minimal
profile: default
target: wasm32-unknown-unknown

- name: Install Rust Toolchain Nightly
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af
with:
toolchain: nightly-2024-03-01
default: false
profile: default
target: wasm32-unknown-unknown

- name: Cargo check
Expand Down Expand Up @@ -259,7 +267,7 @@ jobs:
uses: actions/configure-pages@v3
- name: Build Docs
run: |
RUSTDOCFLAGS="--enable-index-page -Zunstable-options" cargo doc --no-deps --all-features
RUSTC_BOOTSTRAP=1 RUSTDOCFLAGS="--enable-index-page -Zunstable-options" cargo doc --no-deps --all-features
- name: Fix file permissions
shell: sh
run: |
Expand Down
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
rust 1.71.1
rust 1.76.0
make 4.3
cmake 3.24.1
protoc 3.12.4
protoc 3.21.12
# clang 14.0.6 # only plugin I could find for clang and not some subset of clang did not work, it was located here https://github.com/srivathsanmurali/asdf-clang.git
java corretto-17.0.2.8.1
Loading