JanetDocsSourcePlaygroundTutorialsI'm Feeling luckyCommunityGitHub sign in

Janet Packaging

project.janet & jpm ("legacy bundles")

A self-contained unit of Janet source code as recognized by jpm is called a project. A project is a directory containing a project.janet file, which contains build recipes. Often, a project will correspond to a single git repository, and contain a single library. However, a project's project.janet file can contain build recipes for as many libraries, native extensions, and executables as it wants. Each of these recipes builds an artifact. Artifacts are the output files that will either be distributed or installed on the end-user or developer's machine.

project.janet format is informal and is just a slightly modified janet script - bakpakin

Absolute minimum requirement is (declare-project :name "blah").

Spork has a pretty complicated project.janet file.

Here is an example which builds the legacy project.janet from the modern bundle's info.jdn.

In project.janet, I think and (declare-project :name ...) are the minimal requirements, and ... everything else is not significant to the tooling (e.g. license or version)?


jpm is currently used by the vast majority of projects.

Clojure's leinigen inspired jpm but Bakpakin et al. find jpm's declarative pproach wanting, so it's being replaced with janet-pm and modern bundles resembling Clojure's tools.build where "your build is a program" (which Zig also likes) - but you have to write that program:

The philosophy behind tools.build is that your project build is inherently a program - a series of instructions to create one or more project artifacts from your project source files. We want to write this program with our favorite programming language, Clojure, and tools.build is a library of functions commonly needed for builds that can be connected together in flexible ways. Writing a build program does take a bit more code than other declarative approaches, but can be easily extended or customized far into the future, creating a build that grows with your project.

Modern Bundles

janet-pm is spork/pm

janet-pm seems to use :jpm-dependencies and :dependencies at points

Jeep builds on top of modern bundles (instead of? or on top of janet-pm?) For Jeep, in info.jdn these fields are significant: