1. 30 Mar, 2017 2 commits
    • Kenton Varda's avatar
      Remame Guarded -> Bounded. · 168cb630
      Kenton Varda authored
      168cb630
    • Kenton Varda's avatar
      WIP use bounded types -- all tests passing. · 093fac4a
      Kenton Varda authored
      TODO:
      - Rename Guarded to Bounded?
      - Consider bounded array (where size and indexes are bounded quantities).
      - Implement non-CAPNP_DEBUG_TYPES fallback.
        - Don't allow casting kj::maxValue to bounded type, this won't work right when not using debug types!
      - Verify that this change doesn't hurt performance.
      093fac4a
  2. 03 Jul, 2015 1 commit
    • Kenton Varda's avatar
      Refactor how messages are imbued with a capability table. · 5413038b
      Kenton Varda authored
      **The problem**
      
      The methods MessageReader::initCapTable() and MessageBuilder::getCapTable() always felt rather hacky. initCapTable() in particular feels like something that should be handled by the constructor. However, in practice, the cap table is often initialized based on a table encoded within the message itself. That is, an RPC message contains a "payload" which includes both the application-level message structure and a table of capabilities. The cap table has to be processed first, then initCapTable() is called on the overall message, before the application structure can safely be read.
      
      The really weird part about this is that even though the cap table only applies to one branch of the message (the payload), it is set on the *whole* MessageReader. This implies, for example, that it would be impossible to have a message that contains multiple payloads. We haven't had any need for such a thing, but an implemnetation that has such artificial limitations feels very wrong.
      
      MessageBuilder has similar issues going in the opposite direction.
      
      All of this ugliness potentially gets worse when we introduce "membranes". We want a way to intercept capabilities as they are being read from or written to an RPC payload. Currently, the only plausible way to do that is, again, to apply a transformation to all capabilities in the message. In practice it seems like this would work out OK, but it again feels wrong -- we really want to take a single Reader or Builder and "wrap" it so that transformations are applied on capabilities read/written through it.
      
      **The solution**
      
      This change fixes the problem by adding a new pointer to each struct/list Reader/Builder that tracks the current cap table. So, now a Reader or Builder for a particular sub-object can be "imbued" with a cap table without affecting any other existing Readers/Builders pointing into the same message. The cap table is inherited by child Readers/Builders obtained through the original one.
      
      This approach matches up nicely with membranes, which should make their implementation nice and clean.
      
      This change unfortunately means that Readers and Builders are now bigger, possibly with some performance impact.
      5413038b
  3. 30 Dec, 2014 1 commit
  4. 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
  5. 09 Nov, 2014 1 commit
  6. 26 Oct, 2014 1 commit
  7. 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
  8. 29 Apr, 2014 1 commit
  9. 11 Dec, 2013 1 commit
    • Kenton Varda's avatar
      Eliminate the concept of imbuing messages in favor of the simpler concept of… · 3c7efbb4
      Kenton Varda authored
      Eliminate the concept of imbuing messages in favor of the simpler concept of setting a cap table directly on MessageReader / getting one from MessageBuilder.  This eliminates capability-context entirely.  This was made possible by the earlier change which moved capabilities to a separate table rather than storing CapDescriptors inline, but I didn't realize it at the time.
      3c7efbb4
  10. 04 Oct, 2013 1 commit
  11. 25 Sep, 2013 1 commit
  12. 23 Sep, 2013 1 commit
  13. 22 Jul, 2013 1 commit
  14. 06 Jun, 2013 5 commits
  15. 29 May, 2013 1 commit
  16. 23 May, 2013 1 commit
  17. 18 May, 2013 1 commit
  18. 16 May, 2013 1 commit
  19. 15 May, 2013 1 commit
  20. 11 May, 2013 1 commit
  21. 06 May, 2013 1 commit
  22. 26 Apr, 2013 2 commits
  23. 20 Apr, 2013 1 commit
  24. 15 Apr, 2013 1 commit
  25. 09 Apr, 2013 1 commit
  26. 04 Apr, 2013 1 commit
    • Kenton Varda's avatar
      Update implemented pointer format to match docs: Don't store field count in… · 95be334d
      Kenton Varda authored
      Update implemented pointer format to match docs:  Don't store field count in struct pointers because it isn't needed.  Instead extend data and pointer section sizes to 16 bits, which should be enough for anyone.  Also, store offsets from the end of the pointer rather than the beginning, because this makes it possible for them to be zero, which compresses better.  In particular, the root reference will always have a zero offset, so this will shave a byte off of very small packed messages.
      95be334d
  27. 28 Mar, 2013 2 commits
  28. 18 Mar, 2013 1 commit
  29. 16 Mar, 2013 2 commits
  30. 13 Mar, 2013 1 commit
  31. 07 Mar, 2013 1 commit
  32. 05 Mar, 2013 1 commit