Package Manager

Overview

Jda includes a built-in package manager for installing and managing stdlib packages.

Commands

List Packages

jda pkg list

Shows all available standard library packages.

Install a Package

jda pkg install json

Downloads and installs the json package to your local stdlib directory.

Using Installed Packages

After installation, import packages in your code:

import "json"

fn main() -> i64 {
    let obj = json_parse("{\"name\":\"Jda\"}")
    let name = json_get_str(obj, "name")
    print(name)
    ret 0
}

Then compile with the include path:

jda build --include stdlib/json.jda program.jda -o program

Standard Library Location

Packages are stored in the stdlib/ directory of your Jda installation. Each package is a single .jda source file that gets compiled alongside your program.