7 Commits

Author SHA1 Message Date
Jose Quintana
7ca2785c82 chore: update dependencies 26.05.2025 and MSRV 1.81.0 (#545)
- BREAKING: End support for unmaintained Windows 7, 8, 8.1 platforms as previously announced on v2.36.1.
- SECURITY (RUSTSEC-2024-0437): Crash due to uncontrolled recursion in protobuf crate was temporarily solved in the previous release. However, this PR applies the dependency patches recently available.
- RESTORED: `experimental` Cargo feature for metrics and in-memory cache.
2025-05-27 00:25:29 +02:00
Jose Quintana
ad4c1718a6 chore: update dependencies 24-03-2025 (#532)
This change removes the "experimental" Cargo feature from the
resulting static-web-server **binary** temporarily (not the Cargo
feature itself) to prevent shipping the RUSTSEC-2024-0437 security 
vulnerability along with SWS binary.
The "experimental" Cargo feature will be restored once the upstream
patch is available.

Old Windows 7, 8, 8.1 patch:
Additionally, it pins zerofrom, zerofrom-derive and litemap
dependencies **temporarily** to be able to build SWS for old Windows
7, 8, 8.1 because newer versions of them require rustc 1.81 or later.
2025-03-24 02:22:29 +01:00
Jose Quintana
1a6caa476a feat: add all and experimental Cargo feature flags (#313)
* feat: `all` and `experimental` cargo feature flags
  - the `all` will host all available features (`default`) plus the
    `experimental`.
  - the `experimental` will only hold unstable features like for example
    `metrics` (as of writing)
* chore: enable the `all` cargo feature for freebsd

this feature also fixes #312
2024-02-12 23:19:15 +01:00
Jose Quintana
d4427eb3e1 feat: experimental Tokio Runtime metrics for Prometheus (#307)
* feat: Prometheus metrics endpoint at /metrics

Signed-off-by: Tom Plant <tom@tplant.com.au>

* fix: add `experimental` prefix to metrics arg, env var, and logs
Signed-off-by: Tom Plant <tom@tplant.com.au>

* fix: disable tokio-metrics-collector on Windows
Signed-off-by: Tom Plant <tom@tplant.com.au>

* chore: address feedback

* refactor: rename feature to `experimental-metrics` and add test

* fix: freebsd ci tests

* refactor: move dependencies to the unix target section

---------

Signed-off-by: Tom Plant <tom@tplant.com.au>
Co-authored-by: Jose Quintana <joseluisquintana20@gmail.com>
2024-02-04 13:44:38 +01:00
Jose Quintana
990bb7c8d9 refactor: statically link the c runtime for windows msvc x86 (#291)
i686 (before)
$ ldd static-web-server.exe
        ntdll.dll => /c/Windows/SYSTEM32/ntdll.dll (0x7ffc41ff0000)
        ntdll.dll => /c/Windows/SyChpe32/ntdll.dll (0x77700000)
        wow64.dll => /c/Windows/System32/wow64.dll (0x7ffc3fa80000)
        wow64base.dll => /c/Windows/System32/wow64base.dll (0x7ffc3e800000)
        wow64win.dll => /c/Windows/System32/wow64win.dll (0x7ffc3f5d0000)
        wow64con.dll => /c/Windows/System32/wow64con.dll (0x7ffc3fe50000)

i686 (after)
$ ldd static-web-server.exe
        ntdll.dll => /c/Windows/SYSTEM32/ntdll.dll (0x7ffe74db0000)
        KERNEL32.DLL => /c/Windows/System32/KERNEL32.DLL (0x7ffe73990000)
        KERNELBASE.dll => /c/Windows/System32/KERNELBASE.dll (0x7ffe72b10000)
        advapi32.dll => /c/Windows/System32/advapi32.dll (0x7ffe72f30000)
        msvcrt.dll => /c/Windows/System32/msvcrt.dll (0x7ffe74580000)
        sechost.dll => /c/Windows/System32/sechost.dll (0x7ffe74b80000)
        RPCRT4.dll => /c/Windows/System32/RPCRT4.dll (0x7ffe74450000)
        ws2_32.dll => /c/Windows/System32/ws2_32.dll (0x7ffe74c20000)
        bcrypt.dll => /c/Windows/System32/bcrypt.dll (0x7ffe72ae0000)
        CRYPTBASE.DLL => /c/Windows/SYSTEM32/CRYPTBASE.DLL (0x7ffe71d70000)
2023-11-13 02:41:44 +01:00
Jose Quintana
f4e914250e fix: arm64 binary does not run due to some missing windows dlls (#290)
This happens for example in fresh installs so now the Windows MSVC C
runtime is statically linked to solve the issue.

$ ldd static-web-server.exe
        ntdll.dll => /c/Windows/SYSTEM32/ntdll.dll (0x7ffc41ff0000)
        KERNEL32.DLL => /c/Windows/System32/KERNEL32.DLL (0x7ffc408d0000)
        KERNELBASE.dll => /c/Windows/System32/KERNELBASE.dll (0x7ffc3d9b0000)
        advapi32.dll => /c/Windows/System32/advapi32.dll (0x7ffc406b0000)
        msvcrt.dll => /c/Windows/System32/msvcrt.dll (0x7ffc3f930000)
        sechost.dll => /c/Windows/System32/sechost.dll (0x7ffc3fe60000)
        RPCRT4.dll => /c/Windows/System32/RPCRT4.dll (0x7ffc3e5e0000)
        ws2_32.dll => /c/Windows/System32/ws2_32.dll (0x7ffc40800000)
        ucrtbase.dll => /c/Windows/System32/ucrtbase.dll (0x7ffc3e1e0000)
        bcrypt.dll => /c/Windows/SYSTEM32/bcrypt.dll (0x7ffc3c7f0000)
        VCRUNTIME140.dll => not found
        api-ms-win-crt-math-l1-1-0.dll => not found
        api-ms-win-crt-string-l1-1-0.dll => not found
        api-ms-win-crt-heap-l1-1-0.dll => not found
        api-ms-win-crt-runtime-l1-1-0.dll => not found
        api-ms-win-crt-stdio-l1-1-0.dll => not found
        api-ms-win-crt-locale-l1-1-0.dll => not found

ARM64 (after)
$ ldd static-web-server.exe
        ntdll.dll => /c/Windows/SYSTEM32/ntdll.dll (0x7ffc41ff0000)
        KERNEL32.DLL => /c/Windows/System32/KERNEL32.DLL (0x7ffc408d0000)
        KERNELBASE.dll => /c/Windows/System32/KERNELBASE.dll (0x7ffc3d9b0000)
        advapi32.dll => /c/Windows/System32/advapi32.dll (0x7ffc406b0000)
        msvcrt.dll => /c/Windows/System32/msvcrt.dll (0x7ffc3f930000)
        sechost.dll => /c/Windows/System32/sechost.dll (0x7ffc3fe60000)
        RPCRT4.dll => /c/Windows/System32/RPCRT4.dll (0x7ffc3e5e0000)
        ws2_32.dll => /c/Windows/System32/ws2_32.dll (0x7ffc40800000)
        bcrypt.dll => /c/Windows/SYSTEM32/bcrypt.dll (0x7ffc3c7f0000)
        CRYPTBASE.DLL => /c/Windows/SYSTEM32/CRYPTBASE.DLL (0x7ffc3c550000)
2023-11-13 02:27:07 +01:00
Jose Quintana
fa0cca564a refactor: statically link the c runtime on windows msvc x86_64
now the resulting EXE (x86_64-pc-windows-msvc) will not depend on the VCRUNTIME140.dll

before:
ldd target/release/static-web-server.exe
        ntdll.dll => /c/Windows/SYSTEM32/ntdll.dll (0x7ff9bdeb0000)
        KERNEL32.DLL => /c/Windows/System32/KERNEL32.DLL (0x7ff9bc210000)
        KERNELBASE.dll => /c/Windows/System32/KERNELBASE.dll (0x7ff9bb640000)
        advapi32.dll => /c/Windows/System32/advapi32.dll (0x7ff9bc510000)
        msvcrt.dll => /c/Windows/System32/msvcrt.dll (0x7ff9bddd0000)
        sechost.dll => /c/Windows/System32/sechost.dll (0x7ff9bdb80000)
        RPCRT4.dll => /c/Windows/System32/RPCRT4.dll (0x7ff9bcb40000)
        ws2_32.dll => /c/Windows/System32/ws2_32.dll (0x7ff9bdb10000)
        bcrypt.dll => /c/Windows/System32/bcrypt.dll (0x7ff9bbde0000)
        ucrtbase.dll => /c/Windows/System32/ucrtbase.dll (0x7ff9bbb30000)
        VCRUNTIME140.dll => /c/Windows/SYSTEM32/VCRUNTIME140.dll (0x7ff9b29a0000)
        CRYPTBASE.DLL => /c/Windows/SYSTEM32/CRYPTBASE.DLL (0x7ff9bae70000)

after:
ldd static-web-server.exe
        ntdll.dll => /c/Windows/SYSTEM32/ntdll.dll (0x7ff9bdeb0000)
        KERNEL32.DLL => /c/Windows/System32/KERNEL32.DLL (0x7ff9bc210000)
        KERNELBASE.dll => /c/Windows/System32/KERNELBASE.dll (0x7ff9bb640000)
        advapi32.dll => /c/Windows/System32/advapi32.dll (0x7ff9bc510000)
        msvcrt.dll => /c/Windows/System32/msvcrt.dll (0x7ff9bddd0000)
        sechost.dll => /c/Windows/System32/sechost.dll (0x7ff9bdb80000)
        RPCRT4.dll => /c/Windows/System32/RPCRT4.dll (0x7ff9bcb40000)
        ws2_32.dll => /c/Windows/System32/ws2_32.dll (0x7ff9bdb10000)
        bcrypt.dll => /c/Windows/System32/bcrypt.dll (0x7ff9bbde0000)
        CRYPTBASE.DLL => /c/Windows/SYSTEM32/CRYPTBASE.DLL (0x7ff9bae70000)
2023-06-08 00:00:49 +02:00