An implementation of the Gemini protocol for GNU Guile

Andrew Whatson 727a6381b8 Propagate runtime guile dependencies hai 1 ano
example 2179115ef4 Support custom listen host/port for server examples %!s(int64=2) %!d(string=hai) anos
src 6d70c5dc6b Remove accidental doc-snarf hai 1 ano
test 36a6a81f6a Initial support for Gemini request/response protocol %!s(int64=3) %!d(string=hai) anos
.dir-locals.el 36a6a81f6a Initial support for Gemini request/response protocol %!s(int64=3) %!d(string=hai) anos
.envrc 1848f7a885 Update to use guix shell, fibers 1.1 %!s(int64=2) %!d(string=hai) anos
COPYING 7d0fff69de Add a readme and license %!s(int64=3) %!d(string=hai) anos
COPYING.LESSER 7d0fff69de Add a readme and license %!s(int64=3) %!d(string=hai) anos
README.md 1848f7a885 Update to use guix shell, fibers 1.1 %!s(int64=2) %!d(string=hai) anos
guix.scm 727a6381b8 Propagate runtime guile dependencies hai 1 ano

README.md

guile-gemini

An implementation of the Gemini protocol for GNU Guile, using fibers and gnutls.

Installation

This project provides a package definition for GNU Guix, making it easy to install from a cloned repository:

guix package -f path/to/guile-gemini/guix.scm

Development

This project provides a .envrc for direnv to simplify setting up a development environment, using the Guix package definition to automatically set up dependencies and paths when working in the project directory.

To enable direnv for this project (after installing direnv itself):

cd guile-gemini
direnv allow

If you would prefer to do things manually, the following will set up an equivalent environment:

cd guile-gemini
guix shell -Df guix.scm
export GUILE_LOAD_PATH="$PWD/src:$GUILE_LOAD_PATH"

Documentation

Coming soon!

Examples

Run the example server:

# Generate a self-signed certificate for host "localhost"
openssl req -x509 -newkey rsa:4096 \
 -keyout server-key.pem \
 -out server-cert.pem \
 -nodes -days 365 -subj /CN=localhost

# Run the server, listening on localhost:1965 by default
example/hello-world.scm --cert server-cert.pem --key server-key.pem

Make a request to the local server using the example client:

example/gem-fetch.scm localhost

The example client works on real-world Gemini URIs:

# Short URIs are supported
example/gem-fetch.scm gemini.circumlunar.space

# Full URIs are also supported
example/gem-fetch.scm gemini://gemini.circumlunar.space:1965/

The example client supports client certificates:

# Generate a self-signed certificate for user "Anonymous"
openssl req -x509 -newkey rsa:4096 \
 -keyout client-key.pem \
 -out client-cert.pem \
 -nodes -days 365 -subj /CN=Anonymous

# Request localhost using these credentials
example/gem-fetch.scm localhost -c client-cert.pem -k client-key.pem

License

This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/.

See COPYING and COPYING.LESSER for details.