{"record":{"id":"ae79bdd370820e84","repo":"neovide/neovide","slug":"unix-domain-sockets-and-named-pipes-are-not-suppor","errorCode":null,"errorMessage":"Unix Domain Sockets and Named Pipes are not supported on this platform","messagePattern":"Unix Domain Sockets and Named Pipes are not supported on this platform","errorType":"exception","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"src/bridge/session.rs","lineNumber":208,"sourceCode":"        } else {\n            #[cfg(unix)]\n            return Ok(Self::split(tokio::net::UnixStream::connect(address).await?));\n\n            #[cfg(windows)]\n            {\n                // Fixup the address if the pipe on windows does not start with \\\\.\\pipe\\.\n                let address = if address.starts_with(\"\\\\\\\\.\\\\pipe\\\\\") {\n                    address\n                } else {\n                    format!(\"\\\\\\\\.\\\\pipe\\\\{address}\")\n                };\n                Ok(Self::split(\n                    tokio::net::windows::named_pipe::ClientOptions::new().open(address)?,\n                ))\n            }\n\n            #[cfg(not(any(unix, windows)))]\n            Err(Error::new(\n                ErrorKind::Unsupported,\n                \"Unix Domain Sockets and Named Pipes are not supported on this platform\",\n            ))\n        }\n    }\n\n    #[cfg(not(target_os = \"windows\"))]\n    fn forward_stdin(&self) -> Option<rustix::fd::OwnedFd> {\n        use rustix::fs::{FileType, fstat};\n        use std::os::fd::AsFd;\n\n        // stdin should be forwarded only in embedded mode when stdio is piped or redirected\n        match self {\n            Self::Embedded(..) => {\n                let stdin = std::io::stdin();\n                let should_forward = fstat(stdin.as_fd())\n                    .map(|stat| match FileType::from_raw_mode(stat.st_mode) {\n                        FileType::RegularFile => true,","sourceCodeStart":190,"sourceCodeEnd":226,"githubUrl":"https://github.com/neovide/neovide/blob/ade2d9cda777879975b1852f77dc672f5ff43b78/src/bridge/session.rs#L190-L226","documentation":"connect_to_server supports connecting to nvim via Unix Domain Sockets (unix) or Windows Named Pipes (windows); on any other platform it returns an ErrorKind::Unsupported error because no transport is implemented. The error is a compile-time-configured capability guard, not a runtime failure of the connection itself.","triggerScenarios":"Calling connect_to_server on a platform where neither `unix` nor `windows` cfg attributes are active (e.g. wasm32 or other exotic targets), so the cfg(not(any(unix, windows))) arm is compiled in and hit.","commonSituations":"Cross-compiling or embedding Neovide's bridge code for wasm/unsupported OS targets; running test suites under an unusual target triple; porting the bridge to a new OS.","solutions":["Build/run on a supported platform (Linux/macOS/BSD with UDS, or Windows with named pipes)","If targeting a new platform, implement the corresponding transport in connect_to_server behind its own cfg arm","Avoid compiling the bridge for unsupported targets, or cfg-gate out callers of connect_to_server for them"],"exampleFix":"// before\ntarget_env = \"wasm32\"  // connect_to_server -> Unsupported\n// after\n// build for a supported target\ncargo build --target x86_64-unknown-linux-gnu","handlingStrategy":"fallback","validationCode":"#[cfg(any(unix, windows))]\nfn supported() -> bool { true }\n#[cfg(not(any(unix, windows)))]\nfn supported() -> bool { false }\n\nif !supported() {\n    eprintln!(\"bridge requires unix (UDS) or windows (named pipes)\");\n    std::process::exit(1);\n}","typeGuard":null,"tryCatchPattern":"match connect_to_server(addr).await {\n    Ok(session) => session,\n    Err(e) if e.kind() == std::io::ErrorKind::Unsupported => {\n        // fall back to TCP-based nvim connection (--listen) or abort gracefully\n        connect_to_tcp_fallback(addr).await?\n    }\n    Err(e) => return Err(e.into()),\n}","preventionTips":["cfg-gate bridge usage to unix/windows targets in Cargo.toml and code","Test builds for all target triples used in CI","Prefer a TCP nvim --listen fallback on platforms without UDS/named pipes"],"tags":["unsupported-platform","cross-platform","uds","named-pipes"],"backgroundTag":"unsupported-platform","analyzedSha":"ade2d9cda777879975b1852f77dc672f5ff43b78","analyzedAt":"2026-09-06T04:14:57.389Z","contentChangedAt":"2026-09-06T04:14:57.389Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}