Skip to content
weivelPublic

About

The weivel plugin engine, in C: manifests as values, activation order, the service registry and the ledger, behind an ABI that never calls out.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

282 Commits

Folders and files

Repository files navigation

The core is weivel's plugin engine, written in C: the one place the plugin platform's decisions are made, so every language implementation that wraps it sees the same decisions. It decides whether a plugin's manifest is compatible with the host, the order a set of plugins activates in, which service or capability a plugin may reach and which provider answers it, whether a want for a service is served, served degraded or refused, what is revoked when a plugin is released, quarantined or forgotten, and what the ledger records about every plugin. It decides and does nothing else, and it never calls out: no callback, listener or function pointer is ever invoked by it. A call from the core into a host language would run that language's code under the core's one lock, which can deadlock, and a callback arriving from C breaks a single-threaded language such as JavaScript. So the core queues every change it makes as an event the caller drains after each call, takes time only as a number the caller hands in, and leaves running anything to the caller. It owns no clock, opens no file, reads no environment and parses no format, and it holds no plugin object, service implementation or listener, only integer handles the caller maps to its own objects. Loading plugins, reading manifests, calling services and logging are the caller's work. Its whole interface is one header, described with the check that holds it to never calling out in the header's doc. A language implementation is held to the contract in this tree, and the conformance kit holds the core to the core tier of its vectors. How to build the core and run its tests is answered in the source mirror's root doc; the core is a library, so there is nothing of its own to run.

  • abi.md - the conventions every call keeps: who owns what crosses the boundary, threads, events and time, and sizes
  • ledger.md - what the ledger answers about every plugin registered and not forgotten
  • plan.md - the activation plan: the order a set of plugins starts in, the edges it draws, its cycles and its refusals
  • contract/ - the contract a language implementation follows: the rules every module keeps and one file per module
  • source/ - the source mirror: one doc per source folder that holds code, and at its root how to build and test the core

About

The weivel plugin engine, in C: manifests as values, activation order, the service registry and the ledger, behind an ABI that never calls out.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages