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
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,20 @@ jobs:
test -n "$objs" || { echo "no objects were found" >&2; exit 1; }
bash .spec/tools/check-surface.sh --complete .spec/SURFACE.txt $objs

# The array in mcpp.toml is a declaration, and a declaration is
# checked rather than trusted. The check is the comparison above
# stopped one step earlier: the walk that decides whether each group
# is exported whole already answers which interfaces this
# implementation provides, so regenerating and diffing is the same
# derivation rather than a second one.
bash .spec/tools/check-surface.sh --toml .spec/SURFACE.txt $objs > /tmp/derived.toml
awk '/^provides-interfaces = \[/{p=1} p{print} /^\]/{if(p)exit}' mcpp.toml > /tmp/declared.toml
if ! diff -u /tmp/declared.toml /tmp/derived.toml; then
echo "::error::mcpp.toml's provides-interfaces disagrees with the artefact"
exit 1
fi
echo " ok the declaration is the artefact's own answer"

# The property this implementation exists to have. A program above openkal
# may supply a C runtime of its own; an implementation that reached for
# this environment's would have its calls resolve to the program's, and
Expand Down
46 changes: 45 additions & 1 deletion mcpp.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
namespace = "mcpplibs"
name = "openkal-windows"
version = "0.9.0"
version = "0.10.0"
description = "An implementation of openkal for Windows, written on the Win32 interfaces and the object manager beneath them, using no C runtime symbol."
license = "Apache-2.0"

Expand All @@ -17,6 +17,50 @@ provides = ["mcpp:kernel-abi=openkal"]
authors = ["mcpplibs"]
repo = "https://github.com/mcpplibs/openkal-windows"

# WHICH INTERFACES THIS IMPLEMENTATION PROVIDES, DERIVED FROM THE ARTEFACT AND
# NOT WRITTEN BY HAND.
#
# openkal's specification names no set of interfaces: clause 3.3 withdrew the
# one it had named (`hosted`) because a name describing a class of environment
# is falsified by an environment nobody had in mind, and that one was falsified
# inside its own ecosystem within a release. Enumeration by the package
# replaced it, and a build tool reads this array at dependency resolution
# against the `requires-interfaces` a consumer states in its own manifest --
# the first of the three times clause 6.2 tabulates, and the earliest at which
# the question can be answered.
#
# FOURTEEN AND NOT FIFTEEN. `openkal.space` is absent: this environment has no
# operation upon an address space it can supply, and clause 3 says an
# implementation provides an interface in whole or not at all. A consumer that
# needs it is refused here and builds on openkal-linux, which is the whole
# point of stating the set rather than a name for a class of environment.
#
# GENERATED, AND CI DIFFS IT AGAINST THE OBJECTS:
#
# bash .spec/tools/check-surface.sh --toml .spec/SURFACE.txt \
# $(find target -path '*/obj/*' -name '*.o' ! -name '*.m.o')
#
# BACKWARD COMPATIBLE. An engine that predates the key reads `[kernel-abi]` as
# an unknown top-level table and ignores it, so this manifest loads unchanged
# everywhere it loaded before.
[kernel-abi]
provides-interfaces = [
"openkal.abort",
"openkal.stream",
"openkal.memory",
"openkal.env",
"openkal.time",
"openkal.random",
"openkal.fs",
"openkal.process",
"openkal.task",
"openkal.exec",
"openkal.terminal",
"openkal.net",
"openkal.datagram",
"openkal.timeout",
]

[dependencies]
openkal = "0.14.0"

Expand Down
Loading