Comments (4)
@Bolderaysky The no_except branch (#156) has been merged, so you can now build with -fno-exceptions
from glaze.
Yeah, we currently don't have a no exception option for JSON. Binary reading/writing doesn't throw errors, as it expects proper data generated from the library.
We plan to implement a no exception compile time option for JSON, but there is actually a performance loss when going to another error handling approach (exceptions allow us to reduce the number of branch checks). We also want to make sure we're not over complicating the code base and have a good implementation. But, I have an idea I'll experiment with.
Do you have a target platform that doesn't allow exceptions?
Thanks for bringing this up and hopefully it will be tackled soon.
from glaze.
Thanks for your answer!
Mainly, these platforms are Linux and macOS, where I disable exceptions and do everything explicitly.
It is possible to work around that by compiling a part of the project that uses Glaze as a shared library and only use exceptions in that library. However, it would be great to see such an opportunity in Glaze, since there are platforms where the use of exceptions is not allowed at all.
from glaze.
Yeah, we want to be able to build on embedded hardware in the future, so disabling exceptions is required. Thanks for the encouragement to work on this.
from glaze.
Related Issues (20)
- Unexpected and inconsistent behaviour with std::filesystem::path HOT 2
- Copying a `glz::json_t` wraps the value in an extra array. HOT 4
- Investigate large JSON file reading HOT 1
- Weird behaviour with std::optional as first struct member HOT 3
- Support C style arrays for non-character types
- Is that possible for custom error to pop up as rpc::error in json-rpc? HOT 4
- Multiple objects in one buffer HOT 2
- JSON pointer (get_as_json) failing on array of objects HOT 7
- using example from README does not work with gtest and clang++17 HOT 7
- allowing tag property in tagged variant objects HOT 1
- Errors are ugly when trying to write to a const buffer HOT 8
- Set maximum precision for writing floats HOT 4
- Default Constructors breaking write_json Method HOT 2
- [MSVC] `write_json` fails with `std::unordered_map<std::uint32_t, std::string>` HOT 5
- Test volatile support for binary
- Support `format_error()` (& specifically `details::get_source_info()`) for binary `parse_error`? HOT 3
- Split `make_reflectable` to a separate header HOT 5
- The executable glaze_ide is built but not installed HOT 2
- Need more examples and improved documentation HOT 5
- Add support for unions (like variants) HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glaze.