Skip to content

Using Packages

Install a Package

sh
wyn pkg install sqlite

Or add to wyn.toml:

toml
[dependencies]
sqlite = "^1.0"

Then wyn pkg install to fetch all dependencies.

Import in Code

wyn
import sqlite

fn main() -> int {
    var db = Db.open(":memory:")
    Db.exec(db, "CREATE TABLE users (name TEXT)")
    return 0
}

Package Commands

sh
wyn pkg search <query>        # Search registry
wyn pkg info <name>           # Show details
wyn pkg install <name>        # Install latest
wyn pkg install <name>@<ver>  # Install specific version
wyn pkg uninstall <name>      # Remove
wyn pkg list                  # List installed
wyn pkg push                  # Publish your package

Official Packages

Wyn ships with 32 official packages including sqlite, redis, pg, gui, bcrypt, smtp, color, web, and more.

MIT License