Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions pkgs/o/openkal-linux.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
-- openkal-linux --- the reference implementation.
--
-- No `deps`. The implementation uses the C library of the host, which mcpp
-- already supplies for a hosted target; nothing further is required.
--
-- The package is listed for every platform because a descriptor's platform
-- table describes availability rather than applicability. A project selects
-- this implementation with a conditional dependency on `cfg(os = "linux")`,
-- and a project that selects it elsewhere fails at compile time, which is the
-- correct place for that failure.
package = {
spec = "1",
namespace = "mcpplibs",
name = "openkal-linux",
description = "The reference implementation of openkal for Linux, maintained as a worked example",
licenses = {"Apache-2.0"},
repo = "https://github.com/mcpplibs/openkal-linux",
type = "package",

xpm = {
linux = {
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-linux/archive/refs/tags/0.1.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-linux/releases/download/0.1.0/openkal-linux-0.1.0.tar.gz",
},
sha256 = "ea00efa54c5bb3f62b29a9cfd5c8f8f3f32d8ddc6a1da75477893e2c7aca7223",
},
},
macosx = {
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-linux/archive/refs/tags/0.1.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-linux/releases/download/0.1.0/openkal-linux-0.1.0.tar.gz",
},
sha256 = "ea00efa54c5bb3f62b29a9cfd5c8f8f3f32d8ddc6a1da75477893e2c7aca7223",
},
},
windows = {
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-linux/archive/refs/tags/0.1.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-linux/releases/download/0.1.0/openkal-linux-0.1.0.tar.gz",
},
sha256 = "ea00efa54c5bb3f62b29a9cfd5c8f8f3f32d8ddc6a1da75477893e2c7aca7223",
},
},
},

-- The package's own manifest, inside the tarball's wrap directory.
mcpp = "*/mcpp.toml",
}
50 changes: 50 additions & 0 deletions pkgs/o/openkal.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
-- openkal --- the specification package.
--
-- Form A because the package is described by its own mcpp.toml.
--
-- No `deps`. This package declares and does not define; it needs neither a
-- toolchain payload nor a target sysroot, and the implementation that supplies
-- the definitions is selected by the consuming project as a conditional
-- dependency rather than by this descriptor.
package = {
spec = "1",
namespace = "mcpplibs",
name = "openkal",
description = "openkal: a portable kernel ABI specification, and the C++ modules that declare it",
licenses = {"Apache-2.0"},
repo = "https://github.com/mcpplibs/openkal",
type = "package",

xpm = {
linux = {
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal/archive/refs/tags/0.1.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal/releases/download/0.1.0/openkal-0.1.0.tar.gz",
},
sha256 = "81952cf4c608cb7ffe4f01c01b0d28a6c606f28ea30b2840de33834917c54f36",
},
},
macosx = {
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal/archive/refs/tags/0.1.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal/releases/download/0.1.0/openkal-0.1.0.tar.gz",
},
sha256 = "81952cf4c608cb7ffe4f01c01b0d28a6c606f28ea30b2840de33834917c54f36",
},
},
windows = {
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal/archive/refs/tags/0.1.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal/releases/download/0.1.0/openkal-0.1.0.tar.gz",
},
sha256 = "81952cf4c608cb7ffe4f01c01b0d28a6c606f28ea30b2840de33834917c54f36",
},
},
},

