This is a dependency of our upcoming web-based material debugger. This
CL also includes `tnt/CMakeLists.txt`, which builds a static lib in a
minimal configuration that enables WebSocket support. The entire library
is built from only 4 files:
${PUBLIC_HDR_DIR}/CivetServer.h
${PUBLIC_HDR_DIR}/civetweb.h
${SRC_DIR}/civetweb.c
${SRC_DIR}/CivetServer.cpp
22 lines
359 B
C
22 lines
359 B
C
#include <stdio.h>
|
|
|
|
#include "lua.h"
|
|
#include "lauxlib.h"
|
|
|
|
static int smile(lua_State *L)
|
|
{
|
|
(void) L; // Unused
|
|
printf("%s\n", ":-)");
|
|
return 0;
|
|
}
|
|
|
|
int LUA_API luaopen_lua_dll(lua_State *L)
|
|
{
|
|
static const struct luaL_Reg api[] = {
|
|
{"smile", smile},
|
|
{NULL, NULL},
|
|
};
|
|
luaL_openlib(L, "lua_dll", api, 0);
|
|
return 1;
|
|
}
|