1. 26 Aug, 2018 1 commit
  2. 18 Aug, 2018 1 commit
  3. 12 Aug, 2018 1 commit
  4. 11 Jan, 2018 1 commit
    • Kenton Varda's avatar
      Replace all include guards with #pragma once. · 677a52ab
      Kenton Varda authored
      @kloepper pointed out a while back that every compiler you've ever heard of supports this. Plus, it's more concise, it's not prone to copy-paste errors, and it looks nicer.
      
      At the time I wanted to remain consistent and I didn't feel like spending the time to update all my existing code. But, every time I've added a new header since I've cursed the include guard, so I finally broke down and changed it.
      677a52ab
  5. 28 Dec, 2017 1 commit
  6. 19 Sep, 2017 1 commit
  7. 29 May, 2017 1 commit
    • Harris Hancock's avatar
      Fix build error in MSVC · c4629e37
      Harris Hancock authored
      Closes #479.
      
      If T is a template instantiation and `List<T, kind<T>()>` is the return or
      parameter type of a function (notably get, set, init, adopt, and disown
      functions) defined out-of-line from its definition, MSVC fails to match
      the definition with its declaration. This seems to be another consequence
      of poor expression SFINAE / constexpr support.
      
      An easy workaround is to avoid using kind<T>() and instead manually
      instantiate Kind_<T>, as in lite mode. When I converted Kind_<T> to use
      VoidSfinae, I had thought this solved the problem, but clearly there are
      still edge cases.
      c4629e37
  8. 29 Apr, 2017 1 commit
  9. 31 Mar, 2017 1 commit
  10. 30 Mar, 2017 4 commits
  11. 24 Mar, 2017 1 commit
  12. 24 Jan, 2017 1 commit
  13. 20 May, 2016 3 commits
  14. 06 Apr, 2016 1 commit
  15. 02 Apr, 2016 1 commit
  16. 06 Aug, 2015 1 commit
    • Kenton Varda's avatar
      WIP JSON encoder/decoder library. Currently only encodes. · e3e9ce8d
      Kenton Varda authored
      The library allows for registering special handlers for specific types or fields. This is particluarly useful for overriding the way `Data` is encoded (since many approaches exist) or supporting encodings like EJSON or Q which extend JSON with special types encoded as objects with field names perfixed by dollar signs.
      
      Not integrated into build system yet (but builds nicely with Ekam). I think this is going to need to be a separate library, e.g. libcapnp-json, because clearly a lot of Cap'n Proto users don't need it at all.
      
      For the moment, this was written for use inside Sandstorm. There is no current need for a decoder, so I have not written that yet and have no immediate plans to do so. But it will be added before any official Cap'n Proto release, certainly. A simple recursive descent parser should be easy...
      e3e9ce8d
  17. 11 Apr, 2015 1 commit
  18. 01 Apr, 2015 1 commit
  19. 30 Dec, 2014 1 commit
  20. 12 Dec, 2014 1 commit
  21. 24 Nov, 2014 1 commit
    • Kenton Varda's avatar
      MSVC: All lite-mode tests pass. · ebce4aa6
      Kenton Varda authored
      The project file still only compiles a test binary, but it should be easy to separate out a library project from here.
      
      Thanks again to Bryan Boreham <bjboreham@gmail.com> for much help getting this working.
      ebce4aa6
  22. 22 Nov, 2014 1 commit
  23. 09 Nov, 2014 2 commits
  24. 31 Oct, 2014 1 commit
  25. 26 Oct, 2014 1 commit
    • Kenton Varda's avatar
      Implement "lite mode", where reflection is disabled. · c772a700
      Kenton Varda authored
      To use, pass --disable-reflection to the configure script.
      
      This produces a smaller runtime library. However, using it for this purpose is not recommended. The main purpose of lite mode is to define a subset of Cap'n Proto which might plausibly compile under MSVC. MSVC still lacks full support for constexpr and expression SFINAE; luckily, most of our use of these things relates to reflection, and not all users need reflection.
      
      Cap'n Proto lite mode inherits its name from Protocol Buffers' lite mode. However, there are some key differences:
      
      - Protobuf generated code included global constructors related to registering descriptors and extensions. For many people, this was the main reason to use lite mode: to get rid of these global constructors and achieve faster startup times. Cap'n Proto, on the other hand, never had global constructors in the first place.
      
      - Schemas are actually still available in lite mode, though only in their raw (Cap'n Proto structure) form. Only the schema API (which wraps the raw schemas in a more convenient interface) and reflection API (which offers a convenient way to use the schemas) are unavailable.
      
      - Lite mode is enabled in an application by defining CAPNP_LITE rather than by specifying an annotation in the schema file. This better-reflects real-world usage patterns, where you typically want to enable lite mode application-wide anyway.
      
      - We do not build the lite mode library by default. You must request it by passing --disable-reflection to the configure script. Before you can do that, you must have a prebuilt Cap'n Proto compiler binary available, since the compiler can't be built without reflection.
      
      - Relatedly, the lite mode library is built with the same name as the full library. This library is not intended to be installed. If anything it should be statically linked. But, mostly the option only exists on non-MSVC platform to give us a way to test that we haven't broken lite mode.
      c772a700
  26. 20 Oct, 2014 1 commit
    • Kenton Varda's avatar
      Generics: Tag generated types using members rather than template specialization. · 490acec8
      Kenton Varda authored
      That is to say, whereas previously we would extend capnp::typeId<T>() to a new type by declaring a specialization of it for that type, now we instead have the type contain a nested class called _capnpPrivate which contains a `typeId` constant.
      
      This is necessary because it is impossible to specialize a template for a type which is itself nested inside a template type. E.g. it's impossible to write a specialization `template <typename T> typeId<Foo<T>::Bar>()`; C++ simply doesn't support this. But with generics, Cap'n Proto will allow types to be nested inside templates, so we need this to work.
      490acec8
  27. 20 Jun, 2014 1 commit
    • Kenton Varda's avatar
      Change license to MIT. · 889204fe
      Kenton Varda authored
      For portions currently copyright by Kenton (most of it), transfer copyright to Sandstorm Development Group, Inc. (Kenton's company).
      
      The license change is practically meaningless, as MIT and BSD 2-clause are legally equivalent. However, the BSD 2-clause license is sometimes confused for its ugly siblings, BSD 3-clause and BSD 4-clause. The MIT license is more immediately recognizeable for what it is.
      
      Rémy Blank and Jason Choy (the two non-trivial contributors) are on record as approving this change:
      
      https://groups.google.com/d/msg/capnproto/xXDd2HUOCcc/gbe_COIuXKYJ
      889204fe
  28. 07 Dec, 2013 1 commit
  29. 06 Dec, 2013 1 commit
  30. 16 Oct, 2013 1 commit
  31. 15 Oct, 2013 1 commit
  32. 12 Oct, 2013 1 commit
  33. 24 Sep, 2013 1 commit
    • Kenton Varda's avatar
      Revamp generated interface to Object fields. Now there is an… · 2b643930
      Kenton Varda authored
      Revamp generated interface to Object fields.  Now there is an ObjectPointer::{Reader,Builder}.  This will simplify the dynamic API (next change) and also makes it easier to delegate decisions about the object type to a function that doesn't know about the context where the object lives (i.e. by passing an ObjectPointer::Builder).
      2b643930
  34. 31 Aug, 2013 1 commit