An implementation of the Gemini protocol for GNU Guile
Andrew Whatson 727a6381b8 Propagate runtime guile dependencies | 1 year ago | |
---|---|---|
example | 2 years ago | |
src | 1 year ago | |
test | 3 years ago | |
.dir-locals.el | 3 years ago | |
.envrc | 2 years ago | |
COPYING | 3 years ago | |
COPYING.LESSER | 3 years ago | |
README.md | 2 years ago | |
guix.scm | 1 year ago |
An implementation of the Gemini protocol for GNU Guile, using fibers and gnutls.
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
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"
Coming soon!
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
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.