{"record":{"id":"a11af82d5b39cffd","repo":"astrid-runtime/astrid","slug":"host-local-transport-is-not-implemented-on-this-pl","errorCode":null,"errorMessage":"host-local transport is not implemented on this platform","messagePattern":"host-local transport is not implemented on this platform","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-core/src/local_transport.rs","lineNumber":28,"sourceCode":"//! types used before this seam was introduced. On Windows, the caller's path\n//! is a portable API token combined with the current process token SID to form\n//! a private, path-scoped pipe name. Backends own endpoint presence checks,\n//! stale cleanup, connection probing, and same-user peer verification so\n//! callers do not assume filesystem sockets and unrelated endpoints stay independent.\n\nuse std::io;\nuse std::path::Path;\n#[cfg(not(any(unix, windows)))]\nuse std::pin::Pin;\n#[cfg(not(any(unix, windows)))]\nuse std::task::{Context, Poll};\n\n#[cfg(not(any(unix, windows)))]\nuse tokio::io::{AsyncRead, AsyncWrite, ReadBuf};\n\n#[cfg(any(all(test, unix), not(any(unix, windows))))]\nfn unsupported_backend_error() -> io::Error {\n    io::Error::new(\n        io::ErrorKind::Unsupported,\n        \"host-local transport is not implemented on this platform\",\n    )\n}\n\n/// A connected host-local byte stream.\n#[cfg(unix)]\npub use tokio::net::UnixStream as LocalStream;\n\n/// A connected Windows named-pipe stream.\n#[cfg(windows)]\npub use windows_backend::LocalStream;\n\n/// An unconstructable placeholder on hosts without a local transport backend.\n#[cfg(not(any(unix, windows)))]\n#[derive(Debug)]\npub struct LocalStream {\n    _private: (),","sourceCodeStart":10,"sourceCodeEnd":46,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-core/src/local_transport.rs#L10-L46","documentation":"Astrid's host-local transport has real backends only for Unix (Unix domain sockets) and Windows (named pipes). On any other target (or in the Unix test-only fallback path) every transport entry point returns io::ErrorKind::Unsupported with this message via unsupported_backend_error(). It signals that the requested host-local IPC operation cannot work on the current platform at all.","triggerScenarios":"Calling connect, connect_outcome, bind, accept, probe, or endpoint_is_present on the host-local transport while compiled for a platform that is neither unix nor windows.","commonSituations":"Building/running Astrid on an embedded or exotic OS target without a host-local IPC backend; a #[cfg] misconfiguration that disables both backends during cross-compilation.","solutions":["Build and run on a supported platform (unix or windows); there is no software fallback for host-local IPC","If cross-compiling is intentional, gate the code path that uses the host-local transport behind cfg(unix)/cfg(windows) or a feature flag","If you see this on Linux/macOS/Windows, check that a platform module (unix.rs / windows.rs) is actually compiled in and no cfg attribute is excluding it"],"exampleFix":"// before\nlet conn = transport.connect(&path).await?; // unsupported target\n// after\n#[cfg(any(unix, windows))]\nlet conn = transport.connect(&path).await?;\n#[cfg(not(any(unix, windows)))]\nreturn Err(otherwise_suitable_transport());","handlingStrategy":"fallback","validationCode":"#[cfg(any(unix, windows))]\nconst HOST_LOCAL_SUPPORTED: bool = true;\n#[cfg(not(any(unix, windows))]\nconst HOST_LOCAL_SUPPORTED: bool = false;","typeGuard":null,"tryCatchPattern":"match transport.connect(&path).await {\n    Err(e) if e.kind() == std::io::ErrorKind::Unsupported => {\n        // platform lacks host-local transport: use alternative IPC or abort\n    },\n    other => other?,\n}","preventionTips":["Only ship host-local transport usage on unix/windows targets","Gate IPC code behind cfg(any(unix, windows)) or a feature flag when cross-compiling","Add a CI build check on all targeted OSes so unsupported-platform builds surface early"],"tags":["io","platform","ipc","transport"],"backgroundTag":"unsupported-platform","analyzedSha":"affd8760f44190dbdfbec23403f4c4b642c33112","analyzedAt":"2026-09-09T21:28:12.402Z","contentChangedAt":"2026-09-09T21:28:12.402Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}