Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Magnet vs. Quark

Features

FeatureMagnetlegacy-Quark
Manages binaries such as server plugins?YesNo
Isolated environments?AutomaticallyManually through sclang_conf.yaml
Environments are reproducible?YesNo, dependency resolution of Quarks is not working correctly
Sharing environments through code?YesLimited to Quarks. Additionally not stable because dependencies are not pinned
How packages are published?Packages are published via an index which gets mirrored to a git repositoryVia directory.txt in the quarks git repo
De-centralized?No, but custom indices are supportedPartially, because it is indefinied tied to GitHub repository quarks git repo
Works without sclang interpreter?Yes, environment are managed via a toml fileNo, inspecting a quark file requires the interpreter
Requires additional programs beyond sclang?Yes, requires magnet binaryYes, requires git to be installed on the system
Is supported in wasm environments?YesNo, git is not available in browser and GitHub has Cross Origin restrictions, so downloading artifacts within a tab is not possible

Why not extend the existing Quarks system?

Currently, SuperCollider distributes additional Classes via Quarks, where the package format and its manager share the same name. Quarks suffer from the following problems, which all of them are resolved in magnet:

  • Quarks only cover sclang classes and do not manage binaries (i.e. server extensions and future sclang plugins)
  • Dependencies are not resolved properly, i.e. their version range is not respected. This is a design flaw of Quarks since there is no global index which tracks which versions are available at which location.
  • The manifest file .quark is written as a sclang dictionary, so every time one needs to reliably access information it is necessary to spin up a sclang interpreter which can be non-trivial in some environments. At the same time its content of the manifest is never verified, resulting in possible broken behavior and allowing for malicious activity.
  • Quarks depends on git, but git is not provided by SuperCollider. This creates an additional barrier for new users.

This makes the legacy Quarks system not as useful, easy and reliable as it should be for archiving, sharing and developing SuperCollider projects.

Legacy quarks can be used within magnet without problems, though Quark maintainers are invited to port their legacy quarks to the magnet index. For backwards compatibility, see Installing legacy quark dependencies.