spritely/goblins
4
58
Fork
You've already forked goblins
4
This is the Guile implementation of Spritely Goblins, a distributed object programming environment. Goblins provides an intuitive security model, automatic local transactions for locally synchronous operations, and an easy to use and efficient asynchronous programming for encapsulated objects which can live anywhere on the network. https://spritely.institute/goblins/
  • Scheme 98.2%
  • JavaScript 0.8%
  • Makefile 0.7%
  • M4 0.2%
Jessica Tallon 04b432118e
Some checks failed
/ no-tabs-please (push) Successful in -2m19s
/ unit-tests (push) Successful in -1m0s
/ distcheck (push) Failing after 13s
/ ocapn-test-suite (push) Successful in 15s
/ basic-hoot-check (push) Successful in -1m5s
Fix multiple aurie issues introduced in 0.17
There are several issues introduced:
- Aurie would take a full snapshot of the graph when it wasn't needed
and would not take one when it was needed. This fixes it so that a full
snapshot happens either when we have freshly spawned the vat, or when
we've upgraded the roots.
- make-actormap-read-portrait! had the refrs->val hashmap the wrong way
round (restoring gives you refrs->slots, not slots->refrs).
- Objects were not being properly added to the set of changes Objects
- The logic around if an object is marked as changed was inverted.
- the test in test-vat used #:restore which requires the definer to
tag the restored refr with a version to have upgrading work properly.
2025年12月29日 08:27:35 +01:00
.forgejo/workflows Don't use static port for OCapN CI runner 2025年09月15日 15:33:08 +02:00
build-aux Fix junit XML file 2025年02月28日 14:38:04 +01:00
doc Remove extra 'run' from greeter doc 2025年12月07日 06:21:20 -07:00
examples Allow setting syrup store and unix domain path for UDS server 2025年08月06日 15:29:42 +02:00
goblins Fix multiple aurie issues introduced in 0.17 2025年12月29日 08:27:35 +01:00
hoot-ffi Add basic local storage persistent store 2025年06月12日 15:21:58 +02:00
js Add slightly cursed goblins.js wrapper. 2025年02月19日 15:02:41 -05:00
misc Many many many spelling corrections 2025年09月18日 14:50:15 +02:00
pre-goblins Rename a OCapN node to a peer 2025年06月30日 15:28:50 +02:00
tests Fix multiple aurie issues introduced in 0.17 2025年12月29日 08:27:35 +01:00
.gitignore Add slightly cursed goblins.js wrapper. 2025年02月19日 15:02:41 -05:00
AUTHORS Add Jessica to AUTHORS 2022年06月24日 11:53:12 -04:00
bootstrap.sh Remove more appearances of hall 2022年05月19日 13:28:51 -04:00
ChangeLog Change references and links from gitlab to codeberg 2025年03月20日 14:15:18 +01:00
configure.ac Bump version to 0.17.0. 2025年10月15日 11:26:48 -04:00
COPYING Switch which file is license and which is symlink 2022年05月13日 12:42:45 -04:00
coverage.scm Replace tab indent with space in all .scm files 2024年04月08日 19:30:51 +02:00
goblins.scm Add procedure to convert between two persistence stores 2025年09月26日 19:54:44 +02:00
guix.scm Bump version to 0.17.0. 2025年10月15日 11:26:48 -04:00
HACKING Move hacking stuff into readme 2022年02月05日 18:15:00 -05:00
LICENSE.txt Switch which file is license and which is symlink 2022年05月13日 12:42:45 -04:00
live-guile.sh live-guile.sh: Export INSIDE_EMACS before launching Guile REPL. 2023年10月23日 12:45:43 -04:00
Makefile.am tests: actor-lib: Add methods to test suite. 2025年10月17日 14:07:15 -04:00
manifest.scm Add graphviz to Guix manifest. 2023年04月04日 11:51:02 -04:00
NEWS Add NEWS for 0.17.0 2025年10月13日 10:58:04 +02:00
pre-inst-env.in Remove hall, retain its bootstrapped files. 2022年05月19日 13:12:13 -04:00
README guile-hall boilerplate 2022年01月25日 14:57:36 -05:00
README.org Many many many spelling corrections 2025年09月18日 14:50:15 +02:00

Spritely Goblins

It is both Spritely's core distributed networked technology, and general enough to be used broadly.

Spritely, and Spritely Goblins, are developed under the stewardship of the Spritely Institute. Support Spritely!

Goblins is a distributed programming system with local transactions and following object capability security principles. See the manual for more details.

It's very early, so I'd caution against using it for anything "production-facing" quite yet. :)

Getting Goblins

Using a package manager

Goblins is available in the following distributions:

GNU Guix

guix install guile-goblins

Homebrew (MacOS)

brew tap aconchillo/guile
brew install guile-goblins

Building from a release tarball

If you're reading this file after downloading and extracting a release tarball, then these build instructions are for you!

