FUTHARK-PKG(1)

πŸ“¦
version 0.25.32 Β· 5 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– FUTHARK-PKG(1) πŸ’–

okay bestie, welcome to the Futhark manual page for futhark-pkg β€” she's the package manager vibe curator for your Futhark projects, and honestly? she's iconic. let's get into it. πŸŽ€


✨ NAME ✨

futhark-pkg β€” manage Futhark packages 🫢


🌸 SYNOPSIS 🌸

futhark pkg add PKGPATH [X.Y.Z]

futhark pkg check

futhark pkg init PKGPATH

futhark pkg fmt

futhark pkg remove PKGPATH

futhark pkg sync

futhark pkg upgrade

futhark pkg versions

like... look at her. so many little moves. each one is a slay in its own way. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this tool? she's here to modify the package manifest (that's the futhark.pkg file, bestie) and download all the packages it's asking for. that's the whole job. that's the assignment.

real talk though: futhark pkg is NOT a build system. she will not compile your code for you. you still gotta take your Futhark code to the usual compilers like a grown-up. the only purpose of futhark pkg is to download code (and do other lil package-management utility tasks). and btw, this manpage is not a general intro to package management in Futhark β€” for that you want the User's Guide. iykyk. πŸ“–


so here's the tea on where she's allowed to touch stuff: the futhark pkg subcommands will modify only two locations in the file system (relative to the current working directory):

  • the futhark.pkg file
  • the contents of lib/

when she's modifying lib/, futhark pkg builds the new version over in lib~new/ and backs up the old version in lib~old. so if futhark pkg ever fails for literally any reason, you can recover the old state by moving lib~old back. your safety net, bestie. 🫢 and those temporary directories? they get erased the moment futhark pkg finishes without errors. clean girl aesthetic. ✨

important: futhark pkg sync and futhark pkg init are the only subcommands that actually modify lib/. all the others only modify futhark.pkg, which means you have to manually run futhark pkg sync afterwards. don't forget, or you'll be staring at your terminal like πŸ§β€β™€οΈ

most commands take a -v/--verbose option, and that makes futhark pkg write running diagnostics to stderr. chatty queen. πŸ’¬


packages must correspond to Git repositories, and every single interaction happens by invoking git. no git, no vibes. 🌈


πŸ‘‘ COMMANDS πŸ‘‘

futhark pkg add PKGPATH [X.Y.Z]

add the specified package of the given minimum version as a requirement to futhark.pkg. if you don't hand her a version, she grabs the newest one. and if the package is already required in futhark.pkg, the new version requirement replaces the old one. out with the old, in with the new. πŸ’…

lowkey important: adding a package does not automatically download it. run futhark pkg sync to actually do that. the way that add β‰  download... truly a plot twist.

futhark pkg check

verify that the futhark.pkg is valid, and that all required packages are available in the indicated versions. ✨

but wait β€” this command does not check that those versions contain well-formed code. she's checking vibes (existence, versions), not quality. πŸ’€ and if a package path is defined in futhark.pkg, she also checks that .fut files are located at the expected location in the file system. thorough-ish!

futhark pkg init PKGPATH

create a new futhark.pkg defining a package with the given package path, and initially no requirements. a fresh start. a clean slate. main character origin story. 🌱

futhark pkg fmt

reformat the futhark.pkg file, while retaining any comments. she does not erase your little notes, she respects them. πŸŽ€

futhark pkg remove PKGPATH

remove a package from futhark.pkg. does not remove it from the lib/ directory. so like... she's gone from the manifest but still physically present. ghosting, but make it filesystem. πŸ™ˆ

futhark pkg sync

populate the lib/ directory with the packages listed in futhark.pkg.

⚠️ WARNING WARNING WARNING ⚠️ this will delete everything in lib/ that does not relate to a file listed in futhark.pkg, as well as any local modifications. any. local. modifications. gone. back up your stuff, bestie, i am begging you. 😭

futhark pkg upgrade

upgrade all package requirements in futhark.pkg to the newest available versions. glow-up for your whole dependency list. πŸ”₯

futhark pkg versions PKGPATH

print all available versions for the given package path. window shopping, but for versions. πŸ›οΈ


🧚 COMMIT VERSIONS 🧚

okay so here's a fun one: you can use futhark pkg with packages that haven't made proper releases yet. how? via pseudoversions of the form:

0.0.0-yyyymmddhhmmss+commitid

now listen β€” the timestamp is not verified against the actual commit. it's not doing a background check on it or anything. what the timestamp does do is make sure that newer commits take precedence if multiple packages depend on a commit version for the same package. so it's basically a tiebreaker. βš–οΈ

if futhark pkg add is given a package with no releases, the most recent commit will be used. in that case, the timestamp is merely set to the current time. "now" energy. πŸ•

fr fr read this part: commit versions are awkward and fragile, and you should not rely on them. issue proper releases (even experimental 0.x version) as soon as feasible. and here's the thing β€” released versions also always take precedence over commit versions, since any version number will be greater than 0.0.0. so like, just release it. you'll thank yourself. πŸ’œ

🌈 EXAMPLES 🌈

okay bestie, storytime. let's create a new package that will be hosted at https://github.com/sturluson/edda:

futhark pkg init github.com/sturluson/edda

now add a package dependency:

futhark pkg add github.com/sturluson/hattatal

download the dependencies:

futhark pkg sync

and then you're ready to start hacking! βœ¨πŸŽ‰

(except that these packages do not actually exist. πŸ’€ sorry bestie, they're fictional. the vibes are real, the repos are not.)


πŸ’€ BUGS πŸ’€

  • since the lib/ directory is populated with transitive dependencies as well, it is possible for a package to depend unwittingly on one of the dependencies of its dependencies, without the futhark.pkg file reflecting this. sneaky sneaky. πŸ₯·
  • there is no caching of package metadata between invocations, so the network traffic can be rather heavy. your wifi is gonna feel it. πŸ“‘πŸ˜­

🫢 SEE ALSO 🫢

  • futhark-test <#futhark-test-1>
  • futhark-doc <#futhark-doc-1>

2013-2020, DIKU, University of Copenhagen β€” shoutout to the legends. πŸ‘‘


and that's a wrap, bestie!! this whole page was written for Futhark version 0.25.32, dated Mar 11, 2026. go forth, manage those packages, and remember: sync before you check. periodt. πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from