From 93105dba44cb9f4fabe337e7b4a643293b085203 Mon Sep 17 00:00:00 2001 From: Lourival Vieira Neto Date: Thu, 1 Jan 2026 20:59:47 +0000 Subject: [PATCH] split Lunatik C API into a new file --- README.md | 140 +--------------------------------------------------- doc/capi.md | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 142 insertions(+), 138 deletions(-) create mode 100644 doc/capi.md diff --git a/README.md b/README.md index efabf4eb4..490d8522d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Lunatik is a framework for scripting the Linux kernel with [Lua](https://www.lua It is composed by the Lua interpreter modified to run in the kernel; a [device driver](driver.lua) (written in Lua =)) and a [command line tool](bin/lunatik) to load and run scripts and manage runtime environments from the user space; -a [C API](#lunatik-c-api) to load and run scripts and manage runtime environments from the kernel; +a [C API](doc/capi.md) to load and run scripts and manage runtime environments from the kernel; and [Lua APIs](#lunatik-lua-apis) for binding kernel facilities to Lua scripts. > Note: Lunatik supports Linux Kernel versions 5.x and 6.x @@ -159,143 +159,7 @@ Lua APIs are documented thanks to [LDoc](https://stevedonovan.github.io/ldoc/). ## Lunatik C API -```C -#include -``` - -#### lunatik\_runtime -```C -int lunatik_runtime(lunatik_object_t **pruntime, const char *script, bool sleep); -``` -_lunatik\_runtime()_ creates a new `runtime` environment then loads and runs the script -`/lib/modules/lua/