2
0
Hugo Musso Gualandi 4 жил өмнө
parent
commit
87908cdee8
1 өөрчлөгдсөн 3 нэмэгдсэн , 1 устгасан
  1. 3 1
      README.md

+ 3 - 1
README.md

@@ -14,12 +14,14 @@ This is a modified version of the Lua interpreter so the process is the same you
 
 # Usage
 
-Our compiler generates a `.c` file. You can compile that into a `.so` module and then require it from Lua.
+Our compiler generates a `.c` file with a `luaopen_` function. You can compile that into a `.so` module and then require it from Lua. The compilation is the same as any other extension module, except that you need to pass the path to the LuaAOT headers.
 
     ./src/luaot test.lua -o testcompiled.c
     gcc -shared -fPIC -O2 -I./src testcompiled.c -o testcompiled.so
     ./src/lua -l testcompiled
 
+Be careful about the name of the generated file. If it has the same name as the original Lua file, the `require` may prioritize the Lua file instead of the compiled on. We also recommend compiling with optimizations, at least -O2.
+
 # Experiments
 
 If you are interested in reproducing the experiments from our paper, please consult the documentation in the `experiments` and `scripts` directory. Note that you must be inside the experiments directory when you run the scripts: