diff --git a/README.md b/README.md index 3335bae..fb0d6ad 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # lua-resty-ada -**lua-resty-ada** implements a LuaJIT FFI bindings to Ada — WHATWG-compliant and fast URL parser. - +**lua-resty-ada** implements a LuaJIT FFI bindings to +[Ada — WHATWG-compliant and fast URL parser](https://github.com/ada-url/ada/). ## Status -This library is considered production ready when 1.0.0 is released (not yet). +This library is considered production ready. ## Synopsis @@ -21,6 +21,9 @@ print(tostring(url)) print(tostring(url:clear_port())) -- there are many more methods -- prints: https://www.xn--7eleven-506c.com/Privacy/Montr%C3%A9al +url:free() +-- explicitly frees the memory without waiting for the garbage collector + -- There is also a static API print(ada.get_href("https://www.7‑Eleven.com:1234/Home/../Privacy/Montréal")) @@ -36,6 +39,45 @@ print(ada.clear_port("https://www.7‑Eleven.com:1234/Home/../Privacy/Montréal" LDoc generated API docs can be viewed at [bungle.github.io/lua-resty-ada](https://bungle.github.io/lua-resty-ada/). +## Installation + +### Using OpenResty Package Manager + +```bash +❯ opm get bungle/lua-resty-ada +``` + +OPM repository for `lua-resty-ada` is located at +[opm.openresty.org/package/bungle/lua-resty-ada](https://opm.openresty.org/package/bungle/lua-resty-ada/). + +### Using LuaRocks + +```bash +❯ luarocks install lua-resty-ada +``` + +LuaRocks repository for `lua-resty-ada` is located at +[luarocks.org/modules/bungle/lua-resty-ada](https://luarocks.org/modules/bungle/lua-resty-session). + +### Building Ada + +Please consult [Ada](https://github.com/ada-url/ada/) on how to build or install +the ada library. The Ada library needs to installed in in the system library path or +one of the paths in Lua's `package.cpath`. + +This project can also build it by executing (requires [cmake](https://cmake.org/)): + +```bash +❯ make build +``` + +Or run the test suite with [act](https://github.com/nektos/act): + +```bash +❯ act +``` + + # License `lua-resty-ada` uses two clause BSD license. diff --git a/docs/classes/search.html b/docs/classes/search.html index 48e07ae..27fbd5c 100644 --- a/docs/classes/search.html +++ b/docs/classes/search.html @@ -922,7 +922,7 @@ <h3>Usage:</h3> </div> <!-- id="main" --> <div id="about"> <i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i> -<i style="float:right;">Last updated 2024-08-07 23:28:17 </i> +<i style="float:right;">Last updated 2024-08-08 22:39:33 </i> </div> <!-- id="about" --> </div> <!-- id="container" --> </body> diff --git a/docs/classes/url.html b/docs/classes/url.html index e91c006..11f8264 100644 --- a/docs/classes/url.html +++ b/docs/classes/url.html @@ -2175,7 +2175,7 @@ <h2 class="section-header "><a name="Properties"></a>Properties </h2> </div> <!-- id="main" --> <div id="about"> <i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i> -<i style="float:right;">Last updated 2024-08-07 23:28:17 </i> +<i style="float:right;">Last updated 2024-08-08 22:39:33 </i> </div> <!-- id="about" --> </div> <!-- id="container" --> </body> diff --git a/docs/index.html b/docs/index.html index acfaa50..34217c0 100644 --- a/docs/index.html +++ b/docs/index.html @@ -77,7 +77,7 @@ <h2>Classes</h2> </div> <!-- id="main" --> <div id="about"> <i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i> -<i style="float:right;">Last updated 2024-08-07 23:28:17 </i> +<i style="float:right;">Last updated 2024-08-08 22:39:33 </i> </div> <!-- id="about" --> </div> <!-- id="container" --> </body> diff --git a/docs/modules/resty.ada.html b/docs/modules/resty.ada.html index 61e7499..16b3a06 100644 --- a/docs/modules/resty.ada.html +++ b/docs/modules/resty.ada.html @@ -2985,7 +2985,7 @@ <h3>Usage:</h3> </div> <!-- id="main" --> <div id="about"> <i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i> -<i style="float:right;">Last updated 2024-08-07 23:28:17 </i> +<i style="float:right;">Last updated 2024-08-08 22:39:33 </i> </div> <!-- id="about" --> </div> <!-- id="container" --> </body> diff --git a/docs/modules/resty.ada.search.html b/docs/modules/resty.ada.search.html index facc350..7bf76bc 100644 --- a/docs/modules/resty.ada.search.html +++ b/docs/modules/resty.ada.search.html @@ -823,7 +823,7 @@ <h3>Usage:</h3> </div> <!-- id="main" --> <div id="about"> <i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i> -<i style="float:right;">Last updated 2024-08-07 23:28:17 </i> +<i style="float:right;">Last updated 2024-08-08 22:39:33 </i> </div> <!-- id="about" --> </div> <!-- id="container" --> </body>