tree: d617ba480de6492a8ed282671cabf26f902dc825 [path history] [tgz]
  1. BUILD.gn
  2. OWNERS
  3. README.md
  4. arraysize.h
  5. arraysize_unittest.cc
  6. build_config.h
  7. command_line.cc
  8. command_line.h
  9. command_line_unittest.cc
  10. compiler_specific.h
  11. debug/
  12. functional/
  13. fxl_export.h
  14. log_level.h
  15. log_settings.cc
  16. log_settings.h
  17. log_settings_command_line.cc
  18. log_settings_command_line.h
  19. log_settings_state.cc
  20. log_settings_unittest.cc
  21. logging.cc
  22. logging.h
  23. logging_unittest.cc
  24. macros.h
  25. memory/
  26. meta/
  27. observer_list.h
  28. observer_list_unittest.cc
  29. strings/
  30. synchronization/
  31. test/
  32. third_party/
  33. time/
src/lib/fxl/README.md

Fuchsia Template Library

A library containing basic C++ building blocks, such as logging and reference counting.

This library builds for both host (this includes Linux, Windows, and macOS) as well as target (i.e., Fuchsia) platforms and is not source or binary stable. On both host and target, we build with C++14.

Should I put my thing in FXL?

In an ideal world, FXL wouldn‘t exist and we could use the C++ standard library’s building blocks. Unfortunately, the C++ standard library is missing some important functionality (e.g., logging) and makes some design choices we disagree with (e.g., sizeof(std::shared_ptr) == 2*sizeof(void*), std::chrono lacking a defined scalar representation). FXL exists to fill in those gaps in the standard library.

It‘s easy for these types of libraries to accrete a large amount of code because they’re convenient places to share code. We‘d like to keep FXL small and focused on the problem of “fixing” the C++ standard library, which means you probably shouldn’t put your thing in FXL unless it is related to a particular deficiency of the C++ standard library.

If you look at the library, you‘ll see we haven’t quite lived up to this ideal, but hope springs eternal.

What currently exists in FXL that should be moved out?

Most, if not all, of the code in files should be split out into its own library. That code is already in a separate namespace to make that move easier in the future.