1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00
Commit graph

30 commits

Author SHA1 Message Date
Andy Green
e47915c420 sai: update platform names of windows builders 2021-03-02 06:55:38 +00:00
Andy Green
544dc90aa0 sai: win10 no pthreads and debian buster 32-bit 2020-10-29 19:55:24 +00:00
Andy Green
427b925d19 ss: fix without server 2020-10-29 19:53:41 +00:00
Andy Green
2eab1e3ea5 sai: plugins 2020-10-26 11:30:41 +00:00
Andy Green
f50003b7b5 sai: debian 2020-10-26 10:31:34 +00:00
Orgad Shaneh
3118c66590 cmake: mingw: fix build with default options
afunix.h doesn't exist on mingw.
2020-09-17 14:28:42 +01:00
Andy Green
c6c7ab2b44 event libs: default to building as dynamically loaded plugins
Event lib support as it has been isn't scaling well, at the low level
libevent and libev headers have a namespace conflict so they can't
both be built into the same image, and at the distro level, binding
all the event libs to libwebsockets.so makes a bloaty situation for
packaging, lws will drag in all the event libs every time.

This patch implements the plan discussed here

https://github.com/warmcat/libwebsockets/issues/1980

and refactors the event lib support so they are built into isolated
plugins and bound at runtime according to what the application says
it wants to use.  The event lib plugins can be packaged individually
so that only the needed sets of support are installed (perhaps none
of them if the user code is OK with the default poll() loop).  And
dependent user code can mark the specific event loop plugin package
as required so pieces are added as needed.

The eventlib-foreign example is also refactored to build the selected
lib support isolated.

A readme is added detailing the changes and how to use them.

https://libwebsockets.org/git/libwebsockets/tree/READMEs/README.event-libs.md
2020-08-31 16:51:37 +01:00
Andy Green
629c8138b1 sai: freebsd 2020-08-10 15:04:10 +01:00
Andy Green
4cd381f933 cmake: tls: wolfssl
PARENT_SCOPE needs adjusting in a few places for wolfssl to work, and
we need a second level export of USE_WOLFSSL through lib/CMakeLists.txt

Add noi/f32 Sai build for WOLFSSL + MINIMAL_EXAMPLES
2020-08-10 15:04:10 +01:00
Andy Green
625bade63e ss: static policy: dynamic vhost instantiation
Presently a vh is allocated per trust store at policy parsing-time, this
is no problem on a linux-class device or if you decide you need a dynamic
policy for functionality reasons.

However if you're in a constrained enough situation that the static policy
makes sense, in the case your trust stores do not have 100% duty cycle, ie,
are anyway always in use, the currently-unused vhosts and their x.509 stack
are sitting there taking up heap for no immediate benefit.

This patch modifies behaviour in ..._STATIC_POLICY_ONLY so that vhosts and
associated x.509 tls contexts are not instantiated until a secure stream using
them is created; they are refcounted, and when the last logical secure
stream using a vhost is destroyed, the vhost and its tls context is also
destroyed.

If another ss connection is created that wants to use the trust store, the
vhost and x.509 context is regenerated again as needed.

Currently the refcounting is by ss, it's also possible to move the refcounting
to be by connection.  The choice is between the delay to generate the vh
being visisble at logical ss creation-time, or at connection-time.  It's anyway
not preferable to have ss instantiated and taking up space with no associated
connection or connection attempt underway.

NB you will need to reprocess any static policies after this patch so they
conform to the trust_store changes.
2020-07-21 12:43:32 +01:00
Andy Green
63c1e8ba00 esp32-wrover-kit
Add lws_display and minimal example support for esp32-wrover to match wsp32-heltec-wb32

