-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(deps): add ada - whatwg-compliant and fast URL parser
### Summary Adds libada as a dependency. This is needed for: #12758 But it may be great for many other uses too. The `lua-resty-ada` LuaJIT FFI bindings can be found here: https://github.com/bungle/lua-resty-ada Signed-off-by: Aapo Talvensaari <[email protected]>
- Loading branch information
Showing
5 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
cc_library( | ||
Check failure on line 1 in build/openresty/ada/BUILD.bazel GitHub Actions / Auto-format and Check
|
||
name = "ada-lib", | ||
srcs = ["ada.cpp"], | ||
hdrs = [ | ||
"ada.h", | ||
"ada_c.h", | ||
], | ||
copts = [ | ||
"-std=c++17", | ||
], | ||
linkstatic = True, | ||
) | ||
|
||
cc_shared_library( | ||
name = "ada", | ||
deps = [":ada-lib"], | ||
visibility = ["//visibility:public"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
"""A module defining the third party dependency Ada""" | ||
Check failure on line 1 in build/openresty/ada/ada_repositories.bzl GitHub Actions / Auto-format and Check
|
||
|
||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") | ||
load("@kong_bindings//:variables.bzl", "KONG_VAR") | ||
|
||
def ada_repositories(): | ||
"""Defines the ada repository""" | ||
|
||
version = KONG_VAR["ADA"] | ||
|
||
maybe( | ||
http_archive, | ||
name = "ada", | ||
sha256 = KONG_VAR["ADA_SHA256"], | ||
url = "https://github.com/ada-url/ada/releases/download/v" + version + "/singleheader.zip", | ||
type = "zip", | ||
visibility = ["//visibility:public"], # let this to be referenced by openresty build | ||
build_file = "//build/openresty/ada:BUILD.bazel", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters