-1

I've tried asdf:make, but the build system feels too much like C to me. I'm looking for something more like Rust's Cargo or C++ Ninja where it's more or less a little hassle.

I stumbled on to Roswell and thought it was great after writing a few test scripts in it.

I think it would be great if I could just package my dependencies with the compiled binary produced by Roswell as well. I looked at the documentation and I cant seem to find it anywhere?

TLDR: How do I include dependencies using Roswell?

shadowtalker
  • 12,529
  • 3
  • 53
  • 96
  • did you try quicklisp? – coredump Jul 20 '22 at 14:24
  • I was going to write an answer but you might want to read: https://towardsdatascience.com/how-to-set-up-common-lisp-ide-in-2021-5be70d88975b – coredump Jul 20 '22 at 14:45
  • 1
    You declare them in the .asd as normal and then you build the binary, with or without Roswell. Any binary includes the dependencies. I suggest to learn the default way and then only to build with Roswell (it adds a layer of indirection). https://lispcookbook.github.io/cl-cookbook/scripting.html – Ehvince Jul 20 '22 at 22:06
  • 1
    See my project skeleton that can use Roswell to build a binary: https://github.com/vindarel/cl-cookieproject – Ehvince Jul 20 '22 at 22:10
  • What was it about `asdf:make` that made it seem like a hassle? It's literally an all-in-one build too, much more like Cargo than Make. – shadowtalker Jul 28 '22 at 22:49

1 Answers1

1

The answer to this question is that you don't, without other tools. Roswell is not neither a build system nor a library manager.

Roswell does include ASDF, which is the ubiquitous Common Lisp build system. I don't know exactly what your disagreement is with asdf:make, but I insist that it's already much more like Cargo than Make.

The difference is that Cargo happens to be both a build tool and library manager. ASDF is only a build tool, and you need to use a different tool for library management.

Regarding ASDF make being a hassle, that does not match at all with my personal experience. If you can describe what about it felt like a hassle, then perhaps you can get more directed advice. If the hassle was that of library management (manually fetching tarballs, cloning Git repos, ... yuck!), then keep reading!

Fortunately, Roswell also includes the Quicklisp library manager. It does not by default handle "project-local" dependencies like in NPM or Ruby Bundler, but it does a great job of fetching and installing libraries and their dependencies from the Quicklisp library repository. You can assume that Quicklisp will be present whenever you run a script with Roswell, so you should feel free to use it to manage dependencies for your scripts.

There is not currently a tool that I know of which combines both functionality into one for Common Lisp. Therefore you should use ASDF for building standalone executables of your program, and you can use Quicklisp for fetching and installing dependent libraries.

There are two other tools that can help you manage dependencies in your Common Lisp projects:

  • Qlot can install dependencies that are local to a specific project, so you can have different versions of a given library in different projects, if needed..
  • CLPM is similar to Qlot, but perhaps a bit more "tidy" and thorough in its design. It can install packages globally, without being scoped to a specific project, and it also is promoting a package metadata format called CLPI as an alternative to the way Quicklisp does things.
shadowtalker
  • 12,529
  • 3
  • 53
  • 96