mcpplibs.os
importmcpplibs.os: a C++ operating-system library over openkal --- processes, files, environment, terminals, directories and local IPC, with compile-time platform constants and a few platform modules
import mcpplibs.os;
模組名讀自上游 src/os.cppm 裡的 `export module` 宣告。
mcpp add mcpplibs.os@0.4.8
用法
來自本倉庫自己的測試專案 —— CI 真的編譯並執行過,不是為了網站寫的。
// mcpplibs.os on this runner: the platform, a published file, a list of directories, and a
// program started and read (this test, started again).
import std;
import mcpplibs.os;
namespace os = mcpplibs::os;
int main(int argc, char** argv) {
if (argc > 1 && std::string_view(argv[1]) == "--echo") {
(void)os::stdio::write_output("echoed");
return 0;
}
if (argc > 1 && std::string_view(argv[1]) == "--both") {
(void)os::stdio::write_output("out ");
(void)os::stdio::write_error("err");
return 0;
}
int failures = 0;
auto check = [&](bool ok, std::string_view what) { if (!ok) { ++failures; std::println(std::cerr, "FAIL: {}", what); } };
check(os::host() == os::PLATFORM, "built for a system, the host is that system");
const auto dir = os::dirs::temp() / std::format("os-tests-{}", os::process::self()->id);
// …
tests/examples/os/tests/os.cpp · 專案 tests/examples/os
建置 · 上游資訊清單
- modules
mcpplibs.os- targets
os (lib)- manifest version
0.4.8- dependencies
openkal- 來源
https://raw.githubusercontent.com/mcpplibs/os/0.4.8/mcpp.toml
版本
| 版本 | 平台 | 鏡像 | sha256 |
|---|---|---|---|
0.4.8 最新 |
LinuxWindowsmacOS | GLOBAL CN | 267fe1ac72e4… |
0.4.7 |
LinuxWindowsmacOS | GLOBAL CN | 3facaf405dd8… |
0.4.6 |
LinuxWindowsmacOS | GLOBAL CN | e14dd08cd5d7… |
0.4.5 |
LinuxWindowsmacOS | GLOBAL CN | 6f8345fd0a96… |
0.4.4 |
LinuxWindowsmacOS | GLOBAL CN | 4f9e617ad53b… |
展開全部 24 個版本
0.4.3 |
LinuxWindowsmacOS | GLOBALCN | 1e372cbb6cca… |
0.4.2 |
LinuxWindowsmacOS | GLOBALCN | ca58bf5ffe59… |
0.4.1 |
LinuxWindowsmacOS | GLOBALCN | 149ecc26e79a… |
0.4.0 |
LinuxWindowsmacOS | GLOBALCN | ad0b61b96246… |
0.3.1 |
LinuxWindowsmacOS | GLOBALCN | 26492cf9fe4a… |
0.3.0 |
LinuxWindowsmacOS | GLOBALCN | 338a26822378… |
0.2.9 |
LinuxWindowsmacOS | GLOBALCN | 4168f6a1a160… |
0.2.8 |
LinuxWindowsmacOS | GLOBALCN | f64f2625cd11… |
0.2.7 |
LinuxWindowsmacOS | GLOBALCN | c3f8ebcb921c… |
0.2.6 |
LinuxWindowsmacOS | GLOBALCN | 7bea6784440d… |
0.2.5 |
LinuxWindowsmacOS | GLOBALCN | 14a8e23093ee… |
0.2.4 |
LinuxWindowsmacOS | GLOBALCN | 70089d2745ff… |
0.2.3 |
LinuxWindowsmacOS | GLOBALCN | e280c00d8be6… |
0.2.2 |
LinuxWindowsmacOS | GLOBALCN | 33c5d946c29d… |
0.2.1 |
LinuxWindowsmacOS | GLOBALCN | 264a3b80ef40… |
0.2.0 |
LinuxWindowsmacOS | 來源 | 9dc147ad8dca… |
0.1.2 |
LinuxWindowsmacOS | 來源 | bf6f5cfb1518… |
0.1.1 |
LinuxWindowsmacOS | 來源 | c5abfb625ded… |
0.1.0 |
LinuxWindowsmacOS | GLOBALCN | f7e4117612d7… |