{"repo":"vm-001/lua-radix-router","free":true,"listed":false,"github":"https://github.com/vm-001/lua-radix-router","clone":"git clone https://github.com/vm-001/lua-radix-router.git","description":"A lightweight high-performance and radix tree based router for Lua/LuaJIT/OpenResty","language":"Lua","stars":198,"topics":["lua","luajit","openresty","router","openapi","swagger","trie","restful","routing","fast"],"license":"BSD-2-Clause","category":"api-integrations-sdks","readme_excerpt":"Lua-Radix-Router English 中文 Lua-Radix-Router is a lightweight high-performance router library written in pure Lua. It's easy to use with only two exported functions, Router.new() and router:match() . The router is optimized for high performance. It combines HashTable(O(1)) and Compressed Trie(or Radix Tree, O(m) where m is the length of path being searched) for efficient matching. Some of the utility functions have the LuaJIT version for better performance, and will automatically switch when running in LuaJIT. It also scales well even with long paths and a large number of routes. The router can be run in different runtimes such as Lua, LuaJIT, or OpenResty. This library is considered production ready. 🔨 Features Patterned path: You can define named or unnamed patterns in path with pattern syntax \"{}\" and \"{ }\" - named variables: /users/{id}/profile-{year}.{format} , matches with /users/1/profile-2024.html. - named prefix: /api/authn/{ path} , matches with /api/authn/foo and /api/authn/foo/bar. Variable binding: Stop manually parsing the URL, let the router injects the binding variables for you. Best performance: The fastest router in Lua/LuaJIT and open-source API Gateways. See Benchmarks and Routing Benchmark in different API Gateways. OpenAPI friendly: OpenAPI(Swagger) is fully compatible. Trailing slash match: You can make the Router to ignore the trailing slash by setting trailing slash match to true. For example, /foo/ to match the existing /foo, /foo to match the exist","default_branch":null,"files":null,"tree":[],"storefront":"/r/vm-001","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/vm-001/lua-radix-router/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}