Build requirements:

Additional runtime requirements:

  • Tor (any recent version) if you plan to use Onion netlayers

Goblins uses the GNU build system. Once the required dependencies have been installed, Goblins can be built by running the following commands:

 ./configure GUILE=$(which guile)
 make
 sudo make install

Note that ./configure uses a default prefix. You can check the load path with guile -c "(display %load-path)";. E.g. if this shows (/usr/local/share/guile/3.0 /usr/local/share/guile/site/3.0 /usr/local/share/guile/site /usr/local/share/guile), you can set the correct prefix with ./configure GUILE=$(which guile) --prefix=/usr/local.

Contributing

Checking out and building Goblins

By far the easiest way to hack on goblins is to develop using Guix.

First check out Goblins:

 cd /my/projects/dir/
 git clone https://codeberg.org/spritely/goblins.git
 cd goblins

Now we can use guix shell to make a useful environment for us to hack in, then run the autotools stuff.

 guix shell -m manifest.scm
 # In the guix environment, run:
 ./bootstrap.sh && ./configure && make check

If the tests pass, you're ready to go! You can now hack this project's files to your heart's content, whilst testing them from your guix environment.

(You can also run guix environment with --pure if it accidentally finds your system guile.)

Setup for hacking on Goblins

Editor setup

You're going to want/need:

Then, at minimum, you'll want to put in your .emacs:

(show-paren-mode 1) ; Match parentheses

However you probably also want some combination of:

Now you'll have a nice hacking setup! Be sure to read the Geiser manual.

Running Guile with the path setup right

Simply run:

 ./live-guile.sh

Follow the instructions at the top, which should look something like:

 ***********************************************
 ** Setting up Guile to listen on a socket... **
 ** **
 ** Connect in emacs via: **
 ** M-x geiser-connect-local <RET> **
 ** guile <RET> **
 ** /tmp/guile-goblins.sock <RET> **
 ***********************************************

Sounds like good advice! Give that a try!

TEMPORARY: Live hacking "fix"

The traditional way to hack Guile is to use Geiser, both evaluating from some foo.scm file/buffer with more "permanent" code via, for example, the C-x C-e / C-x C-b / C-x C-k commands to evaluate an expression, evaluate a whole buffer, or compile a buffer's content, and switching back and forth between that and the (usually called *Geiser Guile REPL*) experimental-hacking-and-debugging REPL.

This works with Goblins, but Geiser does some things to temporarily redirect output/error ports when doing the file/buffer oriented evaluation, and unfortunately this results in Goblins vats potentially breaking due to spawning a separate thread which inherit these temporarily redirected ports, which then are closed when the evaluation succeeds. We have a long-term plan to deal with this, but in the meanwhile, whenever you start a Guile / Geiser hacking session, first execute:

 > (use-modules (goblins))

... from the *Geiser Guile REPL*. Otherwise vats may mysteriously "hang". We know this is an annoyance! It'll be fixed soon!

Running test coverage

You should check any changes you make are tested. To help with this there is a coverage tool you can run. You can run it by:

guile -L `pwd` --debug coverage.scm

NB: if you do not specify the –debug flag, no coverage data will be generated.

This will generate a lcov.info file which you can then generate a coverage report using the `genhtml` command from the lcov tools (you may wish to look into the -o option as it generates lots of files). The coverage currently includes certain guile modules which you can ignore. E.g.

 mkdir /tmp/goblins-coverage
 genhtml -o /tmp/goblins-coverage/ lcov.info
 # There should now exist /tmp/goblins-coverage/index.html

OCapN Test suite

If you're working on anything related to OCapN in Goblins, it's good to ensure the test suite still passes. The test suite and how to run it is located here.

The test suite requires implementing certain objects and exporting them at specific sturdyrefs. This has been done for you and you can find those implementations within the misc/ocapn-test-suite.scm. To run this you should run:

 $ ./pre-inst-env guile misc/ocapn-test-suite.scm
Connect test suite to: <sturdyref>

This optionally allows you to specify the name of a netlayer to run on, so far the two names supported are tcp-testing-only and onion. The default when neither is specified is tcp-testing-only.

Copy the sturdyref it gives you and then in the OCapN test suite you can run it with this command:

 $ python3 test_runner.py --captp-version=goblins-0.16 <sturdyref>

Since this is using the tor onion netlayers, it is very slow, and typically takes many minutes to run all the tests.

/Note: the --captp-version=goblins-0.16 is important as goblins lists this as the CapTP version it uses. Since OCapN is currently in development, this allows goblins to differentiate between different goblins versions as the CapTP specification evolves./

A note on licensing

Spritely Goblins is released under Apache v2.

Note that this is not anti-copyleft positioning; copyleft is a viable strategy for preserving user freedom. In the case of Spritely, we are aiming for a wide adoption of ideas and protocols, so it's a different strategic choice.