folly | An open-source C++ library developed and used at Facebook

 by   facebook C++ Version: v2023.06.12.00 License: Apache-2.0

kandi X-RAY | folly Summary

kandi X-RAY | folly Summary

folly is a C++ library. folly has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

. Folly (acronymed loosely after Facebook Open Source Library) is a library of C14 components designed with practicality and efficiency in mind. Folly contains a variety of core library components used extensively at Facebook. In particular, it’s often a dependency of Facebook’s other open source C efforts and place where those projects can share code. It complements (as opposed to competing against) offerings such as Boost and of course std. In fact, we embark on defining our own component only when something we need is either not available, or does not meet the needed performance profile. We endeavor to remove things from folly if or when std or Boost obsoletes them. Performance concerns permeate much of Folly, sometimes leading to designs that are more idiosyncratic than they would otherwise be (see e.g. PackedSyncPtr.h, SmallLocks.h). Good performance at large scale is a unifying theme in all of Folly.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              folly has a medium active ecosystem.
              It has 25282 star(s) with 5179 fork(s). There are 1038 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 327 open issues and 706 have been closed. On average issues are closed in 167 days. There are 84 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of folly is v2023.06.12.00

            kandi-Quality Quality

              folly has 0 bugs and 0 code smells.

            kandi-Security Security

              folly has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              folly code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              folly is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              folly releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              It has 9341 lines of code, 790 functions and 62 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of folly
            Get all kandi verified functions for this library.

            folly Key Features

            No Key Features are available at this moment for folly.

            folly Examples and Code Snippets

            No Code Snippets are available at this moment for folly.

            Community Discussions

            QUESTION

            RCT-Folly error when using hermes with iOS
            Asked 2022-Mar-20 at 03:32

            When enabling hermes in the Podfile and rebuilding the build it fails due to RCT-Folly. No idea what it does.

            To re-initialise everything I use the following:

            rm -rf node_modules && rm package-lock.json && npm install && cd ios && rm -rf Pods && rm Podfile.lock && pod deintegrate && pod setup && pod install && cd ..

            I also start the metro bundler with:

            npx react-native --reset-cache

            Anyone has a solution?

            The app uses react-native v0.64 and we want to have a better performance using hermes.

            All information:

            ios/Podfile

            ...

            ANSWER

            Answered 2021-Jul-23 at 16:11

            After lots of trial and error I found a working solution. It's a bit strange, but I had to enable Flipper. I did not find a way without it.

            Thanks to this answer: https://github.com/facebook/react-native/issues/31179#issuecomment-831932941 I found out about fixing Pods.

            This is my Podfile now:

            Source https://stackoverflow.com/questions/68497865

            QUESTION

            Fast CRC with PCLMULQDQ *NOT* reflected
            Asked 2022-Mar-07 at 15:47

            I'm trying to write a PCLMULQDQ-optimized CRC-32 implementation. The specific CRC-32 variant is for one that I don't own, but am trying to support in library form. In crcany model form, it has the following parameters:

            width=32 poly=0xaf init=0xffffffff refin=false refout=false xorout=0x00000000 check=0xa5fd3138 (Omitted residue which I believe is 0x00000000 but honestly don't know what it is)

            A basic non-table-based/bitwise implementation of the algorithm (as generated by crcany) is:

            ...

            ANSWER

            Answered 2022-Mar-07 at 15:47

            I have 6 sets of code for 16, 32, 64 bit crc, non-reflected and reflected here. The code is setup for Visual Studio. Comments have been added to the constants which were missing from Intel's github site.

            https://github.com/jeffareid/crc

            32 bit non-relfected is here:

            https://github.com/jeffareid/crc/tree/master/crc32f

            You'll need to change the polynomial in crc32fg.cpp, which generates the constants. The polynomial you want is actually:

            Source https://stackoverflow.com/questions/71328336

            QUESTION

            M1 Mac react-native iOS build error (in target 'RCT-Folly' from project 'Pods')
            Asked 2022-Feb-25 at 05:11

            On an M1 Mac, with npm 8.3.1 & node 17.4, when I run npx react-native run-ios I receive 2 errors:

            ...

            ANSWER

            Answered 2022-Feb-14 at 09:17

            I ran into a similar issue when updating the project target OS version.

            Actually Xcode will ask you to change the target OS version for the different packages, which then lead to not finding the RCT package anymore for me.

            So when xcode tells you there is a good option to change the target settings for different pods, be very careful with that. Either do it step by step and try out or leave it as is, as long as it is building and running.

            npm install then pod install respectively arch -x86_64 pod install since I am also running on M1.

            Since it might have to do something with that as well I would also disable arm64 in xcode your projects target build phases under build settings "excluded architectures" and only install pods with arch -x86_64 pod install.

            Source https://stackoverflow.com/questions/71030835

            QUESTION

            -[FBLPromise HTTPBody]: unrecognized selector sent to instance
            Asked 2022-Feb-23 at 18:54

            Using Firebase Analytics in an ios app, on a phone and simulator using ios 15.4, XCode 13.2.1 (13C100) in a React Native app. The app itself works, but when I try to add unit tests, the test runner fails with the unrecognized selector problem. I have combed the issues on SO, they either ask for more info and die on the vine, or reference the same four issues on Firebase's github.

            The Podfile (below) doesn't have use_frameworks! so it's unlikely that duplicate symbols are the culprit. I tried the one concrete piece of advice from the github issues, pod deintegrate and recreate Podfile.lock, to no avail.

            Here is the crash log, and below is the Podfile:

            ...

            ANSWER

            Answered 2022-Feb-02 at 21:53

            Firebase/MLVision has been deprecated for a few years, so there may be some incompatible versions mixed into the app.

            Best bet is to update to GoogleMLKit. If not that, you may be able to find compatible old versions by exploring the information in the generated Podfile.lock.

            Source https://stackoverflow.com/questions/70959972

            QUESTION

            How to propagate conan's compiler.cppstd setting to the compiler when building a library with CMake?
            Asked 2022-Feb-17 at 14:15

            If you build a library with conan and set compiler.cppstd setting to e.g. 20 and call conan install, the libraries are still built with the default standard for the given compiler.

            The docs say:

            The value of compiler.cppstd provided by the consumer is used by the build helpers:

            • The CMake build helper will set the CONAN_CMAKE_CXX_STANDARD and CONAN_CMAKE_CXX_EXTENSIONS definitions that will be converted to the corresponding CMake variables to activate the standard automatically with the conan_basic_setup() macro.

            So it looks like you need to call conan_basic_setup() to activate this setting. But how do I call it? By patching a library's CMakeLists.txt? I sure don't want to do that just to have the proper standard version used. I can see some recipes that manually set the CMake definition based on the setting, e.g.:

            But this feels like a hack either. So what is the proper way to make sure libraries are built with the compiler.cppstd I specified?

            ...

            ANSWER

            Answered 2022-Feb-17 at 14:15

            Avoid patching, it's ugly and fragile, for each new release you will need an update due upstream's changes.

            The main approach is a CMakeLists.txt as wrapper, as real example: https://github.com/conan-io/conan-center-index/blob/5f77986125ee05c4833b0946589b03b751bf634a/recipes/proposal/all/CMakeLists.txt and there many others.

            Source https://stackoverflow.com/questions/71156246

            QUESTION

            Updated React Native, can't find 'boost' dependency in Podfile
            Asked 2022-Jan-24 at 12:33

            As mentioned in my question title, I'm trying to run pod install following an update to React Native 0.66, and I keep getting the following error:

            ...

            ANSWER

            Answered 2021-Oct-20 at 14:40

            I recently encountered a similar issue with boost after updating react native. After the panic wore off, and some good coffee, I was able to resolve by doing the following:

            1. Open the /ios/.xcworkspace file in Xcode.
            2. Raise the iOS Deployment Target (in my case I only bumped to 10).
            3. Product > Clean Build Folder, then Product > Run.
            4. Locate the boost error in the issue navigator and identify which pod the error is listed under (in my case it was RNReanimated).
            5. Update the node package related to the pod (in my case, npm update react-native-reanimated
            6. Finally, run pod install

            After performing those steps, I was able to get my project up and running again.

            Source https://stackoverflow.com/questions/69424677

            QUESTION

            xcrun: error: SDK "iphoneos" cannot be located
            Asked 2021-Dec-15 at 20:35

            I'm not experienced so I can't really pinpoint what is the problem. Thanks for the help.

            I cloned this repo: https://github.com/flatlogic/react-native-starter.git

            And was trying to follow the steps below:

            Clone the repo

            git clone https://github.com/flatlogic/react-native-starter.git

            Navigate to clonned folder and Install dependencies

            cd react-native-starter && yarn install

            Install Pods

            cd ios && pod install

            When I got to the pod install I'm getting that error.

            ...

            ANSWER

            Answered 2021-Jul-28 at 18:31

            I think your pod install working fine and has done its job. You need to set up iPhone SDK on your mac then try to run cd ../ && react-native run-ios.

            Follow this guide : React Native Environment set up on Mac OS with Xcode and Android Studio

            Source https://stackoverflow.com/questions/68565356

            QUESTION

            Max capacity for FBString?
            Asked 2021-Dec-03 at 09:42

            For FBString, max_size() simply returns std::numeric_limits::max(). However, the higher two bits of capacity_ in struct MediumLarge is used to denotes the type of FBString(small/medium/large), which means the max of capacity_ will be 2^62-1(64-bit processor), it's less than the max value of size_t. Do I misunderstand the implementation or is this actually a bug?

            ...

            ANSWER

            Answered 2021-Dec-03 at 09:42

            Since the documentation for folly::FBString claims to be:

            100% compatible with std::string

            it actually seems to be a bug (in my opinion).

            BTW, for large strings, FBString applies copy-on-write (COW), which also breaks the compatibility with std::string (since C++11).

            See Legality of COW std::string implementation in C++11 for more details.

            I would guess that they simply do not care about strings of unrealistic lengths (nowadays). The incompatibility due to COW might be much more severe.

            Source https://stackoverflow.com/questions/69567737

            QUESTION

            React Native: RCT-Folly fatal error - 'fmt/compile.h' file not found
            Asked 2021-Nov-25 at 13:01

            I want to enable Hermes for my iOS react native project but I have next error:

            ...

            ANSWER

            Answered 2021-Nov-25 at 12:48

            Just set header search paths to fmt sources directly for RCT-Folly target in post_install to resolve this issue:

            Podfile:

            Source https://stackoverflow.com/questions/70111403

            QUESTION

            RCT-FOLLY - Thread-local storage is not supported for the current target
            Asked 2021-Nov-18 at 13:29

            When I try to build my react-native project in Xcode I get this error from RCT-Folly:

            {path}/App/ios/Pods/RCT-Folly/folly/container/detail/F14Table.cpp:41:10: Thread-local storage is not supported for the current target

            {path}/App/ios/Pods/RCT-Folly/folly/container/detail/F14Table.cpp:56:10: Thread-local storage is not supported for the current target

            I'm not really sure what is going on so im not sure what information I need to provide but here is my Podfile:

            ...

            ANSWER

            Answered 2021-Nov-18 at 13:29

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install folly

            Because folly does not provide any ABI compatibility guarantees from commit to commit, we generally recommend building folly as a static library. folly supports gcc (5.1+), clang, or MSVC. It should run on Linux (x86-32, x86-64, and ARM), iOS, macOS, and Windows (x86-64). The CMake build is only tested on some of these platforms; at a minimum, we aim to support macOS and Linux (on the latest Ubuntu LTS release or newer.). This script is used by many of Meta’s OSS tools. It will download and build all of the necessary dependencies first, and will then invoke cmake etc to build folly. This will help ensure that you build with relevant versions of all of the dependent libraries, taking into account what versions are installed locally on your system. It’s written in python so you’ll need python3.6 or later on your PATH. It works on Linux, macOS and Windows. The settings for folly’s cmake build are held in its getdeps manifest build/fbcode_builder/manifests/folly, which you can edit locally if desired.
            This script will download and build all of the necessary dependencies first, and will then invoke cmake etc to build folly. This will help ensure that you build with relevant versions of all of the dependent libraries, taking into account what versions are installed locally on your system. getdeps.py currently requires python 3.6+ to be on your path. getdeps.py will invoke cmake etc.
            installed/folly/lib/libfolly.a: Library
            If you don’t want to let getdeps invoke cmake for you then by default, building the tests is disabled as part of the CMake all target. To build the tests, specify -DBUILD_TESTS=ON to CMake at configure time. NB if you want to invoke cmake again to iterate on a getdeps.py build, there is a helpful run_cmake.py script output in the scratch-path build directory. You can find the scratch build directory from logs or with python3 ./build/fbcode_builder/getdeps.py show-build-dir. Running tests with ctests also works if you cd to the build dir, e.g. ` (cd $(python3 ./build/fbcode_builder/getdeps.py show-build-dir) && ctest).

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular C++ Libraries

            tensorflow

            by tensorflow

            electron

            by electron

            terminal

            by microsoft

            bitcoin

            by bitcoin

            opencv

            by opencv

            Try Top Libraries by facebook

            react

            by facebookJavaScript

            react-native

            by facebookJava

            create-react-app

            by facebookJavaScript

            docusaurus

            by facebookTypeScript

            jest

            by facebookTypeScript