-- The package's own manifest, inside the tarball's wrap directory.
mcpp = "*/mcpp.toml",
}
41 changes: 31 additions & 10 deletions pkgs/r/riscv-virt-rt.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
-- link against nothing. Pointing at the manifest moves the root inside the
-- wrap layer, where both the manifest and the program live.
--
-- ⚠️ `deps` is at the xpm PLATFORM level, not in the mcpp segment. The two
-- entries are xim packages (an emulator and a target sysroot), not mcpp
-- packages, so they travel on xim's install-time dependency edge. This matters
-- more than it looks: mcpp materializes `[xlings] deps` for the ROOT project
-- only, so a consumer that just runs `mcpp add riscv-virt-rt` would otherwise
-- get the board package with neither a libc nor an emulator, and find out at
-- build.mcpp time.
-- ⚠️ `deps` names the EMULATOR and nothing else. The target's C library is not
-- here because it is not this package's: mcpp resolves it from the target's
-- own row, the way it resolves the compiler. What is left is the one xim
-- package that really is a board fact — how to run an image — and it is at the
-- xpm PLATFORM level because mcpp materializes `[xlings] deps` for the ROOT
-- project only, so a consumer running `mcpp add riscv-virt-rt` would otherwise
-- get a board package with no way to start it.
package = {
spec = "1",
namespace = "mcpplibs",
Expand All @@ -30,7 +30,7 @@ package = {
-- published is a version someone may have pinned.
xpm = {
linux = {
deps = { "xim:picolibc-riscv@1.8.12", "xim:qemu-riscv@9.2.4-1" },
deps = { "xim:qemu-riscv@9.2.4-1" },
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/riscv-virt-rt/archive/refs/tags/0.1.0.tar.gz",
Expand All @@ -45,9 +45,16 @@ package = {
},
sha256 = "79f1dc4415a59ba828048eb8706322957723f8a6fd84bde3faba6a377e48242b",
},
["0.3.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/riscv-virt-rt/archive/refs/tags/0.3.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/riscv-virt-rt/releases/download/0.3.0/riscv-virt-rt-0.3.0.tar.gz",
},
sha256 = "71fc43daa4903d4f3037c204bd2b3be9aea56371b123a4529cc8c0c8c9b7f525",
},
},
macosx = {
deps = { "xim:picolibc-riscv@1.8.12", "xim:qemu-riscv@9.2.4-1" },
deps = { "xim:qemu-riscv@9.2.4-1" },
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/riscv-virt-rt/archive/refs/tags/0.1.0.tar.gz",
Expand All @@ -62,9 +69,16 @@ package = {
},
sha256 = "79f1dc4415a59ba828048eb8706322957723f8a6fd84bde3faba6a377e48242b",
},
["0.3.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/riscv-virt-rt/archive/refs/tags/0.3.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/riscv-virt-rt/releases/download/0.3.0/riscv-virt-rt-0.3.0.tar.gz",
},
sha256 = "71fc43daa4903d4f3037c204bd2b3be9aea56371b123a4529cc8c0c8c9b7f525",
},
},
windows = {
deps = { "xim:picolibc-riscv@1.8.12", "xim:qemu-riscv@9.2.4-1" },
deps = { "xim:qemu-riscv@9.2.4-1" },
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/riscv-virt-rt/archive/refs/tags/0.1.0.tar.gz",
Expand All @@ -79,6 +93,13 @@ package = {
},
sha256 = "79f1dc4415a59ba828048eb8706322957723f8a6fd84bde3faba6a377e48242b",
},
["0.3.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/riscv-virt-rt/archive/refs/tags/0.3.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/riscv-virt-rt/releases/download/0.3.0/riscv-virt-rt-0.3.0.tar.gz",
},
sha256 = "71fc43daa4903d4f3037c204bd2b3be9aea56371b123a4529cc8c0c8c9b7f525",
},
},
},

Expand Down
56 changes: 56 additions & 0 deletions pkgs/s/std-freestanding.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
-- std-freestanding — the freestanding subset of the C++ standard library.
--
-- Form A because the package ships a `build.mcpp`, which mcpp looks for at the
-- package ROOT: Form B would leave it one level down inside the tarball's wrap
-- directory, unfound, and the package would resolve and compile and then link
-- against nothing.
--
-- ⚠️ NO `deps`, and that is the design. This package needs libc++'s headers
-- and the target's C headers, and it gets both by ASKING mcpp
-- (`mcpp::toolchain_dir()`, and the target's libc which mcpp already puts on
-- the compile line) rather than by declaring who provides them. Declaring
-- pinned it to one standard-library implementation, one C library, one
-- architecture and one version of each — none of which it has any business
-- knowing about.
package = {
spec = "1",
namespace = "mcpplibs",
name = "std-freestanding",
description = "The freestanding subset of the C++ standard library as one module — import mcpplibs.std.freestanding",
licenses = {"Apache-2.0"},
repo = "https://github.com/mcpplibs/std-freestanding",
type = "package",

xpm = {
linux = {
["0.2.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/std-freestanding/archive/refs/tags/0.2.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/std-freestanding/releases/download/0.2.0/std-freestanding-0.2.0.tar.gz",
},
sha256 = "c0026e6aa85d207b3dd00c3f2fe2674174c2e25d86a162f64fe70742420efb00",
},
},
macosx = {
["0.2.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/std-freestanding/archive/refs/tags/0.2.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/std-freestanding/releases/download/0.2.0/std-freestanding-0.2.0.tar.gz",
},
sha256 = "c0026e6aa85d207b3dd00c3f2fe2674174c2e25d86a162f64fe70742420efb00",
},
},
windows = {
["0.2.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/std-freestanding/archive/refs/tags/0.2.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/std-freestanding/releases/download/0.2.0/std-freestanding-0.2.0.tar.gz",
},
sha256 = "c0026e6aa85d207b3dd00c3f2fe2674174c2e25d86a162f64fe70742420efb00",
},
},
},

-- The package's own manifest, inside the tarball's wrap directory.
mcpp = "*/mcpp.toml",
}
Loading