This repository maintains the runtime for the native backend of MoonBit, including:
- type definitions for runtime layout of MoonBit object
- fundamental runtime operations for memory management and builtin data type, such as array
- some native API used by
moonbitlang/core
include/moonbit-fundamental.h: used to avoid including system header in some pipelineinclude/moonbit.h: type definitions for runtime layout of MoonBit object and public macro/functions for C FFI stubruntime.c: implementation of the runtimeruntime_core.c: some fundamental runtime operations that are directly inlined into code generated by MoonBit
This repository is a mirror of the runtime in MoonBit compiler, and is updated regularly. External contributions and bug reports are welcomed. Patches will be manually merged to the MoonBit compiler.
Some functions in runtime_core.c come from musl.