Skip to content
weivelPublic

About

The Rust language implementation of weivel, over the C core.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

102 Commits

Folders and files

Repository files navigation

The Rust language implementation of weivel, for a host written in Rust that runs plugins written in Rust. It is one of the language implementations the core's docs/contract/ describes, held to that contract and to the vectors of the conformance kit, and it decides nothing itself: compatibility, order, reach, waiting and revocation are the core's answers, made once in the core so that a Rust plugin meets the very decisions a plugin in any other language meets. It is not the core, and it forces no path, file name, variable or format on its caller. It links no core: the core's binary is loaded at run time from the path the caller gives, so one build of the crate runs against whichever core binary its caller loads, and the crate declares the core's structs and functions by hand rather than generating them, a test holding every struct to what the C compiler makes of the core's header. It is one Cargo package, weivel-rust, whose library weivel_rust holds one module per module of the contract, under the contract's names; a module named core shadows the built-in core crate inside the library, which writes ::core:: for that one. The crate has no dependency of any kind. Its core module loads the core's binary and owns the one wrapper every call into it goes through; handles, timer and context keep the crate's objects for the core's handles, arm the core's deadline and give each plugin its context; host registers, activates, releases and destroys plugins, offers host services, loads C libraries as host services, binds their described definitions from the description each library answers and loads plugins built as libraries of their own across the plugin seam; standard reaches the standard's binary, its manifest loader, its library declaration reader, its JSON reader and its description checks, with typed access to the standard's services; program is the host program, which carries out the standard's weivel/host.h against whichever provider library it is started with, as the weivel-host binary or embedded through start_host; conformance drives every one of the kit's layer vectors, the host vectors through that program; benchmarks times weivel's calls against the same calls made without it, judged by the conformance kit's bounds; and testing gives the tests of a program that hosts plugins a scratch home, variables set and put back, a described library bound from its folder and a free port.

  • benchmarks.md - benchmarks: the gates, what each times against what, how they sample, and how a run measures
  • building.md - how to build the crate and the native siblings its tests load, and run its tests and the kit's drift checks
  • conformance.md - conformance: the driver for the layer suite, the host vectors run through the host program, and the 94 vectors the crate sits
  • context.md - context: a plugin's context, its calls, Pending, and the surface a host builds contexts through
  • core.md - core: loading the core's binary, the hand declarations and the tests that hold them, and the one wrapper every call goes through with its lock, drain, answers, dispatch, sink and deadline hooks
  • descriptions.md - host's described definitions: the load, the values a call takes and answers, handles, carried definitions, enums and blocking
  • handles.md - handles: the table from the core's handles to the crate's records, and the holdings
  • host.md - host: registration, activation in plan order, verification, release and destroy, host services, C libraries, described definitions and the plugin seam
  • program.md - program: the host program, start_host and run_host, its run from start to stop, and the weivel-host command line
  • source/ - the source mirror: one doc per source folder that holds code
  • standard.md - standard: the standard's binary reached by path, its manifest loader, library reader, JSON reader and description checks, and typed access to its services
  • testing.md - testing: a scratch home, variables set and restored, a described library bound from its folder, a free port, and why setting a variable is unsafe
  • timer.md - timer: the scheduler, the system scheduler, and the timer that follows the core's deadline

About

The Rust language implementation of weivel, over the C core.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages