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
106 changes: 76 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,82 @@
name: Release

# `release` publishes what a push to `main` carries; the required checks on
# `main` already proved the merged commit. `release-pr` keeps the version bump
# and changelog pull request open against `dev` on every push to `dev`. The
# bump belongs on `dev` because a pull request opened with the default
# `GITHUB_TOKEN` starts no workflow runs, so one targeting `main` could never
# satisfy the required check there.
on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write
id-token: write
push:
branches: [main, dev]

jobs:
release-plz:
name: Release-plz
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Rust
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable

# Mint a short-lived crates.io token from the GitHub OIDC
# identity instead of a stored CARGO_REGISTRY_TOKEN.
- uses: rust-lang/crates-io-auth-action@v1
id: crates-io-auth
release:
name: Publish release
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
id-token: write
concurrency:
group: release-publish-main
cancel-in-progress: false
steps:
- name: Checkout the pushed main commit
uses: actions/checkout@v6
with:
ref: ${{ github.sha }}
fetch-depth: 0
persist-credentials: false
- &rust-toolchain
name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
# Mint a short-lived crates.io token from the GitHub OIDC identity
# instead of a stored CARGO_REGISTRY_TOKEN.
- uses: rust-lang/crates-io-auth-action@v1
id: crates-io-auth
- name: Publish unpublished crate version
uses: release-plz/[email protected]
with:
command: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ steps.crates-io-auth.outputs.token }}

- name: Run release-plz
uses: MarcoIeni/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ steps.crates-io-auth.outputs.token }}
release-pr:
name: Prepare next release
if: github.ref == 'refs/heads/dev'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
concurrency:
group: release-plz-dev
cancel-in-progress: false
steps:
- name: Checkout the pushed dev commit
uses: actions/checkout@v6
with:
ref: dev
fetch-depth: 0
persist-credentials: false
- name: Verify pushed commit
env:
EXPECTED_SHA: ${{ github.sha }}
run: |
actual_sha="$(git rev-parse HEAD)"
if [[ "$actual_sha" != "$EXPECTED_SHA" ]]; then
echo "::error::dev moved after this push: expected $EXPECTED_SHA, checked out $actual_sha"
exit 1
fi
- *rust-toolchain
# The pull request lands the bump on `dev`; the release itself is the
# `dev` -> `main` pull request that carries it, which runs the full
# check set.
- name: Create or update release PR
uses: release-plz/[email protected]
with:
command: release-pr
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.7.2](https://github.com/lexoliu/executor-core/compare/v0.7.1...v0.7.2) - 2026-11-09

### Added

- compio backend

### Fixed

- mark the erased task handles `#[must_use]`
- gate the tokio backend to non-wasm targets

### Other

- Merge pull request #9 from lexoliu/fix/task-must-use
- open the release-plz bump PR against dev, publish on main
- accept an empty test run for the default feature set
- merge main into dev
- raise the MSRV to 1.95
- gate compio off wasm32 and raise the MSRV to 1.93
- run tests with cargo nextest ([#10](https://github.com/lexoliu/executor-core/pull/10))
- publish to crates.io via OIDC trusted publishing ([#6](https://github.com/lexoliu/executor-core/pull/6))
- gate pull requests into main so only dev may merge ([#7](https://github.com/lexoliu/executor-core/pull/7))
- use Waker::noop() instead of a hand-rolled TestWaker
- use stable toolchain
- add rust-cache to dep-check workflow
- add weekly dependency check workflow

## [0.7.1](https://github.com/lexoliu/executor-core/compare/v0.7.0...v0.7.1) - 2025-12-09

### Other
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "executor-core"
version = "0.7.1"
version = "0.7.2"
authors = ["Lexo Liu <[email protected]>"]
edition = "2024"
rust-version = "1.95"
Expand Down
8 changes: 8 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,10 @@ impl AnyLocalExecutor {
/// This task can be awaited like any other task and provides the same
/// cancellation and error handling capabilities as other task implementations.
/// It wraps tasks from any [`LocalExecutor`] implementation in a type-erased manner.
///
/// Dropping the task cancels the future, so a fire-and-forget spawn must call
/// [`detach`](Self::detach); the `must_use` turns a dropped handle into a warning.
#[must_use = "dropping the task cancels its future; await it, keep it, or call `.detach()`"]
pub struct AnyLocalExecutorTask<T> {
inner: Pin<Box<dyn Task<()> + 'static>>,
receiver: Receiver<Result<T, Error>>,
Expand Down Expand Up @@ -499,6 +503,10 @@ pub struct AnyExecutor(Box<dyn AnyExecutorImpl>);
///
/// This task can be awaited like any other task and provides the same
/// cancellation and error handling capabilities.
///
/// Dropping the task cancels the future, so a fire-and-forget spawn must call
/// [`detach`](Self::detach); the `must_use` turns a dropped handle into a warning.
#[must_use = "dropping the task cancels its future; await it, keep it, or call `.detach()`"]
pub struct AnyExecutorTask<T> {
inner: Pin<Box<dyn Task<()> + Send>>,
receiver: Receiver<Result<T, Error>>,
Expand Down
Loading