diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index da59ff9..b3364cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,10 @@ jobs: with: key: windows-latest-test - uses: cargo-bins/cargo-binstall@main - - uses: ilammy/setup-nasm@v1 + - name: Install NASM for AWS-LC + uses: ilammy/setup-nasm@v1 + - name: Install bindgen-cli + run: cargo install --force --locked bindgen-cli - name: Test Setup run: | make certs @@ -30,7 +33,6 @@ jobs: - name: Test run: | Start-Process cmd -Args /c,"http-server --tls --tls-key certs/test-certs/server.key --tls-cert certs/test-certs/server.crt --tls-key-algorithm pkcs8" - cargo install --force --locked bindgen-cli cargo test --features task,subscriber,fixture,task_unstable,io,sync,future,net,tls,rust_tls,timer,fs,zero_copy,mmap,retry test: name: Check ${{ matrix.check }} on (${{ matrix.os }}) diff --git a/CHANGELOG.md b/CHANGELOG.md index 328f84d..07ca0c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,17 +1,12 @@ # Release Notes -## Unreleased - -* Timer sleeper only fires once ([#258](https://github.com/infinyon/future-aio/pull/258)) -* Bump tokio from 1.33.0 to 1.37.0 -* Bump async-lock from 2.8.0 to 3.3.0 -* Bump async-fs from 1.6.0 to 2.1.2 -* Bump bytes from 1.4.0 to 1.6.0 -* Bump once_cell from 1.18.0 to 1.19.0 -* Bump async-net from 1.7.0 to 2.0.0 -* Bump async-native-tls from 0.4.0 to 0.5.0 -* Bump memmap2 from 0.5.10 to 0.9.3 -* Bump async-io from 1.13.0 to 2.3.2 +## 0.7.0 +* Update all depencencies to latest versions +* Timer sleeper only fires once +* Remove `http-client` +* Rename `native2_tls` feature to `native_tls` +* Note: `rustls` now uses `aws-lc` instead of `ring` + ## 0.5.0 * Move to `memmap2` because `memmap` is unmaintained. diff --git a/Cargo.toml b/Cargo.toml index 3d575a9..a10aa0f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,54 +12,23 @@ resolver = "2" all-features = true [features] -task = ["async-std/default", "timer", "cfg-if"] -subscriber = [ - "tracing-subscriber", - "tracing-subscriber/std", - "tracing-subscriber/env-filter", -] +task = ["async-std/default", "cfg-if"] +subscriber = ["tracing-subscriber", "tracing-subscriber/std", "tracing-subscriber/env-filter"] fixture = ["subscriber", "task", "fluvio-future-derive"] task_unstable = ["task", "async-std/unstable"] io = ["async-std/default"] sync = ["async-std/default"] future = ["async-std/default"] -net = [ - "futures-lite", - "async-net", - "async-trait", - "cfg-if", - "futures-util/io", - "socket2", - "ws_stream_wasm" -] +net = ["futures-lite", "async-net", "async-trait", "cfg-if", "futures-util/io", "socket2", "ws_stream_wasm"] tls = ["rust_tls"] -rust_tls = [ - "net", - "rustls-pemfile", - "futures-rustls", - "pin-project", - "futures-util/io", -] -native_tls = [ - "net", - "pin-project", - "async-native-tls", - "dep:native-tls", - "openssl/vendored", - "futures-util/io", -] -openssl_tls = [ - "net", - "openssl", - "openssl-sys", - "pin-project", - "futures-util/io", -] +rust_tls = ["net", "rustls-pemfile", "futures-rustls", "pin-project", "futures-util/io"] +native_tls = ["net", "pin-project", "async-native-tls", "dep:native-tls", "openssl/vendored", "futures-util/io"] +openssl_tls = ["net", "openssl", "openssl-sys", "pin-project", "futures-util/io"] timer = ["async-io", "pin-project", "futures-lite", "fluvio-wasm-timer"] fs = ["async-fs", "futures-lite", "pin-utils", "async-trait"] zero_copy = ["nix", "task_unstable"] mmap = ["fs", "memmap2", "task_unstable"] -retry = [] +retry = ["cfg-if"] doomsday = ["task", "sync"] tokio1 = ["async-std/tokio1"] attributes = [] @@ -94,7 +63,7 @@ rustls-pemfile = { version = "2.1", optional = true } socket2 = { version = "0.5.7", default-features = false, features = ["all"], optional = true } [target.'cfg(target_arch = "wasm32")'.dependencies] -async-std = { version = "1.12.0", default-features = false, features = ["unstable"], optional = true } +async-std = { version = "1.12", default-features = false, features = ["unstable"], optional = true } fluvio-wasm-timer = { version = "0.2.5", optional = true } ws_stream_wasm = { version = "0.7.4", optional = true } diff --git a/src/task.rs b/src/task.rs index 28f1683..c215f65 100644 --- a/src/task.rs +++ b/src/task.rs @@ -2,8 +2,6 @@ use std::future::Future; use async_std::task; -use crate::timer::sleep; - #[cfg(feature = "task_unstable")] pub use async_std::task::spawn_local; @@ -16,29 +14,6 @@ where task::block_on(spawn_closure); } -/// run future and wait forever -/// this is typically used in the server -pub fn main_forever(spawn_closure: F) -where - F: Future + Send + 'static, -{ - use std::time::Duration; - - task::block_on(async { - spawn_closure.await; - // do infinite loop for now - loop { - cfg_if::cfg_if! { - if #[cfg(target_arch = "wasm32")] { - sleep(Duration::from_secs(3600)).await.unwrap(); - } else { - sleep(Duration::from_secs(3600)).await; - } - } - } - }); -} - cfg_if::cfg_if! { if #[cfg(target_arch = "wasm32")] { pub use async_std::task::spawn_local as spawn;