使用C语言为Lua编写.so库

我想编写.so库并在Lua程序中使用它。我不明白.so库应该满足哪种语法。我在ssl.so luasec库中发现了这样的组织:

static luaL_Reg funcs[] = {
  {"compression", meth_compression},
  {"create",      meth_create},
  {"info",        meth_info},
  {"setfd",       meth_setfd},
  {"setmethod",   meth_setmethod},
  {"copyright",   meth_copyright},
  {NULL,          NULL}
};

但是,我应该添加什么内容到我的C .so库中,以使得funcs[](例如)可以从Lua程序中调用呢?

点赞