folly | An open-source C++ library developed and used at Facebook
kandi X-RAY | folly Summary
kandi X-RAY | folly Summary
. 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
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of folly
folly Key Features
folly Examples and Code Snippets
Community Discussions
Trending Discussions on folly
QUESTION
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:11After 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:
QUESTION
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:47I 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:
QUESTION
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:17I 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
.
QUESTION
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:53Firebase/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
.
QUESTION
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.:
- https://github.com/conan-io/conan-center-index/blob/master/recipes/folly/all/conanfile.py#L117
- https://github.com/conan-io/conan-center-index/blob/master/recipes/crc32c/all/conanfile.py#L58
- https://github.com/conan-io/conan-center-index/blob/master/recipes/azure-storage-cpp/all/conanfile.py#L71
- https://github.com/conan-io/conan-center-index/blob/master/recipes/caf/all/conanfile.py#L105
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:15Avoid 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.
QUESTION
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:40I 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:
- Open the
/ios/.xcworkspace
file in Xcode. - Raise the iOS Deployment Target (in my case I only bumped to 10).
- Product > Clean Build Folder, then Product > Run.
- Locate the boost error in the issue navigator and identify which pod the error is listed under (in my case it was RNReanimated).
- Update the node package related to the pod (in my case,
npm update react-native-reanimated
- Finally, run
pod install
After performing those steps, I was able to get my project up and running again.
QUESTION
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 repogit clone https://github.com/flatlogic/react-native-starter.git
Navigate to clonned folder and Install dependenciescd react-native-starter && yarn install
Install Podscd ios && pod install
When I got to the pod install I'm getting that error.
...ANSWER
Answered 2021-Jul-28 at 18:31I 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
QUESTION
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:42Since 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.
QUESTION
I want to enable Hermes for my iOS react native project but I have next error:
...ANSWER
Answered 2021-Nov-25 at 12:48Just set header search paths to fmt
sources directly for RCT-Folly
target in post_install
to resolve this issue:
Podfile:
QUESTION
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:29I had the same problem, and here's what I did to fix it
https://github.com/tanersener/react-native-ffmpeg/issues/148#issuecomment-633371018
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install folly
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
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page