aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2025-01-05 22:18:07 -0300
committerHisham Muhammad <hisham@gobolinux.org>2025-01-05 22:18:07 -0300
commit377751136d817b68b58f5cbfcbe5f29d639d0cb8 (patch)
treeb6525e861d74c2ad01b9f37b784ace22edbe836a
parent885ea63d6471cf62463e33bd9997a7644ec701ed (diff)
downloadluarocks-docs-folder.tar.gz
luarocks-docs-folder.tar.bz2
luarocks-docs-folder.zip
docs: some copyeditingdocs-folder
-rw-r--r--docs/creating_a_rock.md25
1 files changed, 13 insertions, 12 deletions
diff --git a/docs/creating_a_rock.md b/docs/creating_a_rock.md
index e93505ac..07de5ca5 100644
--- a/docs/creating_a_rock.md
+++ b/docs/creating_a_rock.md
@@ -126,7 +126,7 @@ won't be compiled.
126 126
127You can specify that your code depends on other rocks, so you can use modules 127You can specify that your code depends on other rocks, so you can use modules
128from other rocks in your code and have them be automatically downloaded and 128from other rocks in your code and have them be automatically downloaded and
129installed when a user installs your rock. 129installed when a user installs your rock.
130 130
131Suppose we need the modules from the "luaknife" rock, in order to cut our 131Suppose we need the modules from the "luaknife" rock, in order to cut our
132fruits. But we need version later than 2.3 of luaknife, because we're using 132fruits. But we need version later than 2.3 of luaknife, because we're using
@@ -212,7 +212,7 @@ sources are in the current directory as well.
212 212
213In the build section you can include arbitrary files through the 213In the build section you can include arbitrary files through the
214"copy_directories" table. In this table you can list directories in your rock 214"copy_directories" table. In this table you can list directories in your rock
215that will be copied to the target rocktree during installation. 215that will be copied to the target rocktree during installation.
216 216
217```lua 217```lua
218 copy_directories = { "doc", "test" } 218 copy_directories = { "doc", "test" }
@@ -422,17 +422,18 @@ site](https://luarocks.org/settings/api-keys).
422 422
423## Conclusion 423## Conclusion
424 424
425And we're done -- by writing a simple rules file which simply describes which 425And we're done! By writing a simple rules file which describe which
426sources compose the project and which libraries they use, we actually achieved 426sources compose the project and which libraries they use, we actually achieved
427a lot behind the scenes: LuaRocks takes care of using the right compiler for 427a lot behind the scenes. LuaRocks takes care of:
428your platform (GCC? MSVC?), passing the right flags (-fpic? -shared? -bundle
429-undefined dynamic_lookup?) and checking external dependencies (/usr/lib?
430/usr/local/lib? Is it really there?). Getting all these little portability
431details right is not always easy to do on hand-written Makefiles, so that's
432why we recommend using LuaRocks's own build system whenever possible. There
433are many other features of LuaRocks we haven't covered in this tutorial
434(per-platform overrides, support for command-line scripts, etc.), but this
435should get you started.
436 428
429* using the right compiler for your platform (GCC? MSVC?)
430* passing the right flags (`-fpic`? `-shared`? `-bundle -undefined dynamic_lookup`?)
431* and checking external dependencies (`/usr/lib`? `/usr/local/lib`? Is it really there?).
437 432
433Getting all these little portability details right is not always easy to do on
434hand-written Makefiles, so that's why we recommend using LuaRocks's own build
435system whenever possible.
438 436
437There are many other features of LuaRocks we haven't covered in this tutorial
438([per-platform overrides](platform_overrides.md), support for command-line
439scripts, etc.), but this should get you started.