mcpplibs.openkal
importopenkal: a portable kernel ABI specification, and the C++ modules that declare it
import openkal.types;
#include <openkal.h>
Module name taken from this index's own test project for the package.
mcpp add mcpplibs.openkal@0.26.0
Usage
From this repository's own test project — built and run by CI, not written for the website.
// openkal-kit through the index: an endpoint parsed, written back and refused
// when malformed, which is the kit's behaviour and not only its declarations.
#include <cstdio>
#include <cstring>
import openkal.types;
import openkal.kit.endpoint;
int main() {
using namespace kal::kit;
int failures = 0;
auto check = [&](bool held, const char* what) {
if (!held) { std::printf("FAIL: %s\n", what); ++failures; }
};
const auto r = parse_v4("127.0.0.1:8080", 14);
check(r.ok && r.ep.addr_len == 4 && r.ep.port == 8080, "an address with a port parses");
char out[32];
const auto f = format_v4(r.ep, out, sizeof out);
check(f.ok && f.n == 14 && std::memcmp(out, "127.0.0.1:8080", 14) == 0,
"and is written back as it was given");
check(!parse_v4("256.0.0.1", 9).ok, "an octet past 255 is refused");
check(!parse_v4("1.2.3", 5).ok, "three octets are refused");
if (failures == 0) std::printf("openkal-kit: an endpoint parsed, written back and refused\n");
// …
tests/examples/openkal-kit/tests/kit.cpp · project tests/examples/openkal-kit
Build · upstream manifest
- targets
openkal (lib)- manifest version
0.26.0- source
https://raw.githubusercontent.com/mcpplibs/openkal/0.26.0/mcpp.toml
Versions
| Version | Platforms | Mirrors | sha256 |
|---|---|---|---|
0.26.0 latest |
LinuxWindowsmacOS | GLOBAL CN | 1179925d38dc… |
0.25.3 |
LinuxWindowsmacOS | GLOBAL CN | 48b2f01173ae… |
0.25.2 |
LinuxWindowsmacOS | GLOBAL CN | 463138f09b24… |
0.25.1 |
LinuxWindowsmacOS | GLOBAL CN | 902932588bc1… |
0.25.0 |
LinuxWindowsmacOS | GLOBAL CN | 5dd0e82bd150… |
Show all 29 versions
0.24.0 |
LinuxWindowsmacOS | GLOBALCN | 7e0f48e85611… |
0.23.0 |
LinuxWindowsmacOS | GLOBALCN | 3c89b8c0bfc8… |
0.22.0 |
LinuxWindowsmacOS | GLOBALCN | ca5ecbd31d4f… |
0.21.0 |
LinuxWindowsmacOS | GLOBALCN | e0b2d3cc12a4… |
0.20.0 |
LinuxWindowsmacOS | GLOBALCN | f6ce55dd754d… |
0.19.0 |
LinuxWindowsmacOS | GLOBALCN | 3b08cb7497fe… |
0.18.0 |
LinuxWindowsmacOS | GLOBALCN | d6feb5acff4c… |
0.17.1 |
LinuxWindowsmacOS | GLOBALCN | 778b123192ab… |
0.17.0 |
LinuxWindowsmacOS | GLOBALCN | a4ab09d6f9fd… |
0.16.0 |
LinuxWindowsmacOS | GLOBALCN | 24a349b4eb7c… |
0.15.0 |
LinuxWindowsmacOS | GLOBALCN | 84a0d1d97c51… |
0.14.1 |
LinuxWindowsmacOS | GLOBALCN | 3204cf5265c7… |
0.14.0 |
LinuxWindowsmacOS | GLOBALCN | 0e0410fbda5f… |
0.13.0 |
LinuxWindowsmacOS | GLOBALCN | d8ef2871553d… |
0.12.0 |
LinuxWindowsmacOS | GLOBALCN | d64ff916a56b… |
0.11.0 |
LinuxWindowsmacOS | GLOBALCN | 6080d42fa995… |
0.10.0 |
LinuxWindowsmacOS | GLOBALCN | 0909022b5fc7… |
0.9.0 |
LinuxWindowsmacOS | GLOBALCN | c9c3c1e7e690… |
0.8.0 |
LinuxWindowsmacOS | GLOBALCN | c0e758847847… |
0.7.0 |
LinuxWindowsmacOS | GLOBALCN | 47909cd3add5… |
0.6.0 |
LinuxWindowsmacOS | GLOBALCN | 643a6ec61623… |
0.5.2 |
LinuxWindowsmacOS | GLOBALCN | f0d97398391b… |
0.5.1 |
LinuxWindowsmacOS | GLOBALCN | cc4bd91fe0ea… |
0.4.0 |
LinuxWindowsmacOS | GLOBALCN | e0fe3da54c73… |