Skip to content

0.4.0: a platform question for a native build and an image alike; the platform modules in an image - #19

Merged
Sunrisepeak merged 5 commits into
mainfrom
release/0.4.0
Nov 7, 2026
Merged

Sunrisepeak merged 5 commits into
mainfrom
release/0.4.0

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

Implements mcpp-community/mcpp design 2026-11-08 (supplement S2, S3; top-level W3).

Changes

  • can_run_on(p) and on<P>(f). if constexpr (can_run_on(P)) with if (host() == P) is the platform question that holds in a native build and an image; on<P> runs a callable that takes the platform as an argument, so its body is a template a build that cannot run on P never instantiates (a lambda without the parameter is refused). is_<platform> keeps its meaning: a native build of that platform. README states which form fits which code.
  • R5 revised: platform modules in an image. linux::translator() (/proc, as on Linux); windows::elevated() (whoami /groups, by integrity SID); windows::on_dev_drive() (fsutil devdrv query, not known otherwise); posix::effective_user() (/proc on Linux, /usr/bin/id -u on macOS); macos::translated() is false (macOS has only an aarch64 okrun). System programs are started by absolute name with a 10 s bound, once per process. Code pages, long names, the registry, writable drives and the creation mask stay undefined in an image.
  • Tests. tests/facts_test asks the questions through on<P> on every row, natively, hosted, on Emscripten and as images on four systems; checks/discarded links the two-layer form on every system.

Verification

  • Linux x86_64: mcpp test 9/9 and mcpp test --target x86_64-openkal 9/9; checks/discarded links; checks/misuse still fails at the link.

Co-authored-by: speak-agent 248744407+speak-agent@users.noreply.github.com

… platform modules in an image

can_run_on(p) and on<P>(f) beside is_<platform>; R5 revised: a platform module is defined where it
can be answered, a native build of its platform and an image that asks the system it runs upon
(translator, elevated, on_dev_drive, effective_user; translated is false). tests/facts_test runs the
questions on every row, natively and as images.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
Sunrisepeak and others added 4 commits November 8, 2026 02:35
…acts_test names both answers

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…, not the C library's

openkal-musl's geteuid is the constant 1000 and it has no umask, so the hosted
arrangement answered 1000 for every user (CI runner user 1001).

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
… alias

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…hin the platform's version group

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
@Sunrisepeak
Sunrisepeak merged commit eaf4ad4 into main Nov 7, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant