summaryrefslogtreecommitdiff
path: root/src/manifest-format.stx
blob: f4d13e60c73b7f0e85decc98244d5607e8030f19 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
title: Manifest Format — Divina
meta_title: Manifest Format — Divina
---

## Rules

- All Divina manifests must be named `Divina.lua`
- Package manifests should be in a subdirectory
- A workspace manifest can only source package manifests

## Divina Exposed Globals

::: code lua

  --- @class Divina
  --- @field public version string Installed Divina version
  --- @field public Type table<string, number> Package type
  --- @field public Arch table<string, number> Architecture to compile for
  Divina = {
    version,
    Type = {
      Bin = 1,
      Lib = 2,
    },
    Arch = {
      x86 = 1,
      x64 = 2,
    },
  }

  --- @return void
  function test() end

## Workspace Manifest Format

::: code lua

  --- @class Workspace
  --- @field public members string[]
  Workspace = {
    members,
  }

## Package Manifest Format

::: code lua

  --- @class Package
  --- @field public name string
  --- @field public version string
  --- @field public description string
  --- @field public compile_options string[]
  --- @field public minimum_divina_version string
  --- @field public sources string[]
  --- @field public compiler string
  Package = {
    name,
    version,
    description,
    compile_options,
    minimum_divina_version,
    sources,
    type,
    arch,
    compiler,
  }