Since no usable buttons that don't affect something else on wrover kit, assumes
a button to 0V on GPIO14.
2020-06-30 19:35:41 +01:00
Andy Green
57bfaa9ccb sai: disable opensslv3 check until after release 2020-06-30 19:35:41 +01:00
Andy Green
a0535d010c sai.json: reduce riscv qemu builds
These are really slow since the processor itself is emulated... if it's broken,
it will break on the most complex configurations, configuration conflicts will
be flushed out by building on native arch anyway.  So just build the complex
configuration on Risc-V.
2020-06-18 08:32:22 +01:00
Andy Green
ad5a4f7040 clean 2020-06-10 19:07:38 +01:00
Andy Green
2a772776a9 windows: for data exports use explicit extern
LWS_EXTERN needs to be empty for windows when declaring functions in the
headers.  But for data, it needs the explicit extern otherwise on windows
or mingw based builds, it thinks we are redeclaring the data each time.
2020-06-07 07:53:36 +01:00
Andy Green
f0c1ea801c mingw: fix for different sockfd type in udp example
As found by Sai
2020-06-06 15:53:58 +01:00
Andy Green
e3df1eaa74 sai: update to new tuple format 2020-06-05 08:33:51 +01:00
Andy Green
16cbbe2b40 mingw: update cross toolchain and add 32 and 64 default builds to sai 2020-06-03 09:36:20 +01:00
Andy Green
d84910da92 sai: fedora riscv 2020-06-02 08:37:10 +01:00
Andy Green
d5773c01be openssl-v3: deal with deprecated SSL_CTX_load_verify_locations
Add Sai for openssl-v3 and for boringssl
2020-06-02 08:37:10 +01:00
Andy Green
f98e4a845c sai: add f32 plus openssl-v3 combination 2020-06-02 08:37:10 +01:00
Andy Green
f71b6035c8 sai: switch to 64bit rpi4 2020-06-02 08:37:10 +01:00
Andy Green
6d52147476 sai.json: gentoo 2020-06-02 08:37:10 +01:00
Andy Green
cabe021955 esp32: shift to support latest esp-idf
Esp-idf has an improved but still kind of abused cmake-
based build system now.

If we see ESP_PLATFORM coming as a cmake var, we can know we
are being built from inside the esp-idf config system.

Leave the existing esp32 arrangements alone but triggered off
ESP_PLATFORM, adapt to use the cross toolchain file and
various quirks automatically.

In this way you can build lws a part of your project in a
much cleaner way.

Prepare a minimal esp32 test app for use in Sai

Adapt .sai.json to build for esp32
2020-05-27 08:40:12 +01:00
Andy Green
2d7be680de android: modernize toolchain file and add build README
Add builder to .sai.json for just lws + mbedtls on aarch64
2020-05-27 08:40:12 +01:00
Andy Green
71f2333e8f ios: import toolchain file
This (BSD 3-clause) came from here
https://raw.githubusercontent.com/cristeab/ios-cmake/master/toolchain/iOS.cmake

and is necessary to build cmake projects properly using xcode / iOS SDK

Add Sai build for iOS on mac, currently without tls
2020-05-27 08:40:12 +01:00
Andy Green
9f1d019352 CTest: migrate and deprecate existing selftest scripts
Replace the bash selftest plumbing with CTest.

To use the selftests, build with -DLWS_WITH_MINIMAL_EXAMPLES=1
and `CTEST_OUTPUT_ON_FAILURE=1 make test` or just
`make test`.

To disable tests that require internet access, also give
-DLWS_CTEST_INTERNET_AVAILABLE=0

Remove travis and appveyor scripts on master.

Remove travis and appveyor decals on README.md.
2020-05-11 15:40:13 +01:00
Andy Green
cb0ea63ef1 Refresh of ctest-migrate-and-deprecate 2020-05-03 14:16:48 +01:00
Andy Green
63c8a23776 lws_spawn: windows
Move the unix spawn.c from lib/misc through to lib/plat/unix, and
add an implementation for windows in lib/plat/windows
2020-04-13 19:29:09 +01:00
Andy Green
8385cb427f sai.json
Add initial Sai CI config for build
2020-04-06 09:58:03 +01:00