From 6dd58a4ff9deedeeb6029827b936c2e81866cd54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 22 Sep 2023 16:28:00 +0200 Subject: Initial HTTP/3 implementation Since quicer, which provides the QUIC implementation, is a NIF, Gun cannot depend directly on it. In order to enable QUIC and HTTP/3, users have to set the GUN_QUICER environment variable: export GUN_QUICER=1 Gun is now tested using GitHub Actions. As a result OTP-24+ is now required. In addition, the number of OTP releases tested has been reduced; only the latest of each major version is now tested. This also updates Erlang.mk. --- Makefile | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 1609a37..a6e7f1b 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,12 @@ CT_OPTS += -ct_hooks gun_ct_hook [] # -boot start_sasl LOCAL_DEPS = public_key ssl DEPS = cowlib -dep_cowlib = git https://github.com/ninenines/cowlib 2.13.0 +dep_cowlib = git https://github.com/ninenines/cowlib master + +ifeq ($(GUN_QUICER),1) +DEPS += quicer +dep_quicer = git https://github.com/emqx/quic main +endif DOC_DEPS = asciideck @@ -29,10 +34,8 @@ dep_ranch_commit = 2.0.0 dep_ci.erlang.mk = git https://github.com/ninenines/ci.erlang.mk master DEP_EARLY_PLUGINS = ci.erlang.mk -AUTO_CI_OTP ?= OTP-22+ -#AUTO_CI_HIPE ?= OTP-LATEST -# AUTO_CI_ERLLVM ?= OTP-LATEST -AUTO_CI_WINDOWS ?= OTP-22+ +AUTO_CI_OTP ?= OTP-LATEST-24+ +AUTO_CI_WINDOWS ?= OTP-LATEST-24+ # Hex configuration. @@ -58,14 +61,24 @@ ifndef FULL CT_SUITES := $(filter-out ws_autobahn,$(CT_SUITES)) endif -# Enable eunit. +# Compile options. TEST_ERLC_OPTS += +'{parse_transform, eunit_autoexport}' +ifeq ($(GUN_QUICER),1) +ERLC_OPTS += -D GUN_QUICER=1 +TEST_ERLC_OPTS += -D GUN_QUICER=1 +endif + # Generate rebar.config on build. app:: rebar.config +# Fix quicer compilation for HTTP/3. + +autopatch-quicer:: + $(verbose) printf "%s\n" "all: ;" > $(DEPS_DIR)/quicer/c_src/Makefile.erlang.mk + # h2specd setup. GOPATH := $(ERLANG_MK_TMP)/gopath -- cgit v1.2.3