//! dream — SSH server library. Zig port of charmbracelet/wish. //! //! Phase 0: bind/accept loop, any-auth, single Handler. PTY metadata is //! plumbed through but no PTY allocation is performed server-side yet. //! //! Build requirement: libssh (>= 0.9) must be discoverable via pkg-config. //! On NixOS: `nix-shell -p libssh pkg-config`. pub const Server = @import("Server.zig").Server; pub const serve = @import("Server.zig").serve; pub const Session = @import("Session.zig"); pub const Handler = @import("Handler.zig"); pub const Options = @import("Options.zig"); pub const Context = @import("Context.zig"); pub const Pty = @import("Pty.zig").Pty; pub const Window = @import("Pty.zig").Window; pub const libssh = @import("libssh"); pub fn print(s: *Session, bytes: []const u8) !void { _ = try s.write(bytes); } pub fn println(s: *Session, bytes: []const u8) !void { _ = try s.write(bytes); _ = try s.write("\r\n"); } pub fn errorln(s: *Session, bytes: []const u8) !void { _ = try s.writeStderr(bytes); _ = try s.writeStderr("\r\n"); } pub fn fatal(s: *Session, bytes: []const u8) !void { try errorln(s, bytes); s.exit(1); } test { @import("std").testing.refAllDecls(@This()); }