11# lua-resty-ada
22
3- ** lua-resty-ada** implements a LuaJIT FFI bindings to Ada — WHATWG-compliant and fast URL parser.
4-
3+ ** lua-resty-ada** implements a LuaJIT FFI bindings to
4+ [ Ada — WHATWG-compliant and fast URL parser ] ( https://github.com/ada-url/ada/ ) .
55
66## Status
77
8- This library is considered production ready when 1.0.0 is released (not yet) .
8+ This library is considered production ready.
99
1010
1111## Synopsis
@@ -21,6 +21,9 @@ print(tostring(url))
2121print (tostring (url :clear_port ())) -- there are many more methods
2222-- prints: https://www.xn--7eleven-506c.com/Privacy/Montr%C3%A9al
2323
24+ url :free ()
25+ -- explicitly frees the memory without waiting for the garbage collector
26+
2427-- There is also a static API
2528
2629print (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"
3639LDoc generated API docs can be viewed at [ bungle.github.io/lua-resty-ada] ( https://bungle.github.io/lua-resty-ada/ ) .
3740
3841
42+ ## Installation
43+
44+ ### Using OpenResty Package Manager
45+
46+ ``` bash
47+ ❯ opm get bungle/lua-resty-ada
48+ ```
49+
50+ OPM repository for ` lua-resty-ada ` is located at
51+ [ opm.openresty.org/package/bungle/lua-resty-ada] ( https://opm.openresty.org/package/bungle/lua-resty-ada/ ) .
52+
53+ ### Using LuaRocks
54+
55+ ``` bash
56+ ❯ luarocks install lua-resty-ada
57+ ```
58+
59+ LuaRocks repository for ` lua-resty-ada ` is located at
60+ [ luarocks.org/modules/bungle/lua-resty-ada] ( https://luarocks.org/modules/bungle/lua-resty-session ) .
61+
62+ ### Building Ada
63+
64+ Please consult [ Ada] ( https://github.com/ada-url/ada/ ) on how to build or install
65+ the ada library. The Ada library needs to installed in in the system library path or
66+ one of the paths in Lua's ` package.cpath ` .
67+
68+ This project can also build it by executing (requires [ cmake] ( https://cmake.org/ ) ):
69+
70+ ``` bash
71+ ❯ make build
72+ ```
73+
74+ Or run the test suite with [ act] ( https://github.com/nektos/act ) :
75+
76+ ``` bash
77+ ❯ act
78+ ```
79+
80+
3981# License
4082
4183` lua-resty-ada ` uses two clause BSD license.
0 commit comments