Skip to content

Commit 2e01e2d

Browse files
committed
fix: add lua table
1 parent d87ec89 commit 2e01e2d

File tree

3 files changed

+51
-4
lines changed

3 files changed

+51
-4
lines changed

content/4.languages/1.python/3.export-functions.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ icon: lucide:share-2
66

77
In the Plugify ecosystem, Python plugins can export functions to make them accessible to other plugins. This guide explains how to define and export functions in Python and provides examples to help you integrate your plugins seamlessly.
88

9-
109
## **Basic Type Mapping**
1110

1211
The following table lists how types are exposed to the Python API:
@@ -58,7 +57,6 @@ The following table lists how types are exposed to the Python API:
5857
| plg::vec4 | Vector4 | vec4 ||
5958
| plg::mat4x4 | Matrix4x4 | mat4x4 ||
6059

61-
6260
## **Exporting Functions in Python**
6361

6462
Exporting functions in Python is simpler than in C++ because Python is a dynamically-typed language. You only need to define the function and specify it in the plugin manifest. Plugify's Python Language Module handles the rest.

content/4.languages/6.lua/3.export-functions.md

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,57 @@ icon: lucide:share-2
55
---
66

77
In the Plugify ecosystem, Lua plugins can export functions to make them accessible to other plugins. This guide explains how to define and export functions in Lua and provides examples to help you integrate your plugins seamlessly.
8-
8+
9+
## **Basic Type Mapping**
10+
11+
The following table lists how types are exposed to the Lua API:
12+
13+
| C++ Type | Lua Type | Plugify Alias | Ref Support ? |
14+
|----------------------------|------------------|---------------|---------------|
15+
| void | nil | void ||
16+
| bool | boolean | bool ||
17+
| char | string | char8 ||
18+
| char16_t | string | char16 ||
19+
| int8_t | integer | int8 ||
20+
| int16_t | integer | int16 ||
21+
| int32_t | integer | int32 ||
22+
| int64_t | integer | int64 ||
23+
| uint8_t | integer | uint8 ||
24+
| uint16_t | integer | uint16 ||
25+
| uint32_t | integer | uint32 ||
26+
| uint64_t | integer | uint64 ||
27+
| uintptr_t | integer | ptr64 ||
28+
| uintptr_t | integer | ptr32 ||
29+
| float | number | float ||
30+
| double | number | double ||
31+
| void* | function | function ||
32+
| plg::string | string | string ||
33+
| plg::any | any | any ||
34+
| plg::vector\<bool\> | table | bool\[\] ||
35+
| plg::vector\<char\> | table | char8\[\] ||
36+
| plg::vector\<char16_t\> | table | char16\[\] ||
37+
| plg::vector\<int8_t\> | table | int8\[\] ||
38+
| plg::vector\<int16_t\> | table | int16\[\] ||
39+
| plg::vector\<int32_t\> | table | int32\[\] ||
40+
| plg::vector\<int64_t\> | table | int64\[\] ||
41+
| plg::vector\<uint8_t\> | table | uint8\[\] ||
42+
| plg::vector\<uint16_t\> | table | uint16\[\] ||
43+
| plg::vector\<uint32_t\> | table | uint32\[\] ||
44+
| plg::vector\<uint64_t\> | table | uint64\[\] ||
45+
| plg::vector\<uintptr_t\> | table | ptr64\[\] ||
46+
| plg::vector\<uintptr_t\> | table | ptr32\[\] ||
47+
| plg::vector\<float\> | table | float\[\] ||
48+
| plg::vector\<double\> | table | double\[\] ||
49+
| plg::vector\<plg::string\> | table | string\[\] ||
50+
| plg::vector\<plg::any\> | table | any\[\] ||
51+
| plg::vector\<plg::vec2\> | table | vec2\[\] ||
52+
| plg::vector\<plg::vec3\> | table | vec3\[\] ||
53+
| plg::vector\<plg::vec4\> | table | vec4\[\] ||
54+
| plg::vector\<plg::mat4x4\> | table | mat4x4\[\] ||
55+
| plg::vec2 | Vector2 | vec2 ||
56+
| plg::vec3 | Vector3 | vec3 ||
57+
| plg::vec4 | Vector4 | vec4 ||
58+
| plg::mat4x4 | Matrix4x4 | mat4x4 ||
959

1060
## **Exporting Functions in Lua**
1161

content/4.languages/7.dlang/3.export-functions.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ The following table lists how types are exposed to the D API:
5757
| plg::vec4 | Vector4 | vec4 ||
5858
| plg::mat4x4 | Matrix4x4 | mat4x4 ||
5959

60-
6160
## **Exporting Functions in D**
6261

6362
Exporting functions in D requires wrapping them with the `mixin Export` directive to create `extern(C)` functions compatible with Plugify. These functions can then be called by other plugins.

0 commit comments

Comments
 (0)