Metacircular self-registration of MetaCall API via _ex load parameters
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start by reading the _ex load path and base PR 668, then inspect the C loader and source/tests/metacall_c_metacall_test/source/metacall_c_metacall_test.cpp. The work is complete when extra load flags flow through the _ex path, the C loader applies them, and the self-load test validates the metacircular flow; startup behavior remains the final step.
Written by the indexing model from the issue text.
Description
🚀 Feature
I’m writing this issue from a clarity & discussion with sir @viferga to track the idea clearly.
Problem
Right now, for each target language (Node, Python, etc.), we wrap the MetaCall API (metacall.h) again in that language’s style.
That means we keep reimplementing similar bindings multiple times, which is slow and time consuming & pasting thousand lines of code , everytime is hectic.
Goal
Enable a metacall-into-metacall flow where MetaCall can expose/load its own API path through loader configuration, reducing duplicated wrapper work.
Enable metacircular loading in core: pass extra flags through _ex, make C loader consume them, and make metacall_c_metacall_test work with that flow. Then define a default startup strategy for this path.
Scope of Work
1) _ex load flags support
- Base PR: https://github.com/metacall/core/pull/668
- Extend load input support so extra flags can be passed through the _ex path.
2) C loader flag handling
- Add support in C loader to receive and apply those extra flags.
3) Test implementation with extra flags
- Make this test flow work using extra flags on load:
https://github.com/metacall/core/blob/develop/source/tests/metacall_c_metacall_test/source/metacall_c_metacall_test.cpp
4) Default-load strategy in startup
Implement a default-load strategy for metacircular usage:
- either force/package C loader path across platforms, or
- export/embed required definitions in code (bindgen-like direction for MetaCall).
Proposed Solution
Implement a metacircular flow where MetaCall can expose its own API through loader-driven registration instead of repeating wrappers per language.
Logically:
- Register metacall.h + libmetacall.so into MetaCall itself.
- Make that API accessible from target languages through the same runtime path.
- Use _ex load configuration and C loader flag support to make this practical (paths/options needed for loading/compilation).
- Validate with the dedicated metacall C self-load test.
Additional info
- This is an umbrella tracker for the full scope above.
- Implementation should be split into focused PRs per step.
- Step order should follow 1 to 4.
If this works, we can progressively reduce duplicated wrapper logic across language ports and move toward automatic API exposure for new ports.
- Dominant language
- C
- Stars
- 1.8k
- Forks
- 266
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 14
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from metacall/core
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
metacall/core#964 · 1 comment ·
Maintainers usually reply within 1 day
-
pre-push hook empties VERSION when the clone has no tagsPossibly taken @vedant21-oss claimed this 18 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
metacall/core#939 · 3 comments ·
Maintainers usually reply within 1 day
-
TOCTOU race condition vulnerability!Possibly taken @akshatchitransh claimed this 1 day ago. Openbug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
metacall/core#961 · 2 comments ·
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 Half a day Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Go Port Race Conditions on MacOSPossibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
metacall/core#942 · 3 comments ·
Maintainers usually reply within 1 day
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
`table_create()` crashes when an `hccalloc()` for the option table failsPossibly taken @marinelay claimed this today. Opentype: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug severity: low
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
AlessandroSangiuliano/Uros#950 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
OpenXiangShan/NEMU#1296 ·
Maintainers usually reply within 1 day