Nestling: a pijul frontend a la cgit


As some of you may have noticed, I have started to work on a pijul frontend “a la cgit” a few days ago. You can found it on the Nest and I am planning to use the Nestling to browser the Nestling as soon as possible (this is so meta).

Of course, the Nestling is not an opponent of any sort of the Nest, which still is the best tool available to collaborate to write a software with pijul. The Nestling is a read-only front-end and nothing more.

Current Features


The server is written in Rust using rocket.

  • ndrc.toml file for configuration
  • One server, multiple repositories
  • Several GET routes
    • one to get the list of repositories
    • one to get the list of branches of a given repo
    • one to get the list of patch hashes of a given branch of a given repo
    • one to get the patch info of a given hash


The webUI is written in Purescript using Halogen.

  • A view to list the patches of a repository, with a branch selector
    • Rely on avatar to display a picture of an author
    • A patch can be selected to display only its dependencies

Future Work

There are still a lot of work to do. Before a first v0.1, I am planning to add a view to list the repositories and a view to visualize a patch alone. In a v0.2, I will tackle files browsering. Then, I intend to play a little with metrics of all sort.

The project is GPL3, so if you’d like to contribute, feel free to ping me on the #pijul irc channel.


Patch Dependencies


I just updated the nestling README. You now have a how-to setup a nestling instance.


So I just did pijul clone laumann@nest.pijul.org:lthms/nestling (no problems there) and did:

$ make
make[1]: Entering directory `/home/tj/pijul/nestling/nestlingd'
../print.mk:3: *** commands commence before first target.  Stop.
make[1]: Leaving directory `/home/tj/pijul/nestling/nestlingd'
make: *** [daemon] Error 2

I have all dependencies (AFAICT) - what am I missing?


If I uncomment the include ../print.mk line in nestlingd/Makefile it seems to work…

EDIT: Also in nestling-ui/Makefile. Maybe my problem a too old make (I’m on 3.81)?


Does it work if you call make from the the root of the repository?


No, that’s what didn’t work. Just removing the include ../print.mk lines made it work though (and I needed to install bower)


That’s strange, I will need to investigate somehow. That being settled, you were able to make it work?


My version of make may be too old (3.81). I got it running, but having some trouble with the cross-site thing - I tried Firefox and Chromium (the former with the CorsE add-on), but no luck so far.

Otherwise both the UI and backend seem to be running nicely :slight_smile:


Screenshot of nestling running on my machine

I still need to figure out the XSS/CORS thing…


Can you copy paste both your ndrc.toml and you api-infos.json?




title = "My Nest"

name = "nestling"
path = ".."

and api-infos.json:

  "base": "http://localhost",
  "port": 8000,
  "mount": ""

And what does the javascript console say?


The console

BranchSelector: fetching branches now
PatchesList: fetching patches now
:8001/#r/nestling/branch/master:1 XMLHttpRequest cannot load http://localhost:8000/repository/nestling/branches. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8001' is therefore not allowed access.
Uncaught Error: AJAX request failed: GET http://localhost:8000/repository/nestling/branches
    at XMLHttpRequest.xhr.onerror (nestling.js:10842)
:8001/#r/nestling/branch/master:1 XMLHttpRequest cannot load http://localhost:8000/repository/nestling/branch/master/patches. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8001' is therefore not allowed access.

Sorry for the late response.

I am pretty sure you have an issue which is CORS-related. This is really annoying and I really need to dig this. For the record, I have cleaned my repository on the nest. I had some issue with duplicated patches and probably vicious unrecords but everything is fine now.

Hope I will be able to make some progress on nestling really soon.