Skip to content
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
4 changes: 2 additions & 2 deletions .github/workflows/commands-handler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ jobs:
run: echo -e "\033[38;2;19;181;255mThis is regular commit which should be ignored.\033[0m"
- name: Checkout repository
if: steps.user-check.outputs.expected-user == 'true'
uses: actions/checkout@v3
uses: actions/checkout@v5
with:
token: ${{ secrets.GH_TOKEN }}
- name: Checkout release actions
if: steps.user-check.outputs.expected-user == 'true'
uses: actions/checkout@v3
uses: actions/checkout@v5
with:
repository: pubnub/client-engineering-deployment-tools
ref: v1
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
release: ${{ steps.check.outputs.ready }}
steps:
- name: Checkout actions
uses: actions/checkout@v3
uses: actions/checkout@v5
with:
repository: pubnub/client-engineering-deployment-tools
ref: v1
Expand All @@ -34,13 +34,13 @@ jobs:
if: needs.check-release.outputs.release == 'true'
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v5
with:
# This should be the same as the one specified for on.pull_request.branches
ref: master
token: ${{ secrets.GH_TOKEN }}
- name: Checkout actions
uses: actions/checkout@v3
uses: actions/checkout@v5
with:
repository: pubnub/client-engineering-deployment-tools
ref: v1
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
group: organization/Default
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v5
- name: Run unit tests
run: |
cargo test --features="full"
Expand All @@ -39,9 +39,9 @@ jobs:
group: organization/Default
steps:
- name: Checkout project
uses: actions/checkout@v3
uses: actions/checkout@v5
- name: Checkout mock-server action
uses: actions/checkout@v3
uses: actions/checkout@v5
with:
repository: pubnub/client-engineering-deployment-tools
ref: v1
Expand All @@ -58,7 +58,7 @@ jobs:
run: |
cargo test --features contract_test --test contract_test
- name: Expose acceptance tests reports
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: acceptance-test-reports
path: tests/reports/*.xml
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/run-validations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
runs-on:
group: organization/Default
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5

- name: Run cargo check tool to check if the code are valid
run: |
Expand Down Expand Up @@ -80,8 +80,8 @@ jobs:
# Prevent sudden announcement of a new advisory from failing ci:
continue-on-error: ${{ matrix.checks == 'advisories' }}
steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1
- uses: actions/checkout@v5
- uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check ${{ matrix.checks }}

Expand All @@ -90,7 +90,7 @@ jobs:
runs-on:
group: organization/Default
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5

- name: Install WASM target
uses: actions-rs/toolchain@v1
Expand All @@ -109,7 +109,7 @@ jobs:
runs-on:
group: organization/Default
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5

- name: Install `no_std` target
uses: actions-rs/toolchain@v1
Expand All @@ -119,12 +119,16 @@ jobs:

- name: Run cargo check tool to check if the `no_std` code are valid
uses: actions-rs/cargo@v1
env:
RUSTFLAGS: '--cfg getrandom_backend="unsupported"'
with:
command: check
args: --lib --no-default-features --features=full_no_std_platform_independent,mock_getrandom
args: --lib --no-default-features --features=full_no_std_platform_independent

- name: Run cargo check tool to check if the additional example code are valid
uses: actions-rs/cargo@v1
env:
RUSTFLAGS: '--cfg getrandom_backend="custom"'
with:
command: check
args: --manifest-path examples/no_std/Cargo.toml --target thumbv7m-none-eabi
Expand Down
17 changes: 16 additions & 1 deletion .pubnub.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
name: rust
version: 0.6.0
version: 0.7.0
schema: 1
scm: github.com/pubnub/rust
files: []
changelog:
- date: 2025-10-28
version: 0.7.0
changes:
- type: feature
text: "Add `limit` (default `1000`) and `offset` parameters for `here_now` to fetch presence in portions."
- type: feature
text: "Use default retry configuration for `subscribe` and `presence` REST API calls."
- type: bug
text: "Fix the issue because of which it was possible to add the same channel / group multiple times to the `subscribe`, `heartbeat`, or `leave` requests."
- type: bug
text: "Fix the `Presence` enum variant to not intercept user-published messages that partly match the `Presence` variant."
- type: improvement
text: "Synchronize subscription flow with other SDKs."
- type: improvement
text: "Synchronize presence flow with other SDKs."
- date: 2024-02-07
version: 0.6.0
changes:
Expand Down
21 changes: 10 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pubnub"
version = "0.6.0"
version = "0.7.0"
edition = "2021"
license-file = "LICENSE"
authors = ["PubNub <[email protected]>"]
Expand Down Expand Up @@ -67,7 +67,6 @@ contract_test = ["parse_token", "publish", "access", "crypto", "std", "subscribe
full_no_std = ["serde", "reqwest", "crypto", "parse_token", "blocking", "publish", "access", "subscribe", "tokio", "presence"]
full_no_std_platform_independent = ["serde", "crypto", "parse_token", "blocking", "publish", "access", "subscribe", "presence"]
pubnub_only = ["crypto", "parse_token", "blocking", "publish", "access", "subscribe", "presence"]
mock_getrandom = ["getrandom/custom"]
# TODO: temporary treated as internal until we officially release it
subscribe = ["dep:futures"]
presence = ["dep:futures"]
Expand All @@ -80,28 +79,28 @@ spin = "0.9"
phantom-type = { version = "0.4.2", default-features = false }
percent-encoding = { version = "2.1", default-features = false }
base64 = { version = "0.21", features = ["alloc"], default-features = false }
derive_builder = { version = "0.12", default-features = false }
derive_builder = { version = "0.12.0", default-features = false }
uuid = { version = "1.3", features = ["v4"], default-features = false }
snafu = { version = "0.7", features = ["rust_1_46"], default-features = false }
rand = { version = "0.8.5", default-features = false }

# signature
hmac = "0.12"
sha2 = {version = "0.10", default-features = false }
sha2 = { version = "0.10", default-features = false }
time = { version = "0.3", features = ["alloc"], default-features = false }

# serde
serde = { version = "1.0", features = ["derive"], optional = true, default-features = false }
serde_json = { version = "1.0", optional = true, features = ["alloc"] ,default-features = false }
serde = { version = "1.0", features = ["derive", "alloc"], optional = true, default-features = false }
serde_json = { version = "1.0", optional = true, features = ["alloc"], default-features = false }

# reqwest
reqwest = { version = "0.11", optional = true }
reqwest = { version = "0.12", optional = true }
bytes = { version = "1.4", default-features = false, optional = true }

# crypto
aes = { version = "0.8.2", optional = true }
cbc = { version = "0.1.2", optional = true }
getrandom = { version = "0.2", optional = true }
getrandom = { version = "0.3", optional = true }

# parse_token
ciborium = { version = "0.2.1", default-features = false, optional = true }
Expand All @@ -115,18 +114,18 @@ async-channel = { version = "1.8", optional = true }
portable-atomic = { version = "1.3", optional = true, default-features = false, features = ["require-cas", "critical-section"] }

[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.2", features = ["js"] }
getrandom = { version = "0.3", features = ["wasm_js"] }

[dev-dependencies]
async-trait = "0.1"
tokio = { version = "1", features = ["rt-multi-thread", "macros", "time"] }
wiremock = "0.5"
env_logger = "0.10"
cucumber = { version = "0.20.2", features = ["output-junit"] }
reqwest = { version = "0.11", features = ["json"] }
reqwest = { version = "0.12", features = ["json"] }
test-case = "3.0"
hashbrown = { version = "0.14.0", features = ["serde"] }
getrandom = { version = "0.2", features = ["custom"] }
getrandom = { version = "0.3" }

[build-dependencies]
built = "0.6"
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ Add `pubnub` to your Rust project in the `Cargo.toml` file:
```toml
# default features
[dependencies]
pubnub = "0.6.0"
pubnub = "0.7.0"

# all features
[dependencies]
pubnub = { version = "0.6.0", features = ["full"] }
pubnub = { version = "0.7.0", features = ["full"] }
```

### Example
Expand Down Expand Up @@ -164,11 +164,11 @@ disable them in the `Cargo.toml` file, like so:
```toml
# only blocking and access + default features
[dependencies]
pubnub = { version = "0.6.0", features = ["blocking", "access"] }
pubnub = { version = "0.7.0", features = ["blocking", "access"] }

# only parse_token + default features
[dependencies]
pubnub = { version = "0.6.0", features = ["parse_token"] }
pubnub = { version = "0.7.0", features = ["parse_token"] }
```

### Available features
Expand Down Expand Up @@ -207,7 +207,7 @@ you need, for example:

```toml
[dependencies]
pubnub = { version = "0.6.0", default-features = false, features = ["serde", "publish",
pubnub = { version = "0.7.0", default-features = false, features = ["serde", "publish",
"blocking"] }
```

Expand Down
20 changes: 8 additions & 12 deletions deny.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
# Root options
[graph]
targets = [
#{ triple = "x86_64-unknown-linux-musl" },
]
all-features = false
no-default-features = false

[output]
feature-depth = 1

# This section is considered when running `cargo deny check advisories`
# More documentation for the advisories section can be found here:
# https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html
[advisories]
version = 2
db-path = "~/.cargo/advisory-db"
db-urls = ["https://github.com/rustsec/advisory-db"]
vulnerability = "deny"
unmaintained = "warn"
unmaintained = "workspace"
yanked = "warn"
notice = "warn"
ignore = [
#"RUSTSEC-0000-0000",
]
Expand All @@ -24,7 +25,7 @@ ignore = [
# More documentation for the licenses section can be found here:
# https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html
[licenses]
unlicensed = "deny"
version = 2
allow = [
# Before inserting a new license here, please check if it is already in the list of
# licenses that are allowed: https://blueoakcouncil.org/list
Expand All @@ -33,15 +34,10 @@ allow = [
"Apache-2.0",
"BlueOak-1.0.0",
"Unicode-DFS-2016",
"Unicode-3.0",
"BSD-3-Clause",
#"Apache-2.0 WITH LLVM-exception",
]
deny = [
#"Nokia",
]
copyleft = "warn"
allow-osi-fsf-free = "neither"
default = "deny"
confidence-threshold = 0.8
exceptions = [
{ allow = ["LicenseRef-PubNub-Software-Development-Kit-License"], name = "pubnub" },
Expand All @@ -52,7 +48,7 @@ exceptions = [
[[licenses.clarify]]
name = "pubnub"
expression = "LicenseRef-PubNub-Software-Development-Kit-License"
license-files = [ { path = "LICENSE", hash = 0x48826f13 }, ]
license-files = [{ path = "LICENSE", hash = 0x48826f13 }, ]


[licenses.private]
Expand Down
6 changes: 3 additions & 3 deletions examples/no_std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
pubnub = { path = "../../", default_features = false, features = ["blocking", "serde", "publish", "subscribe", "presence"] }
serde = { version = "1.0", default_features = false, features = ["derive"] }
getrandom = { version = "0.2", default_features = false, features = ["custom"] }
pubnub = { path = "../../", default-features = false, features = ["blocking", "serde", "publish", "subscribe", "presence"] }
serde = { version = "1.0", default-features = false, features = ["derive"] }
getrandom = { version = "0.3", default_features = false }

[[bin]]
name = "publish"
Expand Down
Loading
Loading