1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2026-10-23 17:08:55 +03:00

37 Commits

Author SHA1 Message Date
Travis Brown
ca755a881f Support building under /build/ directories (#427)
Summary:
Github PR 423[0] changed the way that mvfst chose which headers to install. As part of this, certain directories, for example `/build/`, were filtered out.

Unfortunately this filtering is performed on the absolute path of the source code. If mvfst is cloned underneath any directory which matches one of the filtered directories, then all the header files will be filtered out and no headers installed.

Fix this by changing the initial list to be relative to the source directory such that the filtering cannot mistakenly match on paths outside the mvfst source tree.

[0] https://github.com/facebook/mvfst/pull/423

Pull Request resolved: https://github.com/facebook/mvfst/pull/427

Reviewed By: jbeshay

Differential Revision: D95509252

Pulled By: afrind

fbshipit-source-id: 0dbeb0ece5527c60a2bff82a8ff322744f9675a0
2026-03-07 10:01:50 -08:00
Alan Frindell
4021d7648c remove local FindGlog and use fbcode_builder (#426)
Summary:
Pull Request resolved: https://github.com/facebook/mvfst/pull/426

Falls back to fbcode_builder

Reviewed By: lnicco

Differential Revision: D93892716

fbshipit-source-id: 64cbf7cf40ce05146f3b91024de59fd6368b1edb
2026-02-20 20:09:22 -08:00
Alan Frindell
3e80c40537 Add granular CMake targets with BUILD_SHARED_LIBS support (#423)
Summary:
Pull Request resolved: https://github.com/facebook/mvfst/pull/423

Similar to the folly, fizz, and wangle granular CMake implementations, this adds
granular library targets for mvfst that work with both static and shared library
builds.

Key changes:
- Added MvfstFunctions.cmake with mvfst_add_library() function
- Creates OBJECT libraries for compile-once, use-many pattern
- Creates STATIC libraries (static builds) or INTERFACE libraries linking
  to monolithic mvfst (shared builds)
- Added generate_cmake.py to auto-generate CMakeLists.txt from BUCK files
- Added lint_cmake_sync.py for arc lint integration
- Added MvfstCompatAliases.cmake for backwards compatibility with old target
  names used by downstream projects (proxygen, moxygen, thrift)

Backwards compatibility aliases properly include all transitive dependencies
that the old targets had (e.g., mvfst_server now includes qlogger and fizz
server handshake).

Reviewed By: lnicco, kvtsoy

Differential Revision: D91009061

fbshipit-source-id: f745e05fcf74a6d6b0c9343731e7772bc342ccc9
2026-02-02 14:39:48 -08:00
Carlo Cabrera
df304ef051 Remove DSR libraries from CMake config (#416)
Summary:
These libraries were removed in fc66b07859.

The corresponding targets should be removed from the CMake config or
else doing `find_package(mvfst)` in CMake will fail due to the missing
libraries.

Pull Request resolved: https://github.com/facebook/mvfst/pull/416

Reviewed By: jbeshay

Differential Revision: D89327030

Pulled By: kvtsoy

fbshipit-source-id: 1c9e6d29a0ed61ce0f5fe038339653c7f4c4d0a1
2025-12-16 17:06:30 -08:00
Alan Frindell
74e80eb103 Require boost 1.69 and remote system dep (#410)
Summary:
Pull Request resolved: https://github.com/facebook/mvfst/pull/410

as in title

Reviewed By: sharmafb, jbeshay

Differential Revision: D85165686

fbshipit-source-id: e1707065e557fe863ac77df306f1e6133e0efd59
2025-10-21 16:50:53 -07:00
Aman Sharma
1c81548341 Make quic::decodeQuicInteger use the ContiguousReadCursor
Summary: See title. Currently, all use cases use `quic::follyutils::decodeQuicInteger`, but we're gradually going to migrate mvfst to use `quic::decodeQuicInteger`.

Reviewed By: kvtsoy

Differential Revision: D80472391

fbshipit-source-id: 3b5e893706503652b0eccee0d4c4558e216e3242
2025-08-21 12:43:12 -07:00
Aman Sharma
9fa611aeff Switch quic to use quic::follyutils::decodeQuicInteger
Summary:
The long-term plan is to migrate all the usages of `folly::io::Cursor` within the mvfst library to the `ContiguousReadCursor`. In order to do that, we're going to follow the following sequence:
1. Migrate mvfst to use `quic::follyutils::decodeQuicInteger`.
2. Change the implementation of the existing `decodeQuicInteger` within QuicInteger.h to use the `ContiguousReadCursor`.
3. Slowly initiate the migration of current use cases of `folly::io::Cursor` to the `ContiguousReadCursor`.

Reviewed By: mjoras

Differential Revision: D80374103

fbshipit-source-id: ee1585ba7cb881bd3f8ec178543d7b8de57532b9
2025-08-21 11:00:26 -07:00
Joseph Beshay
c6d8f76e67 Refactor AckScheduler to use it in both PacketScheduler and PacketRebuilder
Summary: The logic for deciding which ACK type to write was duplicated in QuicPacketScheduler and QuicPacketRebuilder. This refactors the logic out into a separate QuicAckScheduler so it can be tested for correction and reused in both places.

Reviewed By: sharmafb

Differential Revision: D69933311

fbshipit-source-id: e4f45688a5d258dd2a57f9f7844407f3efad5f49
2025-02-24 12:32:50 -08:00
Joseph Beshay
1fb818d902 Templatize applySocketOptions to work on both QuicAsyncUDPSocket and folly::AsyncUDPSocket
Summary:
Rather than having a separate copy of applySocketOptions inside QuicServerWorker to work on FollyAsyncUDPSocketAlias (folly::AsyncUDPSocket), this templatizes the SocketUtil function so it can be used with both types and avoid duplication of the socket option filtering logic.

Since the header file only had one other one-line function, I moved that function into the header file as well and removed the SocketUtil.cpp file.

Reviewed By: mjoras, frankfeir

Differential Revision: D52182467

fbshipit-source-id: 7c8aff164edafb12b26746f766ac6e5fc20c88d5
2023-12-15 16:25:45 -08:00
Konstantin Tsoy
5d8686875b Fix internal links for mvfst OSS on github
Summary:
We've changed the repo path on github
(https://fb.workplace.com/groups/osssupport/permalink/24983080194647260/)

Reviewed By: jbeshay

Differential Revision: D47879190

fbshipit-source-id: c92d7ab8ae6277fcfcbd0a2bfd90d4f238a772e7
2023-07-28 13:16:43 -07:00
Luca Niccolini
4e3d2aca6b add async transport to the OSS build
Summary: currently it is not part of the build

Reviewed By: hanidamlaj

Differential Revision: D46703017

fbshipit-source-id: 599f24d851b1322cdc93942466fb7769df0be5b8
2023-06-13 14:45:46 -07:00
Konstantin Tsoy
377260f704 Remove d6d code
Summary: we're not using it

Reviewed By: mjoras

Differential Revision: D43482344

fbshipit-source-id: 05ac6792848e32e7c1bcf53a2df172852b5def62
2023-02-23 20:11:24 -08:00
Konstantin Tsoy
ec7095533e Appease gcc 11.3.0 for mvfst OSS
Summary: Appease gcc 11.3.0 for mvfst OSS

Reviewed By: hanidamlaj

Differential Revision: D42388770

fbshipit-source-id: 811970e4059ccf6d20c2ced8da771bb4257e08a0
2023-01-06 13:15:22 -08:00
Matthew William Edwards
788d8f6392 Add mvfst_LIBRARIES variable definition to mvfst CMake Package
Summary:
Define the `mvfst_LIBRARIES` variable in `mvfst-config.cmake.in`. This will define the variable when `mvfst` is found using the CMake `find_package` function. The `mvfst_LIBRARIES` variable definition is composed of references to the libraries compiled by the `mvfst` CMake project.

Also correct a typo implying that proxygen library is built by the mvfst project.

Reviewed By: kvtsoy

Differential Revision: D39552920

fbshipit-source-id: 7af1c4c4561a9952c702eb8c1ec6d8eb827a8e1c
2022-09-19 10:01:28 -07:00
Luca Niccolini
7127a107fb fix OSS build
Reviewed By: jbeshay

Differential Revision: D34739371

fbshipit-source-id: 9e60ee1c0b664785751b2da1f3b9d9d67386c436
2022-03-08 22:17:19 -08:00
Gilson Takaasi Gil
7f2f302f96 Revert D34351084: Migrate from googletest 1.8 to googletest 1.10
Differential Revision:
D34351084 (715dec85be)

Original commit changeset: 939b3985ab63

Original Phabricator Diff: D34351084 (715dec85be)

fbshipit-source-id: 2fd17e0ccd9d1f1d643f4a372d84cb95f5add1f8
2022-03-03 04:41:46 -08:00
Dimitri Bouche
715dec85be Migrate from googletest 1.8 to googletest 1.10 (#67)
Summary:
X-link: https://github.com/facebookincubator/hsthrift/pull/67

Updating `googletest` from `1.8.0` to `1.10.0`

Reviewed By: mzlee, igorsugak, luciang, meyering, r-barnes

Differential Revision: D34351084

fbshipit-source-id: 939b3985ab63a06b6d511ec8711c2d5863bdfea8
2022-03-03 03:46:03 -08:00
Hani Damlaj
00e67c1bf9 mvfst License Header Update
Reviewed By: lnicco

Differential Revision: D33587012

fbshipit-source-id: 972eb440f0156c9c04aa6e8787561b18295c1a97
2022-01-18 13:56:12 -08:00
Hani Damlaj
2660a288b3 Update Company Name
Summary: - as title

Reviewed By: lnicco

Differential Revision: D33513410

fbshipit-source-id: 282b6f512cf83b9abb7990402661135b658f7bd1
2022-01-13 12:07:48 -08:00
Luca Niccolini
ac33c9e7d3 googletest 1.8.0
Summary: required. not installed with CMake ExternalProject anymore

Reviewed By: xttjsn

Differential Revision: D23700095

fbshipit-source-id: 807105a1e3d4bd837a35e39c6dced53744edd8de
2020-09-14 23:58:35 -07:00
Luca Niccolini
cffb51eade enable tests in getdeps
Summary: properly find the required GMock version (1.8.0) and allow building tests in getdeps

Reviewed By: mjoras

Differential Revision: D16935741

fbshipit-source-id: 46f62511e2feaf553d028e286a862aa5b30393c6
2020-09-14 22:04:29 -07:00
Mohamed Bassem
cad77bd2d5 Move CheckAtomic cmake module out of the shared cmake dir
Summary: Remove the shared CheckAtomic cmake module out of the shared dir and back to the projects that need it.

Reviewed By: lukaspiatkowski

Differential Revision: D19553656

fbshipit-source-id: 5e89b5b9448ef6d6c57ef904a652e9f9a1d5dbb3
2020-01-24 06:06:36 -08:00
Mohamed Bassem
dd4141b870 Update the CheckAtomic CMake module to check for __atomic_fetch_add_4 instead of __atomic_is_lock_free
Summary:
When building with clang, the build fails with:

```
-- Looking for __atomic_is_lock_free in atomic
-- Looking for __atomic_is_lock_free in atomic - not found
CMake Error at cmake/CheckAtomic.cmake:90 (message):
  Host compiler appears to require libatomic, but cannot find it.
Call Stack (most recent call first):
  CMakeLists.txt:75 (include)
```

And the error is:

```
/usr/share/cmake-3.10/Modules/CheckFunctionExists.c:7:3: error: conflicting types for '__atomic_is_lock_free'
  CHECK_FUNCTION_EXISTS(void);
  ^
<command line>:1:31: note: expanded from here
#define CHECK_FUNCTION_EXISTS __atomic_is_lock_free
                              ^
/usr/share/cmake-3.10/Modules/CheckFunctionExists.c:7:3: note: '__atomic_is_lock_free' is a builtin with type 'int (unsigned long, const volatile void *)'
<command line>:1:31: note: expanded from here
#define CHECK_FUNCTION_EXISTS __atomic_is_lock_free
                              ^
/usr/share/cmake-3.10/Modules/CheckFunctionExists.c:17:25: error: too few arguments to function call, expected 2, have 0
  CHECK_FUNCTION_EXISTS();
  ~~~~~~~~~~~~~~~~~~~~~ ^
```

LLVM's CheckAtomic (https://fburl.com/bk14shjt) uses `__atomic_fetch_add_4` so I'm modifying the configs to use it as well to check for the existence of the library.

Reviewed By: yfeldblum

Differential Revision: D19497168

fbshipit-source-id: 64f77487efd16dba49055f6c4cb1cdd0fc4ae6da
2020-01-23 01:58:21 -08:00
Jeff Squyres
b2f4480f00 Portability fixes and compiler warning fixes (#9)
Summary:
* Remove some old kruft and what looks like an old debugging message from `CMakeLists.txt`
* Only use `-Werror=bool-compare` if the compiler actually supports it
* Mark a bunch of C++ method parameters as `FOLLY_MAYBE_UNUSED` to avoid compiler warnings
* Fix a bunch of signed/unsigned comparisons in tests to avoid compiler warnings
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/9

Reviewed By: yangchi

Differential Revision: D15281424

Pulled By: mjoras

fbshipit-source-id: 0d6dc6d30a93032e9ee2e9b7d0873b4a2ecd7650
2019-06-25 15:43:39 -07:00
Udip Pant
bd80684a7b remove module to build fizz as an ExternalProject
Summary: This is no longer necessary now

Reviewed By: yangchi

Differential Revision: D15930219

fbshipit-source-id: d277190811c5f5f507783aeddbd8cedb1284e59a
2019-06-20 23:01:08 -07:00
Udip Pant
d8d153c13b Stop consuming fizz via ExternalProject
Summary:
After changing fizz to export test headers and lib, we do not need to pull in
fizz as an ExternalProject anymore. This simplifies and fixes a lot of build
issues

Reviewed By: yangchi

Differential Revision: D15930220

fbshipit-source-id: dcb01c46b8ade545047c20af2fc5245223afff99
2019-06-20 21:26:41 -07:00
Luca Niccolini
e229fddeaf fix build with QUIC
Summary: fixes #267

Reviewed By: yangchi

Differential Revision: D15885138

fbshipit-source-id: b8ba3d6a8ea96b7325f27d66990d47856dcab3d1
2019-06-19 21:54:28 -07:00
Udip Pant
ecf2922c99 speed up mvfst build by not building fizz test target
Summary:
When consuming fizz as an external target, it's wasteful to build test targets
of fizz.
This should fix the travis build timeout of mvfst in oss:
https://travis-ci.com/facebookincubator/mvfst/builds/114688200

Reviewed By: yangchi

Differential Revision: D15712260

fbshipit-source-id: 2c7c1262bb40962c169f5f922e1343e9ab27410e
2019-06-07 00:01:17 -07:00
Udip Pant
97a2ccc4ae fix oss build failure due undefined symbol in folly
Summary: Fix for the issue https://github.com/facebookincubator/mvfst/issues/22

Reviewed By: mingtaoy

Differential Revision: D15709201

fbshipit-source-id: 474a4af4d08f631dbf294210181b13e582c972eb
2019-06-06 20:40:45 -07:00
Luca Niccolini
b2e2b13418 Fix CMake component
Reviewed By: udippant

Differential Revision: D15328523

fbshipit-source-id: cf20a76bb6e05f7b536fdc7ce663a9bf9de89d19
2019-05-13 22:41:37 -07:00
Jeff Squyres
2b464bb1e7 ExternalProject: log to stdout instead of files (#8)
Summary:
If you specify the `LOG_*` directives, then nothing appears on stdout
while the external project is building.  On my Mac, this means it sits
at the Fizz build step for 4+ minutes with no visible progress in the
terminal.

Removing the `LOG_*` directives means that cmake will display all the
output to stdout instead of to files.  This is consistent with the
build behavior for Folly (which is not a cmake ExternalProject).  If
logging the external project builds is desired, the user can capture
the output of the build_helper.sh.

Signed-off-by: Jeff Squyres <jeff@squyres.com>
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/8

Reviewed By: lnicco

Differential Revision: D15267875

Pulled By: udippant

fbshipit-source-id: 138c0f1af6679d2c6e5bbb243d7891211763820c
2019-05-10 13:00:01 -07:00
Udip Pant
52620362fd pass in install prefix path to external-projects
Summary:
This adds path of newly built dependencies so that 'external-projects' such as
fizz can find them

Reviewed By: lnicco

Differential Revision: D15253200

fbshipit-source-id: 993bb030e3a3800697215af089e24482b664d782
2019-05-07 18:44:00 -07:00
Udip Pant
d92acd1225 consume fizz as an external project in cmake
Summary: Favor standalone cmake config than relying on custom script

Reviewed By: siyengar

Differential Revision: D15227020

fbshipit-source-id: 949885b06daeef5e496bf5f1b67a2a3a89750ebf
2019-05-06 16:56:29 -07:00
Udip Pant
3bddebdca3 always pull in googletest-1.8 as external project
Summary:
Relying on the default find for gtest / gmock (via LIBGMOCK_FOUND) is set to
true if another version of gmock is already installed and can be incompatible

Reviewed By: siyengar

Differential Revision: D15216828

fbshipit-source-id: 94d6e1a14914181842e34bd262b1a46c59155435
2019-05-06 16:56:29 -07:00
Udip Pant
6e361a20a7 pull in appropriate googletest via cmake ExternalProject
Summary: Do not rely on downloading it via wget in `build_helper.sh`

Reviewed By: siyengar

Differential Revision: D15215226

fbshipit-source-id: aeef31b30964674d80346aa6a1480ce03fdf478d
2019-05-05 13:04:43 -07:00
udippant
79032c7b9b fbshipit-source-id: f498ac5e677b2931d937ba78edd4373ba04dca2a 2019-04-25 21:33:43 -07:00
udippant
50d4939e9e Initial commit of mvfst 2019-04-22 23:42:46 -07:00