Skip to content

RFC: Create API for registering system builtins#1477

Draft
mechite wants to merge 2 commits into
jart:masterfrom
mechite:system-builtins
Draft

RFC: Create API for registering system builtins#1477
mechite wants to merge 2 commits into
jart:masterfrom
mechite:system-builtins

Conversation

@mechite

@mechite mechite commented Feb 10, 2026

Copy link
Copy Markdown

This is not very thorough and has not been tested at all.
It also imposes a stupid limit of 16 programs only.

If _cocmd_builtin in this context is accessible to people using
cosmocc, this patch is useful enough to provide an "internal API"
to register these programs, without touching the filesystem, which
is the goal here. Not sure if this API can be linked against.

I only submitted this to show my intent "in code".

URL: https://discord.com/channels/927860136884699167/988730487239503942/1469002855162580992
Signed-off-by: Mahied Maruf <contact@mechite.com>

This is not very thorough and has not been tested at all.

If `_cocmd_builtin` in this context is accessible to people using
`cosmocc`, this patch is useful enough to provide an "internal API"
to register these programs, without touching the filesystem, which
is the goal here.

URL: https://discord.com/channels/927860136884699167/988730487239503942/1469002855162580992
Signed-off-by: Mahied Maruf <contact@mechite.com>
@mechite mechite marked this pull request as draft February 10, 2026 00:26
@github-actions github-actions Bot added the libc label Feb 10, 2026
I missed the usage of this macro.

Signed-off-by: Mahied Maruf <contact@mechite.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant