Sula is a newly released server for the Gemini protocol, developed using Scryer Prolog. The name 'Sula' is derived from the Spanish word for 'capsule' suffix, 'Cápsula'. This implementation offers a unique approach to serving Gemini content by leveraging the capabilities of Prolog.
Sula depends on a specifically patched version of Scryer Prolog. These patches include a native '$copy_stream'/2 builtin for streaming binary data without materializing it on the Prolog heap, a fix for 'library(pio)' to ensure lazy reads from process pipes terminate on EOF, and a non-blocking poll loop in 'socket_server_accept'/4 to allow SIGINT to be caught as an exception. Additionally, 'rustls' is used for TLS, and 'openssl' must be available on the system PATH for certificate validation.
Sula incorporates several features for robust Gemini serving. It uses 'rustls' for TLS and supports PKCS#12 identity files. Hostname verification is performed at startup by checking the certificate's Common Name (CN) against the configured hostname using 'openssl'. Content negotiation is handled by file extension, parsing '/etc/mime.types' and adding 'text/gemini' for '.gmi' files. Text responses are sent via 'format/3', while binary responses are streamed directly using 'copy_stream/2' to avoid Prolog heap traffic. The server also includes per-connection error handling and graceful shutdown on SIGINT.
The 'sula.pl' script is a polyglot launcher that detects 'scryer-prolog' on the PATH and executes it with 'sula:run, halt' as the entry goal. Users can specify the address, hostname, content directory, and certificate directory via command-line arguments. The server is designed for clean shutdown, closing the listening socket and exiting with a 0 status upon receiving Ctrl+C.
✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →
One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.
One email a day. Unsubscribe in one click, any time.
Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.
▶ Play today's briefNew every morning, and the back catalogue is archived by date.
Sula is a new server implementation for the Gemini protocol, written in Scryer Prolog, requiring a patched version of Scryer Prolog for specific functionalities like non-blocking I/O and efficient binary streaming. This development provides an alternative server option for the Gemini protocol, potentially appealing to developers interested in Prolog-based network services.