pods

Publishing to pods

pods is the package registry for Ryn. A package is a Ryn project with a ryn.yaml and its sources under src/.

1. Describe the package

name: rynix
version: 0.2.0
owner: v3nn7
description: 3D, game, and multimedia library for Ryn
license: MPL-2.0
repository: https://github.com/rynlanguage/Rynix
keywords: [graphics, vulkan, window]
dependencies:
  othermath: 1.0.0

2. Get a token

Create an account with a username and password, then open your account to create a publishing token. Give it a name such as "My laptop". The token starts with pods_ and is shown only once, so copy it before leaving the page. Save it with:

ryn login pods_xxxxxxxxxxxxxxxx

The token is stored in your user configuration directory. RYN_TOKEN in the environment takes precedence, which is convenient for CI.

You can create separate tokens for different devices and revoke them from your account. Revoking a token immediately prevents further publishing with it. Your password is used only for website sign-in; the CLI uses tokens.

3. Publish

ryn publish

ryn publish checks the project, packs ryn.yaml, src/, and the README and license files into a .tar.gz (build output, .ryn/, and .git/ are left out), and uploads it. The first upload of a name makes you its owner.

Using packages

Add the package to dependencies in ryn.yaml:

dependencies:
  rynix: 0.2.0

Requirements follow Cargo: 0.2.0 and ^0.2.0 accept compatible updates (0.2.x), ~1.4.0 accepts 1.4.x, =1.4.2 is exact, and * is any release. ryn lock picks the newest matching version and pins it with its SHA-256 in ryn.lock; ryn build downloads and verifies the archive.

Yanking

A yanked version stays downloadable for projects that already lock it, but new lock files no longer select it.

curl -X DELETE -H "Authorization: Bearer $RYN_TOKEN" https://pods.ryn-lang.xyz/api/v1/packages/NAME/VERSION/yank

API

EndpointDescription
GET /api/v1/summaryCounts, newest and most downloaded packages
GET /api/v1/packages?q=&page=&per_page=&sort=Search (sort: relevance, downloads, new, updated)
GET /api/v1/packages/NAMEPackage metadata and all versions
GET /api/v1/packages/NAME/resolve?req=^0.2.0Newest non-yanked version matching a requirement
GET /api/v1/packages/NAME/VERSION/downloadThe .tar.gz archive; X-Checksum-Sha256 carries its hash
PUT /api/v1/packages/newPublish (body: .tar.gz, header Authorization: Bearer TOKEN)
DELETE /api/v1/packages/NAME/VERSION/yankYank a version
PUT /api/v1/packages/NAME/VERSION/unyankUndo a yank
PUT /api/v1/packages/NAME/ownersAdd owners: {"users": ["login"]}