Skip to content

Fix packaging asset paths and legacy binaries#1898

Merged
oferchen merged 1 commit into
masterfrom
fix-asset-resolution-error-in-build
Nov 2, 2025
Merged

Fix packaging asset paths and legacy binaries#1898
oferchen merged 1 commit into
masterfrom
fix-asset-resolution-error-in-build

Conversation

@oferchen
Copy link
Copy Markdown
Owner

@oferchen oferchen commented Nov 2, 2025

Summary

  • enable the legacy compatibility binaries by default so the integration suite can exercise them
  • point the Debian and RPM asset lists at the canonical target/release paths so cargo-deb resolves the actual build output

Testing

  • cargo test

https://chatgpt.com/codex/tasks/task_e_6907a36a00208323b9241c6b0eefd330

@oferchen oferchen merged commit f4ef541 into master Nov 2, 2025
@oferchen oferchen deleted the fix-asset-resolution-error-in-build branch November 2, 2025 18:38
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Cargo.toml
Comment on lines 114 to +118
assets = [
["target/@TARGET@/@PROFILE@/oc-rsync", "usr/bin/oc-rsync", "755"],
["target/@TARGET@/@PROFILE@/oc-rsyncd", "usr/bin/oc-rsyncd", "755"],
["target/@TARGET@/@PROFILE@/rsync", "usr/libexec/oc-rsync/rsync", "755"],
["target/@TARGET@/@PROFILE@/rsyncd", "usr/libexec/oc-rsync/rsyncd", "755"],
["target/release/oc-rsync", "usr/bin/oc-rsync", "755"],
["target/release/oc-rsyncd", "usr/bin/oc-rsyncd", "755"],
["target/release/rsync", "usr/libexec/oc-rsync/rsync", "755"],
["target/release/rsyncd", "usr/libexec/oc-rsync/rsyncd", "755"],
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Packaging assets ignore dist profile output

The asset lists now hard-code binaries under target/release/..., but the packaging commands use the dist profile by default (cargo xtask package passes --profile dist and [package.metadata.rpm.cargo] sets profile = "dist"). Those builds emit artifacts in target/dist, so cargo deb/cargo rpm build will fail to copy oc-rsync* because the referenced target/release paths do not exist. Point the assets at the profile-dependent directory (e.g. target/@PROFILE@/...) so the paths match the binaries that are actually built.

Useful? React with 👍 / 👎.

oferchen added a commit that referenced this pull request May 1, 2026
Add CompletionPump: a shared completion-port driver that owns a worker
thread looping on GetQueuedCompletionStatusEx and dispatches each
completion entry to a per-operation handler keyed by the OVERLAPPED
pointer. This is the Windows analogue of an io_uring CQE drain and is
the foundational building block for the upcoming batched-write API
(#1898), the concurrent file/socket paths (#1928-#1932), and the IOCP
benchmark harness (#1899).

Existing IocpReader/IocpWriter create a private port and inline-call
GetQueuedCompletionStatus per operation, so the pump introduces a
process-wide proactor without disturbing those single-op paths.

Cross-platform: real implementation lives behind
#[cfg(all(target_os = "windows", feature = "iocp"))]; non-Windows
targets get an Unsupported-returning stub so the crate still compiles
on Linux and macOS.

All unsafe stays inside fast_io per the workspace unsafe-code policy.
oferchen added a commit that referenced this pull request May 4, 2026
…1898) (#3609)

* feat(fast_io): add IocpDiskBatch matching IoUringDiskBatch surface (#1898)

Adds a Windows IOCP batched-write API that mirrors the IoUringDiskBatch
public surface, so the disk-commit thread can batch overlapped WriteFile
submissions through a completion port and drain them with
GetQueuedCompletionStatusEx.

The new IocpDiskBatch:
- begin_file / write_data / flush / commit_file / bytes_written
- Reopens the file with FILE_FLAG_OVERLAPPED via ReOpenFile and
  associates it with a private completion port.
- Tracks in-flight overlapped operations as Pin<Box<OverlappedOp>> so
  pointers passed to WriteFile remain stable until completion, and
  matches each completion to its op by OVERLAPPED address.
- Best-effort flush on Drop to avoid leaking pending I/O.
- Stub on non-Windows / when the iocp feature is off so cross-platform
  builds keep compiling.

Wires through disk-commit:
- DiskCommitConfig gains iocp_policy: fast_io::IocpPolicy (default Auto)
- Writer enum gains an Iocp variant (Windows + iocp feature only)
- process_file / process_whole_file accept an iocp_batch parameter and
  select it in make_writer when sparse mode is off and append_offset
  is zero.
- The disk thread constructs a single IocpDiskBatch up-front (only when
  io_uring is unavailable so the two backends stay mutually exclusive)
  and threads it into every per-file call.

Tests cover policy plumbing, Windows batched submission of N writes,
completion ordering independent of submission order, error propagation
from a failed reopen, large writes that exceed the buffer, fsync via
FlushFileBuffers, drop semantics, and many rotations to verify no
leaked overlapped handles.

* style: cargo fmt --all

* fix(transfer): add iocp feature forwarding to fast_io/iocp

The transfer crate uses #[cfg(feature = "iocp")] in disk_commit/{process,writer}.rs
without declaring `iocp` as a feature in its own Cargo.toml. Under
RUSTFLAGS=-D warnings this triggers `unexpected_cfgs` as a hard clippy error,
breaking CI on the feat/iocp-disk-batch branch.

Add `iocp = ["fast_io/iocp"]` to the transfer crate features (mirroring the
io_uring pattern), and forward `transfer/iocp` from the workspace top-level
iocp feature so a single `--features iocp` activates both crates.
oferchen added a commit that referenced this pull request May 5, 2026
Add CompletionPump: a shared completion-port driver that owns a worker
thread looping on GetQueuedCompletionStatusEx and dispatches each
completion entry to a per-operation handler keyed by the OVERLAPPED
pointer. This is the Windows analogue of an io_uring CQE drain and is
the foundational building block for the upcoming batched-write API
(#1898), the concurrent file/socket paths (#1928-#1932), and the IOCP
benchmark harness (#1899).

Existing IocpReader/IocpWriter create a private port and inline-call
GetQueuedCompletionStatus per operation, so the pump introduces a
process-wide proactor without disturbing those single-op paths.

Cross-platform: real implementation lives behind
#[cfg(all(target_os = "windows", feature = "iocp"))]; non-Windows
targets get an Unsupported-returning stub so the crate still compiles
on Linux and macOS.

All unsafe stays inside fast_io per the workspace unsafe-code policy.
oferchen added a commit that referenced this pull request May 5, 2026
…1898) (#3609)

* feat(fast_io): add IocpDiskBatch matching IoUringDiskBatch surface (#1898)

Adds a Windows IOCP batched-write API that mirrors the IoUringDiskBatch
public surface, so the disk-commit thread can batch overlapped WriteFile
submissions through a completion port and drain them with
GetQueuedCompletionStatusEx.

The new IocpDiskBatch:
- begin_file / write_data / flush / commit_file / bytes_written
- Reopens the file with FILE_FLAG_OVERLAPPED via ReOpenFile and
  associates it with a private completion port.
- Tracks in-flight overlapped operations as Pin<Box<OverlappedOp>> so
  pointers passed to WriteFile remain stable until completion, and
  matches each completion to its op by OVERLAPPED address.
- Best-effort flush on Drop to avoid leaking pending I/O.
- Stub on non-Windows / when the iocp feature is off so cross-platform
  builds keep compiling.

Wires through disk-commit:
- DiskCommitConfig gains iocp_policy: fast_io::IocpPolicy (default Auto)
- Writer enum gains an Iocp variant (Windows + iocp feature only)
- process_file / process_whole_file accept an iocp_batch parameter and
  select it in make_writer when sparse mode is off and append_offset
  is zero.
- The disk thread constructs a single IocpDiskBatch up-front (only when
  io_uring is unavailable so the two backends stay mutually exclusive)
  and threads it into every per-file call.

Tests cover policy plumbing, Windows batched submission of N writes,
completion ordering independent of submission order, error propagation
from a failed reopen, large writes that exceed the buffer, fsync via
FlushFileBuffers, drop semantics, and many rotations to verify no
leaked overlapped handles.

* style: cargo fmt --all

* fix(transfer): add iocp feature forwarding to fast_io/iocp

The transfer crate uses #[cfg(feature = "iocp")] in disk_commit/{process,writer}.rs
without declaring `iocp` as a feature in its own Cargo.toml. Under
RUSTFLAGS=-D warnings this triggers `unexpected_cfgs` as a hard clippy error,
breaking CI on the feat/iocp-disk-batch branch.

Add `iocp = ["fast_io/iocp"]` to the transfer crate features (mirroring the
io_uring pattern), and forward `transfer/iocp` from the workspace top-level
iocp feature so a single `--features iocp` activates both crates.
oferchen added a commit that referenced this pull request May 18, 2026
…1898) (#3609)

* feat(fast_io): add IocpDiskBatch matching IoUringDiskBatch surface (#1898)

Adds a Windows IOCP batched-write API that mirrors the IoUringDiskBatch
public surface, so the disk-commit thread can batch overlapped WriteFile
submissions through a completion port and drain them with
GetQueuedCompletionStatusEx.

The new IocpDiskBatch:
- begin_file / write_data / flush / commit_file / bytes_written
- Reopens the file with FILE_FLAG_OVERLAPPED via ReOpenFile and
  associates it with a private completion port.
- Tracks in-flight overlapped operations as Pin<Box<OverlappedOp>> so
  pointers passed to WriteFile remain stable until completion, and
  matches each completion to its op by OVERLAPPED address.
- Best-effort flush on Drop to avoid leaking pending I/O.
- Stub on non-Windows / when the iocp feature is off so cross-platform
  builds keep compiling.

Wires through disk-commit:
- DiskCommitConfig gains iocp_policy: fast_io::IocpPolicy (default Auto)
- Writer enum gains an Iocp variant (Windows + iocp feature only)
- process_file / process_whole_file accept an iocp_batch parameter and
  select it in make_writer when sparse mode is off and append_offset
  is zero.
- The disk thread constructs a single IocpDiskBatch up-front (only when
  io_uring is unavailable so the two backends stay mutually exclusive)
  and threads it into every per-file call.

Tests cover policy plumbing, Windows batched submission of N writes,
completion ordering independent of submission order, error propagation
from a failed reopen, large writes that exceed the buffer, fsync via
FlushFileBuffers, drop semantics, and many rotations to verify no
leaked overlapped handles.

* style: cargo fmt --all

* fix(transfer): add iocp feature forwarding to fast_io/iocp

The transfer crate uses #[cfg(feature = "iocp")] in disk_commit/{process,writer}.rs
without declaring `iocp` as a feature in its own Cargo.toml. Under
RUSTFLAGS=-D warnings this triggers `unexpected_cfgs` as a hard clippy error,
breaking CI on the feat/iocp-disk-batch branch.

Add `iocp = ["fast_io/iocp"]` to the transfer crate features (mirroring the
io_uring pattern), and forward `transfer/iocp` from the workspace top-level
iocp feature so a single `--features iocp` activates both crates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant