minilua.c 5.4.7 → 5.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,18 +4,52 @@ This is Lua contained in a single header to be bundled in C/C++ applications wit
4
4
  [Lua](https://www.lua.org/) is a powerful, efficient, lightweight, embeddable scripting language.
5
5
  This library was created by [Eduardo Bart](https://github.com/edubart).
6
6
 
7
+ <br>
8
+
7
9
  ## Installation
8
10
 
9
11
  Run:
10
- ```bash
12
+
13
+ ```sh
11
14
  $ npm i minilua.c
12
15
  ```
13
16
 
14
17
  And then include `minilua.h` as follows:
18
+
15
19
  ```c
20
+ // main.c
21
+ #define MINILUA_IMPLEMENTATION // or LUA_IMPL
16
22
  #include "node_modules/minilua.c/minilua.h"
23
+
24
+ int main() { /* ... */ }
25
+ ```
26
+
27
+ And then compile with `clang` or `gcc` as usual.
28
+
29
+ ```bash
30
+ $ clang main.c # or, use gcc
31
+ $ gcc main.c
32
+ ```
33
+
34
+ You may also use a simpler approach:
35
+
36
+ ```c
37
+ // main.c
38
+ #define MINILUA_IMPLEMENTATION // or LUA_IMPL
39
+ #include <minilua.h>
40
+
41
+ int main() { /* ... */ }
17
42
  ```
18
43
 
44
+ If you add the path `node_modules/minilua.c` to your compiler's include paths.
45
+
46
+ ```bash
47
+ $ clang -I./node_modules/minilua.c main.c # or, use gcc
48
+ $ gcc -I./node_modules/minilua.c main.c
49
+ ```
50
+
51
+ <br>
52
+
19
53
  ## Example Usage
20
54
 
21
55
  ```c
@@ -34,6 +68,8 @@ int main() {
34
68
  }
35
69
  ```
36
70
 
71
+ <br>
72
+
37
73
  ## Usage
38
74
 
39
75
  Include `minilua.h` to use Lua API.
@@ -52,10 +88,14 @@ therefore it is best to declare the Lua implementation in dedicated C file.
52
88
  Optionally provide the following defines:
53
89
  - `LUA_MAKE_LUA` - implement the Lua command line REPL
54
90
 
91
+ <br>
92
+
55
93
  ## Documentation
56
94
 
57
95
  For documentation on how to use Lua read its [official manual](https://www.lua.org/manual/).
58
96
 
97
+ <br>
98
+
59
99
  ## Updates
60
100
 
61
101
  - **25-Jul-2024**: Updated to Lua 5.4.7.
@@ -65,11 +105,15 @@ For documentation on how to use Lua read its [official manual](https://www.lua.o
65
105
  - **03-Dec-2020**: Updated to Lua 5.4.2.
66
106
  - **27-Nov-2020**: Library created, using Lua 5.4.2-rc1.
67
107
 
108
+ <br>
109
+
68
110
  ## Notes
69
111
 
70
112
  This library tries to keep up with latest official Lua release.
71
113
  The header is generated using the bash script `gen.sh` all modifications done is there.
72
114
 
115
+ <br>
116
+
73
117
  ## License
74
118
 
75
119
  Same license as Lua, the MIT license, see LICENSE.txt for information.
@@ -78,5 +122,6 @@ Same license as Lua, the MIT license, see LICENSE.txt for information.
78
122
  <br>
79
123
 
80
124
 
125
+ [![SRC](https://img.shields.io/badge/src-repo-green?logo=Org)](https://github.com/edubart/minilua)
81
126
  [![ORG](https://img.shields.io/badge/org-nodef-green?logo=Org)](https://nodef.github.io)
82
127
  ![](https://ga-beacon.deno.dev/G-RC63DPBH3P:SH3Eq-NoQ9mwgYeHWxu7cw/github.com/nodef/minilua.c)