An implementation of the Gemini protocol for GNU Guile

Andrew Whatson 727a6381b8 Propagate runtime guile dependencies 10 months ago
example 2179115ef4 Support custom listen host/port for server examples 2 years ago
src 6d70c5dc6b Remove accidental doc-snarf 1 year ago
test 36a6a81f6a Initial support for Gemini request/response protocol 3 years ago
.dir-locals.el 36a6a81f6a Initial support for Gemini request/response protocol 3 years ago
.envrc 1848f7a885 Update to use guix shell, fibers 1.1 2 years ago
COPYING 7d0fff69de Add a readme and license 3 years ago
COPYING.LESSER 7d0fff69de Add a readme and license 3 years ago
README.md 1848f7a885 Update to use guix shell, fibers 1.1 2 years ago
guix.scm 727a6381b8 Propagate runtime guile dependencies 10 months ago

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.