diff --git a/std/capnp/README.md b/std/capnp/README.md index 5f47fe0d..69cd843f 100644 --- a/std/capnp/README.md +++ b/std/capnp/README.md @@ -31,24 +31,21 @@ are actually legal go. However, this is not meant to be a general-purpose solution; it is only intended to work for the base schemas. -# Extra Annotations +# Footnote: annotations get an underscore in certain cases -Under certain circumstances, `capnpc-go` will sometimes generate illegal -go code. As an example, if two declarations `Foo` and `foo` exist in the -schema, `capnpc-go` will capitalize the latter so that it will be -exported, which will cause a name collision. +Under certain circumstances, `capnpc-go` will rename the identifier when it +generates go code. As an example, if two declarations `struct Foo` and +`annotation foo` exist in the schema, `capnpc-go` has to capitalize +`annotation foo` in the generated code. But that would not compile since +there is already a `Foo` from `struct Foo`. -To address this kind of issue, some of the schema have been manually -modified after importing, adding `$Go.name` annotations which prevent -these errors. +To address this kind of issue, `capnpc-go` will change the annotation to +`Foo_` (by adding the trailing "_"). This can be overridden on a +case-by-case basis if you need some other name. Just add `$Go.name`: -# Versions - -The schemas checked in to this repository are those in capnproto commit -ad4079b (master at the time of writing). Unfortunately, the stable -release is *very* old, and some schemas out in the wild (notably -sandstorm) have started expecting more recent versions of the base -schemas. +``` +annotation foo(struct, field) :Void $Go.name("fooAnnotation"); +``` # Directory Structure diff --git a/std/capnp/c++.capnp b/std/capnp/c++.capnp index bcad244b..d1d1aec6 100644 --- a/std/capnp/c++.capnp +++ b/std/capnp/c++.capnp @@ -24,6 +24,29 @@ $namespace("capnp::annotations"); annotation namespace(file): Text; annotation name(field, enumerant, struct, enum, interface, method, param, group, union): Text; + +annotation allowCancellation(interface, method, file) :Void; +# Indicates that the server-side implementation of a method is allowed to be canceled when the +# client requests cancellation. Without this annotation, once a method call has been delivered to +# the server-side application code, any requests by the client to cancel it will be ignored, and +# the method will run to completion anyway. This applies even for local in-process calls. +# +# This behavior applies specifically to implementations that inherit from the C++ `Foo::Server` +# interface. The annotation won't affect DynamicCapability::Server implementations; they must set +# the cancellation mode at runtime. +# +# When applied to an interface rather than an individual method, the annotation applies to all +# methods in the interface. When applied to a file, it applies to all methods defined in the file. +# +# It's generally recommended that this annotation be applied to all methods. However, when doing +# so, it is important that the server implementation use cancellation-safe code. See: +# +# https://github.com/capnproto/capnproto/blob/master/kjdoc/tour.md#cancellation +# +# If your code is not cancellation-safe, then allowing cancellation might give a malicious client +# an easy way to induce use-after-free or other bugs in your server, by requesting cancellation +# when not expected. + using Go = import "/go.capnp"; $Go.package("cxx"); $Go.import("capnproto.org/go/capnp/v3/std/capnp/cxx"); diff --git a/std/capnp/compat/json.capnp b/std/capnp/compat/json.capnp index 86b5840f..31662bd9 100644 --- a/std/capnp/compat/json.capnp +++ b/std/capnp/compat/json.capnp @@ -44,6 +44,18 @@ struct Value { # "binary" and "date" types in text, since JSON has no analog of these. This is basically the # reason this extension exists. We do NOT recommend using `call` unless you specifically need # to be compatible with some silly format that uses this syntax. + + raw @7 :Text; + # Used to indicate that the text should be written directly to the output without + # modifications. Use this if you have an already serialized JSON value and don't want + # to feel the cost of deserializing the value just to serialize it again. + # + # The parser will never produce a `raw` value -- this is only useful for serialization. + # + # WARNING: You MUST ensure that the value is valid stand-alone JSOn. It will not be verified. + # Invalid JSON could mjake the whole message unparsable. Worse, a malicious raw value could + # perform JSON injection attacks. Make sure that the value was produced by a trustworthy JSON + # encoder. } struct Field { @@ -113,6 +125,7 @@ annotation hex @0xf061e22f0ae5c7b5 (field) :Void; annotation notification @0xa0a054dea32fd98c (method) :Void; # Indicates that this method is a JSON-RPC "notification", meaning it expects no response. + using Go = import "/go.capnp"; $Go.package("json"); $Go.import("capnproto.org/go/capnp/v3/std/capnp/json"); diff --git a/std/capnp/compat/json/json.capnp.go b/std/capnp/compat/json/json.capnp.go index cdd0aa8d..6911c4a3 100644 --- a/std/capnp/compat/json/json.capnp.go +++ b/std/capnp/compat/json/json.capnp.go @@ -28,10 +28,11 @@ const ( Value_Which_array Value_Which = 4 Value_Which_object Value_Which = 5 Value_Which_call Value_Which = 6 + Value_Which_raw Value_Which = 7 ) func (w Value_Which) String() string { - const s = "nullbooleannumberstring_arrayobjectcall" + const s = "nullbooleannumberstring_arrayobjectcallraw" switch w { case Value_Which_null: return s[0:4] @@ -47,6 +48,8 @@ func (w Value_Which) String() string { return s[29:35] case Value_Which_call: return s[35:39] + case Value_Which_raw: + return s[39:42] } return "Value_Which(" + strconv.FormatUint(uint64(w), 10) + ")" @@ -249,6 +252,31 @@ func (s Value) NewCall() (Value_Call, error) { return ss, err } +func (s Value) Raw() (string, error) { + if capnp.Struct(s).Uint16(0) != 7 { + panic("Which() != raw") + } + p, err := capnp.Struct(s).Ptr(0) + return p.Text(), err +} + +func (s Value) HasRaw() bool { + if capnp.Struct(s).Uint16(0) != 7 { + return false + } + return capnp.Struct(s).HasPtr(0) +} + +func (s Value) RawBytes() ([]byte, error) { + p, err := capnp.Struct(s).Ptr(0) + return p.TextBytes(), err +} + +func (s Value) SetRaw(v string) error { + capnp.Struct(s).SetUint16(0, 7) + return capnp.Struct(s).SetText(0, v) +} + // Value_List is a list of Value. type Value_List = capnp.StructList[Value] @@ -666,60 +694,61 @@ func (f DiscriminatorOptions_Future) Struct() (DiscriminatorOptions, error) { return DiscriminatorOptions(p.Struct()), err } -const schema_8ef99297a43a5e34 = "x\xda\x8c\x94_h\x1cU\x18\xc5\xbfs\xef\xdc4f" + - "w\xcd\x0e\xb3/\x85\x96\xf5\xc1\xaa-\x9a6i,\xba" + - "\xd0\xae\xd8\xa6\x14E\xdd\xdb\x88/\xa2pw;\xd1)" + - "\xb3\xb3\xcb\xec\xae&\xfeA\xac\xbeT\xc4?E\x11\x0a" + - "B\xa4\x82\x8f\x8aXPi\xb1\x0d\x09\x1a\x11$\xda\xd6" + - "\x06\xac\x11E\x0c\xa2PD\xc5D\xeb\x95;\xd3fg" + - "7\x06|[\xee\xfd\xed\xb9\xe7;\xdfa\xb6\xfd\x8a\xdb" + - "\xac\xc1\xcc\x82 &\xf7\x88\x1e\xfd\xd1\x0e\xfe\xf6\xfe\xc5" + - "/\x0f\x91L\x89o\xf5\xf0\x83\x857_;\xb2\xf4\x02" + - "\x11\x9c\xb3\xec\xa8s\x81\xad#\x1a=\xcf8\x08\xfa\xf9" + - "\xf9\xad\xc7\xbe\xb9wr\x92^N\x09\xd6\x81\xce\xb2)" + - "g.B?\x8b\xd1};g\xdf\xf8\xf9\x8f\xf9I\xb2" + - "m\xe8g.\xac_\x1a\x19_>F\xc2 \xceI\xf6" + - "\xae3\x13\xfd:\xcd\x1e\xa5\xc4\xb5L!!;\x82u" + - "\x86\x19\xe4\xcf9\xb7\xf2\xeb\x89\xb6\xdf\xc5_4\xd2\xeb" + - "GwmNO\xfd9Ev\x0am:\x92\xde\xfe\xbb" + - "\xc5\xe0@\x98\xff]\xb2\x8c\xb6\xfai\xea\xf1M\xce\xc2" + - "t\x17\x0cC< \xbep\xbc\x88uE\x91\xa0\xcb8" + - ":\xb7\xf8\xca[\x9f\x9b$J\x1d\xe3\x1d\x16\x9f:\xaf" + - "\x1ar\xf4%\x11\x8dw\xe7\xaeM}#\x13\xe7\xbf2" + - "\xe85\x1d\xe8\xd3\xe2\x88s8B\x9f\x8d\xd1\x85\xd7\xcf" + - "\xdd\xfc\xe3u\xd9\xef\xff+\x89\x96\xf8\xd0y2r0" + - "!\x8c\xdb\xe3\x1f\xff\xd0\xb7\xf5;uq\xb5\xecY\xf1" + - "\x983\x1f\xc9\x9e\x89ew>1\xb0\xe1\\\xfe\xfee" + - "\x9aK\x89\xc5\xcee\xcc\x88C\xcel\xc4N\x1bv\xb7" + - ">\xd8\xa8\x05\x03\x15UGP/\x8c\xf9\xaa\xd9\xe4n" + - "P\x02\x90m\xc7CX\xa1XP/\x04\xb5\xa67\xe6" + - "UT\xd3\xab\x05T\x02\x88w\x88\xdc\xa7\xfc\x96\x9b\x1f" + - "\xd8\xad|\xbf\x04\xc8^n\x11Y \xb27\xdfA$" + - "o\xe0\x90\xc3\x0c6\x90\x839\x1c,\x10\xc9\x1b9\xe4" + - ">\x06=\xd6\x0a*\x91*\x11\xd2\xc4\x90&\x14\xeb*" + - "T\xd5\x06\xae&\x94\xb8q\xb5\x92\x12\xc1\x1c\xae~\x9a" + - "H\xf6\"\x19\xedUC\x89\xc6\x89-\xf9\xbd\x9e\xeb\x1f" + - "\xe87\xfe\xe4\x06n\xa5\xb5\x8e\xdc\x1d\xdfB$\xdf\xe1" + - "\x90'\x186\xe2\x1f\x9d\x8d\xfd}p;\x91|\x8fC" + - "\x9eb\xd8\xc8.i\xe4\xc0\x88\xec\x93\xc6\xf6\xfb\x1cr" + - "\x9a!\xc3\xff\xd69p\"\xfb\xb49=\xc1!?a" + - "\xc8X\x7f\xe9\x1c,\"{f\x88H\x9e\xe2\x90_3" + - "d\xc4\xb2\xceA\x10\xd9\xf3\x86=\xc3!/2dz" + - "\x96t\x0e=D\xf6/\xc6\xc5\"\x87\xfc\x8d\xa1?h" + - "\xf9>\xf5'>\xb0\xe7\xc3" + + "\xafO\xc51t\x95u\x8c]\xb4\x13\xec\xeb\x07\xec\x11" + + "\xf9\xb2\xbdO\xde\x05\xecyD\x9e7\xd4[\xf3\xfbw" + + "\xc6\xe7V\xe7`\xc5\xd8A\x87\xd4{F\x94\xa0=\xae" + + "\x0c\xf7>e\xb8\x9d_\xe7\x9e\xdfa/\x7f\xb6\x01L" + + "\x83xS}e\xbf\x13bO\xab,\x18\x14x\xaa\xb9" + + "\xf2\xfa\xbb_\x18'r=\xe3\xcd\xab\xcf\xed\xa6\x0a\xc7" + + "S\xe1x\x0f\xef\xdf10q|\xe1[\x03\xdd\xde\x03" + + "=\xa7N\xda\xf3!\xf4\x93\x16t\xf9\xad\xcb\xf7\xfdr" + + "g\xf2\xc7\xffr\xe2}\xf5\x91\xfda\xa8\xe0l\xa8\xf6" + + "\xec\xf9\x9f\x07v\xfd\xe0\\\xdbLkE\x9f\xb3o\x8d" + + "\x1a\xdad4\xa4\x1d\x7fa\xf8\xb6\xcb\xe9'\xd7\xd1\x8c" + + "\xa9\x95\xdee0z\xc2V\x06;i\xa0\x07\x82\xa3\xf5" + + "\x8a?\\t\xaa\xf4\xab\x99)\xcfi4\xa4\xeb\xe7H" + + "&;\xee\x80m\x94\xf0\xab\x19\xbf\xd2(M\x95\x8aN" + + "\xa3T\xf1\x91#!{H\x9ep\xbci7=|\xc0" + + "\xf1\xbc\x1c\xa9\xfbe\x04\x88\x10\xb0v>\x04\xe8\xbb%" + + "\xf5\x98\xa0E\xa6h\x1eG2\x80\xbeGR\x1f\x16\x0c" + + "\xa6\xa6\xfdb\xc8\x0a0\x0e\xc18\x98\xad:5\xa7\\" + + "\xe7-`N\x1aUm\x93@\xf3\xb8\xb95\xa0\xfb\xd9" + + "\xed\xec\x96\xd1\xae\xc0\xa9\xa1\xf4\xa1\x92\xeb\x1d\x194\xfa" + + "\xf4v\x19\x89\x07A\xa8\xae9\x04\xe8\x8b\x92zAp" + + "\x1b\xff\x09\x92-}\x97\x1e\x04\xf4\x97\x92\xfa\x8a\xe06" + + "\xf1w\xc0\x14\x05`-\x1a\xd9\xdfH\xea\xab\x82\x09\xf9" + + "W\x90\xa2\x04\xac%\xf3\xba \xa9\x7f\x12LD\xfe\x0c" + + "R\x8c\x00\xd6\xf7\xa3\x80\xbe\"\xa9W\x05\x13j=H" + + "Q\x01\xd6\xef\x06{M2\x1f\xa7`\"\xba\x16\xa4\x18" + + "\x05\xec-\x1c\x02\xf2\x11J\xe6\x93\xa6\xd0\xb7\x1a\xa4\xc2" + + "<&x;\x90\xef7\x85\x14\x05\x07\xfdi\xcfC\xf4" + + "\xc5B\xa5\xe2\xb9\x8eOB\x90`\xd6\x9f.\x17\xdc\x1a" + + "c\x10\x8c\x81\xd9z\xa3V\xf2\x9f\xbeaf\xda\xa9\xd5" + + "\x9c\xe37\xf52[)\x1cu\x8b\x8dN\xbd\xeda\xab" + + ">Xt<\x8f\xc9\x8e\x9b \x93`_\xcd9v\xa3" + + "C{\x1d\xd2\xaff\x0e\x96\xea\xc5Z\xa9\\\xf2\x9dF" + + "\xa5\xf6X\xd5l\xb6\x8e\x0d\x990\xae\xdf!\xa9ww" + + "e\xe2\xde\xc9\xeb\x99\xb8\xdf\xcc\xe9\x94\xdd6\xfb\xb3f" + + "\xc1\x8f:e\xd0\xdd\xd4\xd1D\xf3\x90\x09\xb0\xeb\xb7z" + + "\xb1nzEZ\xbdH+a\x1c\xef\x97\xd4)\xc1l" + + "\xb5\xe6N\x95f\xae\x93\xc0\xe2\x00\xd0\xc3t\xa4[;" + + "\xd0\xba\x88\xf6\xcfeC\xee\x0aN\xdd\xdd\xcb\xb1\x9b\xdc" + + "Bv8L\xdc\xff\x19|\xb4s!=\x83\xa7\xc3\xc1" + + "7l,\xd9\xa5\x02Y\xbf\x9ay\xc6\x9d\xd9,\xc1\xd0" + + "\x84\xf2\xe3\x10\xff\x06\x00\x00\xff\xff\xb9?\x99\x93" func RegisterSchema(reg *schemas.Registry) { reg.Register(&schemas.Schema{ diff --git a/std/capnp/cxx/c++.capnp.go b/std/capnp/cxx/c++.capnp.go index 7795bf51..fd7fcdfe 100644 --- a/std/capnp/cxx/c++.capnp.go +++ b/std/capnp/cxx/c++.capnp.go @@ -8,20 +8,25 @@ import ( const Namespace_ = uint64(0xb9c6f99ebf805f2c) const Name_ = uint64(0xf264a779fef191ce) -const schema_bdf87d7bb8304e81 = "x\xda\x12\x08w`1\xe4\x15gb`\x0a\x94`e" + - "\xfb\xaf\x13\xdf\xb0\x7f\xde\xcfc;\x19\x02\xb9X\x19\xff" + - "7\xfa\x19\xec\xa8\xae\xfd\xb1\x97\x81\x81Q\xf0\xe3\"\xc1" + - "\x9f\xec\x0c\x0c\x81_\x98\x19\x19\x18\xff\x9f\x9b\xf8\xf1_" + - "\xe5\xf2\x94O\x0c\x17\xb9X\xff\xb0\xa3(|Z%\xf8" + - "\x12\xa4\xf0\x093#\x83\xee\xffdmm\xbd\xe4\xc4\x82" + - "<\xc6\x02\xab\xbc\xc4\xdc\xd4\xe2\x02\xf6\xc4\xe4\xd4\x00F" + - "FF\x1e\x06&\xb8$\x83=D\x16*\x0e\x08\x00\x00" + - "\xff\xffM^1\xb8" +const AllowCancellation_ = uint64(0xac7096ff8cfc9dce) +const schema_bdf87d7bb8304e81 = "x\xda\x12\xc8v`1\xe4\xcdgb`\x0a\x94ae" + + "\xfb\x7fn\xee\x9f\x9e\xff\xd3\x0a\xd60\\\xe4bed" + + "\xfe\xdf\xe8g\xb0\xa3\xba\xf6\xc7^\x06\x06FaY\xc6" + + "G\xc2\x9a\x8c\xec\x0c\x0c\xc1*\x8c\xcc\x8c\x0c\x8c\xffu" + + "\xe2\x1b\xf6\xcf\xfbyl'C \x17+#\x8aRQ" + + "\xc6E\xc2\xb2`\xa5\x12\x10\xa5\xe7&~\xfcW\xb9<" + + "\xe5\x13\xc8\xd8?\xec(j9\x19\xab\x84y\xc1j9" + + "@ju\xff'kk\xeb%'\x16\xe41\x15X%" + + "\xe6\xe4\xe4\x97;'\xe6%\xa7\xe6\xe4$\x96\xb0g\xe6" + + "\xe7\x050220\xc3\x950\x16X\xe5%\xe6\xa6\x16" + + "\x17\xb0'&\xa7\x06022\xf200\xc1%\x19\xec" + + "!\xb2Pq@\x00\x00\x00\xff\xff\x08\x03GM" func RegisterSchema(reg *schemas.Registry) { reg.Register(&schemas.Schema{ String: schema_bdf87d7bb8304e81, Nodes: []uint64{ + 0xac7096ff8cfc9dce, 0xb9c6f99ebf805f2c, 0xf264a779fef191ce, }, diff --git a/std/capnp/persistent.capnp b/std/capnp/persistent.capnp index 9d353c9e..bdc5c010 100644 --- a/std/capnp/persistent.capnp +++ b/std/capnp/persistent.capnp @@ -120,6 +120,7 @@ annotation persistent(interface, field) :Void; # # Note that absence of the $persistent annotation doesn't mean a capability of that type isn't # persistent; it just means not *all* such capabilities are persistent. + using Go = import "/go.capnp"; $Go.package("persistent"); $Go.import("capnproto.org/go/capnp/v3/std/capnp/persistent"); diff --git a/std/capnp/rpc-twoparty.capnp b/std/capnp/rpc-twoparty.capnp index 9f0c76b4..3a5f89de 100644 --- a/std/capnp/rpc-twoparty.capnp +++ b/std/capnp/rpc-twoparty.capnp @@ -162,10 +162,8 @@ struct JoinResult { # implements the join by waiting for all the `JoinKeyParts` and then performing its own join on # them, then going back and answering all the join requests afterwards. - cap @2 :AnyPointer; + cap @2 :Capability; # One of the JoinResults will have a non-null `cap` which is the joined capability. - # - # TODO(cleanup): Change `AnyPointer` to `Capability` when that is supported. } using Go = import "/go.capnp"; $Go.package("rpctwoparty"); diff --git a/std/capnp/rpc.capnp b/std/capnp/rpc.capnp index 4a54011d..60bc810b 100644 --- a/std/capnp/rpc.capnp +++ b/std/capnp/rpc.capnp @@ -316,7 +316,7 @@ struct Bootstrap { # A Vat may export multiple bootstrap interfaces. In this case, `deprecatedObjectId` specifies # which one to return. If this pointer is null, then the default bootstrap interface is returned. # - # As of verison 0.5, use of this field is deprecated. If a service wants to export multiple + # As of version 0.5, use of this field is deprecated. If a service wants to export multiple # bootstrap interfaces, it should instead define a single bootstrap interface that has methods # that return each of the other interfaces. # @@ -352,7 +352,7 @@ struct Bootstrap { # - Overloading "Restore" also had a security problem: Often, "main" or "well-known" # capabilities exported by a vat are in fact not public: they are intended to be accessed only # by clients who are capable of forming a connection to the vat. This can lead to trouble if - # the client itself has other clients and wishes to foward some `Restore` requests from those + # the client itself has other clients and wishes to forward some `Restore` requests from those # external clients -- it has to be very careful not to allow through `Restore` requests # addressing the default capability. # @@ -415,6 +415,30 @@ struct Call { # `acceptFromThirdParty`. Level 3 implementations should set this true. Otherwise, the callee # will have to proxy the return in the case of a tail call to a third-party vat. + noPromisePipelining @9 :Bool = false; + # If true, the sender promises that it won't make any promise-pipelined calls on the results of + # this call. If it breaks this promise, the receiver may throw an arbitrary error from such + # calls. + # + # The receiver may use this as an optimization, by skipping the bookkeeping needed for pipelining + # when no pipelined calls are expected. The sender typically sets this to false when the method's + # schema does not specify any return capabilities. + + onlyPromisePipeline @10 :Bool = false; + # If true, the sender only plans to use this call to make pipelined calls. The receiver need not + # send a `Return` message (but is still allowed to do so). + # + # Since the sender does not know whether a `Return` will be sent, it must release all state + # related to the call when it sends `Finish`. However, in the case that the callee does not + # recognize this hint and chooses to send a `Return`, then technically the caller is not allowed + # to reuse the question ID until it receives said `Return`. This creates a conundrum: How does + # the caller decide when it's OK to reuse the ID? To sidestep the problem, the C++ implementation + # uses high-numbered IDs (with the high-order bit set) for such calls, and cycles through the + # IDs in order. If all 2^31 IDs in this space are used without ever seeing a `Return`, then the + # implementation assumes that the other end is in fact honoring the hint, and the ID counter is + # allowed to loop around. If a `Return` is ever seen when `onlyPromisePipeline` was set, then + # the implementation stops using this hint. + params @4 :Payload; # The call parameters. `params.content` is a struct whose fields correspond to the parameters of # the method. @@ -496,6 +520,13 @@ struct Return { # The receiver should act as if the sender had sent a release message with count=1 for each # CapDescriptor in the original Call message. + noFinishNeeded @8 :Bool = false; + # If true, the sender does not need the receiver to send a `Finish` message; its answer table + # entry has already been cleaned up. This implies that the results do not contain any + # capabilities, since the `Finish` message would normally release those capabilities from + # promise pipelining responsibility. The caller may still send a `Finish` message if it wants, + # which will be silently ignored by the callee. + union { results @2 :Payload; # The result. @@ -564,6 +595,20 @@ struct Finish { # should always set this true. This defaults true because if level 0 implementations forget to # set it they'll never notice (just silently leak caps), but if level >=1 implementations forget # set it false they'll quickly get errors. + + requireEarlyCancellationWorkaround @2 :Bool = true; + # If true, if the RPC system receives this Finish message before the original call has even been + # delivered, it should defer cancellation util after delivery. In particular, this gives the + # destination object a chance to opt out of cancellation, e.g. as controlled by the + # `allowCancellation` annotation defined in `c++.capnp`. + # + # This is a work-around. Versions 1.0 and up of Cap'n Proto always set this to false. However, + # older versions of Cap'n Proto unintentionally exhibited this errant behavior by default, and + # as a result programs built with older versions could be inadvertently relying on their peers + # to implement the behavior. The purpose of this flag is to let newer versions know when the + # peer is an older version, so that it can attempt to work around the issue. + # + # See also comments in handleFinish() in rpc.c++ for more details. } # Level 1 message types ---------------------------------------------- @@ -707,6 +752,10 @@ struct Disembargo { # is expected that people sending messages to P will shortly start sending them to R instead and # drop P. P is at end-of-life anyway, so it doesn't matter if it ignores chances to further # optimize its path. + # + # Note well: the Tribble 4-way race condition does not require each vat to be *distinct*; as long + # as each resolution crosses a network boundary the race can occur -- so this concerns even level + # 1 implementations, not just level 3 implementations. target @0 :MessageTarget; # What is to be disembargoed. diff --git a/std/capnp/rpc/rpc.capnp.go b/std/capnp/rpc/rpc.capnp.go index dcffa679..5ce1cdc7 100644 --- a/std/capnp/rpc/rpc.capnp.go +++ b/std/capnp/rpc/rpc.capnp.go @@ -805,6 +805,22 @@ func (s Call) SetAllowThirdPartyTailCall(v bool) { capnp.Struct(s).SetBit(128, v) } +func (s Call) NoPromisePipelining() bool { + return capnp.Struct(s).Bit(129) +} + +func (s Call) SetNoPromisePipelining(v bool) { + capnp.Struct(s).SetBit(129, v) +} + +func (s Call) OnlyPromisePipeline() bool { + return capnp.Struct(s).Bit(130) +} + +func (s Call) SetOnlyPromisePipeline(v bool) { + capnp.Struct(s).SetBit(130, v) +} + func (s Call) Params() (Payload, error) { p, err := capnp.Struct(s).Ptr(1) return Payload(p.Struct()), err @@ -1008,6 +1024,14 @@ func (s Return) SetReleaseParamCaps(v bool) { capnp.Struct(s).SetBit(32, !v) } +func (s Return) NoFinishNeeded() bool { + return capnp.Struct(s).Bit(33) +} + +func (s Return) SetNoFinishNeeded(v bool) { + capnp.Struct(s).SetBit(33, v) +} + func (s Return) Results() (Payload, error) { if capnp.Struct(s).Uint16(6) != 0 { panic("Which() != results") @@ -1202,6 +1226,14 @@ func (s Finish) SetReleaseResultCaps(v bool) { capnp.Struct(s).SetBit(32, !v) } +func (s Finish) RequireEarlyCancellationWorkaround() bool { + return !capnp.Struct(s).Bit(33) +} + +func (s Finish) SetRequireEarlyCancellationWorkaround(v bool) { + capnp.Struct(s).SetBit(33, !v) +} + // Finish_List is a list of Finish. type Finish_List = capnp.StructList[Finish] @@ -2884,166 +2916,176 @@ func NewException_Type_List(s *capnp.Segment, sz int32) (Exception_Type_List, er return capnp.NewEnumList[Exception_Type](s, sz) } -const schema_b312981b2552a250 = "x\xda\x9cX\x7f\x8c\x15\xd5\xf5?\xe7\xde\xb7\xef-\xec" + - "\x8f\xf7\x86\x99\x95\xc0\xd7\xcd\xa2\xdf\x9a\x14R\x88\xa8i" + - "\xcd\xb6\xe6!,\x84%K\xd8\xbboi\x0dm\xd2\xce" + - "\xce\xbb\xec\xce2;3\xce\xcc\xc2.\x91\x00-4J" + - "\xddt%j\xd1hk\x8d\x7f\xb4\xd6FD\x8c\xdaB" + - "*\x84\xa6jl\xd5(F\x1bI\xc5\xd4T\x9b\xfea" + - "\xab\xb5*?\xa693\xf3f\x1e\xbboC\xec_\xfb" + - "2\x9f3s\xcf\xfd\x9cs>\x9f{\xf7\xda\x9d\xf9U" + - "\xb9\x95m\x9b\xe6\x01\x13VS>|\xbd\xef\xc1\x89?" + - "UF\x7f\x00b>\xf2\xb0\xff\xe1\x81k\xfe\xef\xd0\x82" + - "'\xa1\x89\x17\x00\xd4\xa9\xdcN\xf5\xae\\\x01\xe0\xfa\xa9" + - "\xdc\x8f\x110<\xfc\xcc\x0f[N\x9d\xf9\xff\xfd\x14\x8d" + - "Y\xf4Z,\xe4\x01T%\x7fR]\x94\xa7\xf0\x8e|" + - "\x14~\xdd\xe1\xa9=]?{\xfa\xae\xd9\xe1\xed\x00\xea" + - "\xb3\x85\x83\xea\x89\x02\x85\x1f/,\xe4\x80\xe1\x89s\xea" + - "-\x83\xda\xb1{f\x873d\xea\x85\xf9'\xd5\xa6\x16" + - "J\x0b[v\x00\x86_\x0f\xee\xbd\xe9j\xbd\xfd~P" + - "\xe6\xd7\x0571\x8a\x90-\x07\xd5\xb1(\xd6\x8cb\xb7" + - "<{\xa1\xe0\xbe" + - "6s{Hi>Q\\\x80\xea\x89(\xfax\x91\x92" + - "0\xda?=yd\xc5\xae\xd7\x1a%\xbc\xa8t@\xbd" + - "\xaaD\xbf:K\x14{\xc5\xaa\xcd\xd3CO\xbd\xf0z" + - "\xa3/\xab\xfbK\x07\xd4\xa9(\xf8\x8e\x12\xa5\xb1\xf1\xcc" + - "\xb7\xe5_\x8e\x0e\x9d\x06\xd1\x81\x18*_;^\xfc\xd1" + - "W\xab\x9f\xc1f,`\x0e\x99\xbaT\xf9;\xa0\xba\\" + - "\xf9\x1b`\xb6\xf7F\x05i[\xf0\xb0\xda\xb1`!\xc0" + - "\xf5\x9d\x0b\xba\x10\xf0w\x0f]\xe9\xfc\xf1\x8d'\xdel" + - "\x94\xc3M\xea\x8bj\xaf\xba\x10@\x15*%|\xdfw" + - "\x7f\xb5\xf8\x93\xc3\xef\xff\x19D\x11y\xd6\xdd\x9by\x01" + - "9r\xf5\xf7*\xe5\xf0\x82J\xe9\x9e\xb2\x17\xae\xdc\xf3" + - "r\xdf\x07\x0d\xf7fj\x0f\xab\xb7j\xf4kL\xa3\xef" + - "\xee\x9d\xfefG\xcf\xddW|\x04b\x11\xa6\x09\xf5\x14" + - "\x18\x80zZ{W=\x1b\x85\x9e\x89B\xd3\x8d7\xcc" + - "\xb7\xe3Qum\x07\xfd\xba\xb9\x83\x82\x1f\xc7w\xa6s" + - "\x87\xce\x9ekH\xc4\xde\x8e\x9d\xea\xfe\x8e\xf8\xd7\xe3\xb0" + - "&\xf4\\c\x85\xa1\xbb6\x94\xdd\xee5\xbae\xf5#" + - "\x8a+y\x0e \x87\x00\xcaS[\x00\xc4Q\x8e\xe29" + - "\x86\x88\x1a\xd2\xb3\xe3\xdd\x00\xe2\x19\x8e\xe2\x14C\x85\xa1" + - "\x86\x0c@91\x04 \x9e\xe3(^b\xa8p\xa6!" + - "\x07P^\xd8\x00 \x9e\xe7(^g\xa84\xa1\x869" + - "\x00\xe5Uz\xfd%\x8e\xe2M\x86\x98\xc7:z\x95\xd3" + - "\x1e0%\xb7G\xc3fD\xe5\xc4I\x00q\x8a\xa3x" + - "\x85ax\xeb\xb8\xf4\x03\xd3\xb1\x81\xf7V\xb1\x19\x186" + - "\x03\x96\x03\xdd\x1b\x96\x01\x96\xb2!\x07\xc4\x12`h\xda" + - "\x81\xf4\xb6\xea\x06\x14do\x15\xe7\x01\xc3y\x80\xe1\x98" + - "\x0cF\x9cjo\x15\x00\xb0\x00\x0c\x0b\x80eW\xf7\xf4" + - "1\x1fK\xd9\xe4'\x9f\xf0\xa5]\x1d\x90\xfe8tY" + - "\x81?\xe8\x84\xbae9;\x06GL\xe6U\xfbu/" + - "\x98\x1c\xd4M\x8b\xe8\x02D`H3[#\x92\x11\x8f" + - "n\x8f\xf4\x0d\xcft\x03\xc7\x83\x84\xd1\xd60\x8c)]" + - "\x06 \x0es\x14\xc7\x18v\xe2\xc50a\xf5\xd9\xd1\x8c" + - "\xd5Nv!\xac\xf1\xeae\xbcv\xf2\xf3\xf48bv" + - "g\xc6l[\xee\\\x98PKO_\xe1(\xdef\xd8" + - "\xd6\xf4y\xa8a\x13\x80\xf2\xd6\x01\x00\xf16G\xf1>" + - "C%\xcf4\"]y\x8f\x0a\xfbW\x8e\xe2C\x86E" + - "\xdb\xb1%\xe4\xa3=Ko\xbd\x03E?\x90)\xcd\xc9" + - "\xe3~\x0f\xba\x9c1\xd3\x97\xe9sO\x1a\xd2\xdc.=" + - "(\xafw.y!\x03n\xb6\xfd\x1d\xd2\xc3R\xad\xb9" + - "\x13r\x83\x113\xa2\x11\x83\xc9\xf8U\x00,e\x8a\x93" + - "D\xe9A\xa0\x1b#\xb2\x0a|]\x15\xf3\xc0\x9a\xf2a" + - "\x1d\xcd\xe8vo\x94\xbe\xaf\x0f\xa3$\x82oL\x09V" + - "'\xd1\x03\xa8L \xc7\xca>d\xd8\x86\x17\xc3\x88b" + - "u/^\x07P\xb9\x8d\x80\xdb\x09\xe0\x17\xc2\x88du" + - "?.\x03\xa8\xec!\xe0N\x02r\xe7\xc3\x88f\xf5\x0e" + - "\xec\x06\xa8\xec#`\x9a\x80\xa6\x84iu*\x02n'" + - "\xe0n\x02\xf2\x09\xd9\xea]\xb8\x1a\xa0r'\x01\x87\x08" + - "(|\x16jHFvO\x04L\x13\xf0\x00\x01\xf3>" + - "\x0d\xb5hz\xef\xc3Q\x80\xca!\x02\x1e!\x80\xfd'" + - "\xd4\xb0\x19@\xfd9\x0e\x00T\x1e\"\xe01\x02\xe6\x7f" + - "\x12j8\x0f@\xfd%\xee\x04\xa8\xfc\x82\x80\xa3\x04\xb4" + - "\xfc;\xd4p>\x80\xfaD\xb4\xc6c\x04O" + - "TF\xc1G\x01*\x1a\x01Kh\x9e\xf5\xa8\xec\xb1\x19" + - "f\xba\x1d\x8dQ?\x92)\xae\xd1]\x1f\"wk\"" + - "{\xa3\xe9\x1b\xb7\x82FV)'\xa8\xf7M\x07\xd0\x9e" + - "=\xfe\xa1\xa1\xdb\x86\xb4H\xe2\x0ba\xf2\x8d\x0aJ;" + - "Xk\xf9rGqDz\xe4<\x81\xbeM\xae\xf3\x9c" + - "1\xdc\x14\x8cHO\x8c\xcb\xae\xa8Zif\xf1x\xad" + - "\xf3\xd0\x19\x1b\x8c\xbc\xa3H\x1e\xdc\xb86\xb4\x87\xb8i" + - "\xea\x9auq\xa3f\xdd\x994\xeb\x8d\x0c\xb9Yo_" + - "[\xa5'm\x03\xcar\x8d3n\x07\x19\x90M\xe5\xda" + - "d\xcf\xf6\x8a\xc1IW\xc6\xadP\x8aj\xbb\xb4\x9bv" + - "\xae\\\xb5\x05\x00\x99\xd29\x0a\x80\\Y\xe4\x01\x94\xb7" + - "\xea\xa6%\xab\xa1\xb3]z\x96\xa3W\x81\xcb*\xe9\x80" + - "\xe1\xd8\xb6\x84\xa2\x11\xc8\xeaL\x95\xbdtc\xa4~\xb3" + - "\xa6a \x9b\x866\x0c\x13\x01\xd8xu6\x0fm\xec" + - "b\xd8` \x12\x01\xe8\x05L7^0tw\xc6D" + - "^\xbe\xbc\xb5\x0c\xb9\xdb=\x98\xb8z0Y\x7f\xfeA" + - "o\xeeR\xa4\x95\xe8\xced\x8c*\x91\xd4\xb5\xbc\xdd\xb4" + - "eou\x16\xff\xe8v\xaf\x8bL\x02`\xc6\xb7\xb7d" + - "\xdfIGp\xe5A\x00q\x03G\xb1j\x0e\x1d\xa8\xf5" + - "\xfd\x00F\xedI2\xe9\xa7}_\xbf\xe8\xcdQ\x17\xc6" + - "\x8b^F\x90\x88\xea>\x8e\xe2\x16\x12\xa4%1\xff\x9b" + - "W_F\x90\xc2\xc8_\xfc\x98\xea\x9a\xe7D61\xec" + - "4:f\xf6$&2\xec\xac0\x1c\xbb\x18\xc8\x89@" + - "\x94\"s\x88\xb3\xd0\xa9\xc1\xbf\xc7QX5w\xa04" + - "L\x92$\x8b\xa3\x98\xa0\xe6\xb8\x90\x88\xcf8\x95\xc0\xe5" + - "(n#I:\x9f\x88\xcf$\xa5\x1cp\x14{X\xed" + - "\x1c\xd8\xe7@\xd9q\x87tc\xdb\xac\xf3\x1e\xf691" + - "\x92iJb\x8c\x90O\xbd\xb3A1\xe3a*\x98\x8e" + - "-rX\x7f\xa1\xc5eE\x1a/\xa1\xa5d\xef\xa24" + - "'8\x8a}\x0c\x91\xc5\xdb\xdc\xfb\x1b\x00\xb1\x8f\xa3\x98" + - "\xa6\xabG\xa2\xfeS\xf7\x03\x88i\x8e\xe2\x01j\x85\xe4" + - ">r\x1f\x1d\xbd\xef\xe6(\x1eb\xa8\xe4\x92\xfb\xc8\x83" + - "\xd7\x01\x88C\x1c\xc5#\x8cN%\xba\xef\xd8\xd8\x0a\x0c" + - "[\xebN\x02\xd8\xeb\xd3a_ze\x7f\x9d>n\x05" + - "i5\xd2\x80\x9eqO\x1f2-\x93\x07\x93\xb5\xcbE" + - "1\x98t%\x16\xb3\xfd\x00b\x11\xb0+\xf0tC\xa6" + - "K\xd4\xd5\xb3?1\xe5\xd8\x92\x01\"6\xd2K\xa2\x82" + - "\x8b\xf9&w\x8en\xaf5\xde\xca\x81\xc4\xfa\xfb\xe6\xea" + - "\xb1\xc0\xd3m\x7f\xab\xe3\x01\x8ee.\x9c.2\xc3\x85" + - "Y|'\\Q\xbb\x0dYE\xba\x0cQ\xf3GMF" + - "N\xb4\x96*\xb2*^1n\xb2<\x80\xd2\xbb!S" + - " \xba\xcd\xb0\xc8\x85\x14\xb1%\x1b\x81\xb2\x111\x0a\xf9" + - "p\xd2\x19\xf7|im%\x8b\xa8]\x0d\x807\xd6\xf7" + - "\xd5\xd1\xc9\xad\xe0\xe9\xee\xdc\xa3\x9f\x92q\xff\xe5&\xbf" + - "*]O\x1az\x80\xb2\xbaihT\x1a\x01\x813W" + - "\x9dU\x99\xc2\x8aM\xee\xcc\x83\xd8\xb2L\xd5\xea.u" + - "\xcb\xbf\x9fYL\xd1v\x1c\x17\xf2\xe1\xb0\x0c\xfa\x1d\xd3" + - "\x0ePz\xebLiU\xd3\xcbh\xfd6\xe3\xd1.\xd2" + - "l\xcf\xd8gw\xbd|b\xdd?H\x94\xe5\xab\x81\xcd" + - "y\xa6\x89Oc\x13\xc1%\xf7\xfd\x0d\x8ei\xff\xaf\xa7" + - "\xab\xd5\x99\xc2}\xb1\xd3\xd5\xeemr\x92\\\xa2\xc6\xf3" + - "\x7f\x03\x00\x00\xff\xff\x13\x1e\x1c\xb7" +const schema_b312981b2552a250 = "x\xda\x9cX}l\x1c\xd5\xb5?\xe7\xde\xf5\xae\x9dx" + + "\xb3;\x99\x89\x03yD&\xbc \xbdD/Q\x02\xe8" + + "=p\x896\x1fv\x14GN\xe3\xebu\x0a\xa4\xad\xda" + + "\xf1\xee\x8d=\xcexf\x98\x1d'\xde\x88(\x09M*" + + "\x92b\xd5D@\x13DZ\x88\xa8T(\x15!\x80\x80" + + "6\x08\x88\xf8\x03P[\xa8\xf8P\xa9\x88ZPQ\xa1" + + "*\x12\x94\x86&\xe4c\xaa33;\xb3\xb1\xd7E\xf4" + + "/\x8f\xee\xef\xec\xbd\xe7\x9e\x8f\xdf\xef\\/{>\xbd" + + "2\xb5<\xbb\xb1\x05\x980\x9b\xd2\xfe\x9b=G\xc6~" + + "[\x1c\xfe\x1e\x88\x19\xc8\xfd\xde\xa3}W\xff\xd7\xa1\xd9" + + "O@\x13\xcf\x00\xa8\xe3\xa9\x1d\xea]\xa9\x0c\xc0\xb5\xe3" + + ")\x1f\x01\xfdc\xcf|\x7f\xe6K\xa7\xfe{\x1fYc" + + "b\xdd\x85\x994\x80z8}R}0M\xe6G\xd2" + + "?$\xf3k\x8e\x8d\xefn\xff\xc9\xd3wM5\x9f\x05" + + "\xa0\xaej>\xa8v7\x93yW\xf3\\\x0e\xe8\xbfx" + + "N\xbd\xb9_;q\xcfTs\x86L\xdd7\xf3\xa4:" + + ">\x93\xdc\xda?s;\xa0\xff5\xef\xde\x15W\xe9\xb3" + + "\xee\x03eF\x9dq\x13#\x8b\x8fg\x1eTO\x07\xb6" + + "\x9f\x06\xb6\x9b\x1f}\xf1\xdc\xd6\xd4\xf0\xfd\x93v\x0e\x8d" + + "\xf5\xd6\x83\xaa\xd1J_\xb2\xf51@\xbf\xe3\xa6'V" + + "\x8c\x1f\xbf\xfc\xc7d\xcc.\xbd$r\xb5){@\xcd" + + "f\xc9\xeb\x96l\x10\x93\x1fy\xaf\xef\xcc\x9a\xf3~1" + + "io\x0a\x9bzC\xee\xa0\xba*G_+r\xe4\xc7" + + "\xcd\xcf\xf5\x14\xde\xbf\xf7\xce\xe3\xa0h\xcc\x9fg\xbc\xd6" + + "\x91~\xfa\xea\xb7\x01P=\x92{U}80\xfci" + + "n\x10\xd0\xb7\x9a\xf7\x7f\xb1\xe9\xde\x93\xbfj\x1c\x8a\xb7" + + "r\x07\xd5S\x81\xf5;9\xf2x'\xfb\xe4\xbd\x0b\x19" + + "\xe7\x8d\xc9\xd7Cr\xb3\x9a\x9f\x8d\xea\xfe\xfc\x03\x88\x1c\xf2\xa4\xba7\xf1" + + "\x0cr\xe4\xea;\x1a\xf9pJ#w_\xb2\xe6.\xdf" + + "\xfdZ\xcfG\x0d\xef\xb6s\xceQu\xdf\x1c\xfa\xda3" + + "\x87\xf6\xdd3\xf1\x8d9\x9dw\xb7}\x06\xe2r\x8c\x1d" + + "\xea\xcc0\x00\xf5\xa39\xef\xab\xa7\x03\xd3O\x03\xd3\xf8" + + "\xe2\x0d\xfdm{D\xbd\xa5\x8d\xbe6\xb5\x91\xf1c\xf8" + + "\xa7\x89\xd4\xa1\xf7\xce5\x0c\xc4=m;\xd4\xc3m\xe1" + + "\xd7c\xb0\xc6w\x9d\xd2\xd2\x92\xeeXPp:\xd6\xe8" + + "\xa6\xd9\x8b(\x16\xf2\x14@\x0a\x01\x94\x8f7\x03\x88\xbf" + + "q\x14g\x18\"jHk\xa7;\x00\xc4'\x1c\xc5y" + + "\x86\x0aC\x0d\x19\x80rv\x00@\x9c\xe1XL!C" + + "\x853\x0d9\x80\x8a\xb8\x1e\xa0\x0f9\x16[i9\x83" + + "\x1a\xa6\x00\xd4\x16\xec\x00(\xa6h=\x8f\x0c\xb1\x19\xeb" + + "\x82\xacf\xd1\x05\xa6\xa4vk\xb4\xae\x9c=\x09 \xce" + + "s,6\xd3\x0eM{4lAT\x9b\xf0(@\xb1" + + "\x99v\xd0h=}\xbb\x863\x10U%X\xd7h\xfd" + + "Jd\xe8\xdf:*+\x9ea[\xc0\xbb\xcb\xd8\x0c\x0c" + + "\x9b\x01\x0b\x9e\xee\x0eJ\x0f\xf3\x099\x00b\x1e\xd07" + + ",O\xba[\xf4\x12ddw\x19[\x80a\x0b\xa0?" + + "\"\xbd!\xbb\xdc]\x06\x00\xcc\x00\xc3\x0c`\xc1\xd1]" + + "}\xa4\x82\xf9\x841\xa2-*\xd2*\xf7\xc9\xca(\xb4" + + "\x9b^\xa5\xdf\xf6u\xd3\xb4\xb7\xf7\x0f\x19\xcc-\xf7\xea" + + "\xaeW\xed\xd7\x0d\x93\xc2\x0c\x88\xc0\x90z\xdd\xb2{]" + + "{\xc4\xa8\xa0\xec5\x1ci\x1aV\xc6\xb0\x06c\xd4\xb6" + + "\xcc*\xe1hTB\xb5\x18@\x1c\xe3(N0\x9c\x8f\x17\xfd(" + + "\x93\xcf\x0e\x03\x88g8\x8a\x97\x18\xceg\x17\xfc(\x97" + + "/\xba\x00\xe2\x05\x8e\xe2\xd7\x0c\xe7\xf3\xf3\xb4\xcc\x01\x94" + + "Wv\x00\x88\x979\x8a7\x19fS\xe7\xfc \x97\xca" + + "\xefh\xf5u\x8e\xe2]\x86\xd9\xa6/|\x0d\x9b\x00\x94" + + "w\x0e\x00\x88w9\x8a\x0f)9L\xc34\xa2\xf2\x01" + + "\x15\xd3\x9f9\x8aO\x18\xe6,\xdb\x92\x90\x0e\xe2%\xdd" + + "u6\xe4*\x9e\x8cS\x14-\xf7\xba\xd0N\xa1\x91\xf1" + + "\xba+K\xd2\xd8&](\xac\xb3/\xf9A\x02\xac\xb2" + + "*\xdb\xa5\x8b\xf9ZCE\x89\xf1\x86\x8c \x05\xe8U" + + "\xc3\x9f\x02`>a\xb9\xc8J\xf7<\xbd4$\xcb\xc0" + + "\xd7\x961\x0d\xac)\xed\xd7\x85\x19\x9d\x8e\x0d\xb2R\xd1" + + "\x07QR\x80\xaf\x8f\x03\xacV\xd1\x05(\x8eQ\xdd\xed" + + "E\x86Y\xbc\xe8\x07!V\xf7\xe05\x00\xc5\xdb\x08\xb8" + + "\x83\x00~\xc1\x0f\x82\xac\xee\xc3\xc5\x00\xc5\xdd\x04\xdcI" + + "@\xea\xbc\x1f\xf6\xcc\xfe\xa09\xf6\x120A@S\x14" + + "iu<\x00\xee \xe0n\x02\xd2Q\xb0\xd5\xbbp5" + + "@\xf1N\x02\x0e\x11\x909\xebkH\xe2yO\x00L" + + "\x10p?\x01-g|-dY\x1c\x06(\x1e\"\xe0" + + "!\x02\xd8?}\x0d\x9b\x01\xd4\x07\xb1\x0f\xa0\xf8\x00\x01" + + "\x8f\x120\xe3s_\xc3\x16\x00\xf5a\xdc\x01P\xfc\x19" + + "\x01O\x120\xf3\xb4\xaf\xe1\x0c\x00\xf5\xf1\xe0\x8cG\x09" + + "x\x86\x80\xd6\x7f\xf8\x1a\xce\x04P\x9f\x0a\xdc=F\xc0" + + "\x09\x02\xb2\x9f\xf9\x1a\xb6\x02\xa8\xcf\x067\x7f\x92\x80\x17" + + "\x08h\xfe\xbb\xafa\x16@}\x0e7\x03\x14O\x10\xf0" + + "25\xef\xa8e\x8c8\xa6\x1c\x81viQ\xae\xf3\x89" + + "\xf8\x87\xe9j\xd7\x07l\x97\x1a\xb9N\xf6h=W\xd2" + + "M\x13\xf3\x09U\x87\xcb\x05Wz\xa3\xae\x85\xf9D\x8e" + + "#`\x8ba\x19\x95!\xcc':\x16\x02\xbb\\Y\xb1" + + "\xcdm\x12\xf3\x89z\xc6\x88)\xf5\x0a!\xb1XG5" + + "d\x0fTlSz\x12rE}\x9b\xc4\xd9\xc0p6" + + "\xa0?`\xdb^\xc5su@\x07\xf3\x89PL\xfeQ" + + "\xa1S\xd2\xdf\xda\xcfv9\xae\xbd\xcd(\xd39\xf1\xc0" + + "\x119\xad\x97J\xd2\xa1\xdb\xc7\x82\x1a\xdd~\xd86\xe8" + + "\x92\xb1\x0cDG\x94\x8d\x8a\x1c\x19\xd0]\xe0\x836\xe6" + + "\x13I\x89\xe0:.\x09\x8b\\\xf6\x07<\x19pIs" + + "\xc2%\x8b\x88\xe9\xff\x87\xa3\xb8\xae\xae\xce\x95\xe5D\x03" + + "\xcb8\x8a\x1b\x19\xfa\xc6\x88c\xbb\xd4b\x995\xba\x13" + + "\xb7\xa8\x13\xd0\x9c,O\xdb\xa2um\xd6\xabWM[" + + "\xc7rtv\xa4F\x8bV\x03\x88\x85\x1c\xc52\x86J" + + "M\x8e\x96\xac\x07\x10\xff\xcbQ\xacc\xb8\xabd[\x9e" + + "\xb4\xbc8\xe8%\xdd\xe9\xd7\x07LI\xdc=\x0b\xb0\x97" + + "#\xe6\x93\x89\x13\x90\x16/97\x88v\xd8\xde\xad\xf1" + + "\xb9]D\\\x9d\x1cEo\xa2\x82\x1bH\x05\xd7q\x14" + + "\xfdu*(\xfa\x00D/G\xf1\xad\xaf\xac=\xae," + + "\x19\x8e!-\xc0\xc4\xfb:\xc7\xfa\x82\xd2\x05\x98$\xcf" + + "\xeb\x13yV\xf0J\x0d\x11Q9}\xa0N\x8a\xb3\xdc" + + "\x8f\x08\x07\xa9Qc%\xcd\xa6.F|\xd3\x14\xb4|" + + ",\xc6\xd9\xa6\x0b\x11\xdfdI\xbc\x8b\xad\x04\\\x16\xf0" + + "\xcd\xf9\x88o\xe6\xe0#\x00\xc5\xcb\x08X\x88\x0c\xe7g" + + "\xce\xf9,$\x9c\x05x\x1c\xa0\xb8\x90\x90eAk\x7f" + + "\x11\x11\xce\x92\xe0'\xcb\x08\xb8\x91\xf4\x9a-\x08\xd4]" + + "\xbd!\xa0\x95\xebi\xbd\x93Z^\x0f*#\xd4\xda\x84" + + "\xda\x83N\xebE\xd2\xdc5\xbaS\x81@<\x9bH\x01" + + "\xa9AGM\xaf\x91\x12\xcb1j\x0f\xc3\x06\xb4\xa62" + + "\x84_\xd2\xad\x924I\x052~\xb4G\x11\xa5\xe5u" + + "\x99\x15\xb9=7$]\x12'O\xdf*\xd7\x92\xf8n" + + "\xf4\x86\xa4+Fe{\x90\xd0\xd8\xb3\xb0\x03\xd7\xbah" + + "\x8f\xf4\x07\xf2\x92#\x89\x8f\xd3g\xd9k\x03^\x81\xc2" + + "\xd7\xa5,\xcb\xf2\x14\xd9\x0e\xf2J\x97\x0b\x0b\xae\xae\xd0" + + "\xe75*\xf4\x1dQ\xa1_\xcf\x90\x1b\xf5\xd2\xb7E\xba" + + "\xd2*AA\xae\xb1G-/\x01\x92\x8e\xee\x8a\x82a" + + "-\xed\xaf:2,\xa3|P\xb2\x8b:($\xca\x82" + + "\xcd\x00\xc8\x94\xf9\xc3\x00\xc8\x95\xcb]\x80\xc2\x16\xdd0" + + "e\xd9\xb7\xb7I\xd7\xb4\xf52pY&\x0e)\xd9\x96" + + "%!W\xf2dy2C_z1b\xce)\x9d\xd4" + + "\x97tR\x16\xfd\x88<6\\\x95\xf4R\x96]\xf4\x1b" + + "4SD\x1e\xdd\x80\xf1\xc53%\xdd\x99\xd4\xcd_\x9e" + + "\xf7\x9a\x87\xdc\xe9\xe8\x8f&\x02\xafZ?;\xa1;}" + + "*\xe2Lt$\x14H\x99\x88\x12^\xd8fX\xb2\xbb" + + "<%\xfe\xe8tD\x85\x00\xd3\xf3J\xdc\xbe\x1b\x0e&" + + "\xd7\x0e\xfa\x84!.\xbfe\x1e\x02\x882G\xe1L\xc3" + + ",\xb56\xe9\xc3\xa0\x9a\x89x+q\x9b\xf8\xae\xbcu" + + "\xd4pe\x17\xd7]\xb3\xba&\xa8}S\xa7-n\xb2" + + "\xdd\xad\xbak\x8fr\xab\\g\x9d8\xbe*(\xf1\x7f" + + "\xe7xL\x88\x94\xae\x1e\x8e\xe2f\xf2\xfb\xca0\x87\x9b" + + "V\x7f\x09!\xfa\x81\xbeU\xc2t\xd54/\x90\xa9A" + + "\xbb\xd1\x98\xdb\x19\x89\xd8\xa0\xbd\xb4d[9O\x8ey" + + "\"\x1f\x88S\xe8\x85NM\xf2]\x8e\xc2\xac\xa9\x13\xb9" + + "a\x10%\x9a\x1c\xc5\x18\x15\xd8\x85\x90\xf9\x94QJ\xa3" + + "\xc3Q\xdcF\x1ah\xab\xe4\xb2\xc7Q\xecf" + + "\xb59\xb4\xc7\x86\x82\xed\x0c\xe8\xa5\xadS\xe6M\xec\xb1" + + "C$!\xacH\x98!\x1dkw\x83\x82\x08\x1b2c" + + "\xd8\x96Ha\xfd#\x1e\x17\xe7\xa8E\x85\x16\x07{'" + + "\xb99\xc6Q\xece\x88,\xbc\xe6\x9e_\x02\x88\xbd\x1c" + + "\xc5\x04\xbd\xb6\"\xf5\x19\xbf\x0f@Lp\x14\xf7S9" + + "\x85O0\xe50\x8d\xfews\x14\x0f0TR\xe1\x03" + + "L9r\x0d\x808\xc4Q<\xc4h*\xd2+\xb6\x85" + + "\xad\xc0\xb0\xb5n\x12\xc1\xee\x0a=T\xa4[\xa8\xac\xd5" + + "GM/y\x92\xd4\x0c:G]}\xc00\x0d\xeeU" + + "k\x0f\xa3\x9cWu$\xe6\x92\xfb\x00b\x0e\xb0\xdds" + + "\xf5\x92\x8c\x8f\xa8\xcbgo4\x14\x84#\x01@\x10\x8d" + + "\xf8a\xac\xe0<\xbe\xd1\xa9\xef\xc6\xcdI\xe7\xd5\x0ao" + + "y_4z\xf4LWc\x9e\xab[\x95-\xb6\x0b8" + + "\x92L\x01\xf1!\x93\xa6\x00\x16\xbe\x83\x97\xd6^rf" + + "\x8e\x1erT\xfcA\x91\xd1\xeb\xa6\x8b2\xb22<1" + + ",\xb24\x80\xd2\xbd>a1zM\xb1@\xfa\x14\xb1" + + "9i\x81B)\x88(\xa4\xfd\xaa=\xeaV\xa4\xb9\x85" + + "\xf4\xa7\xf64\x01^'\x1eu\xb5\xb2:\x98\x1c3\xae" + + "\xeeL\xa2\xa6F\xc1\xa0\x1a\xb8\x8e\xa3X9]0\xca" + + "\xd2qeI\xf7P\x967\x0e\x0c\xcb\x92G\xe0\xe4S" + + "\xa7d&\xb3t\xa33y\x10\\\x9c0c\xdd\xa3r" + + "\xc9\xed\x89L\xe5,\xdbv \xed\x0fJ\xaf\xd76," + + "\x0f\xa5\xbb\xd6\x90f9~H\xd7_3l\xed\x1c\xf5" + + "\xf6\xa4{v\xd4S0\xd6\xfdSHY\xb2\x1a\xd8\xb4" + + "3U8\x0d\x8ey\x97\xfc\x8fc\xbdmX\xff\xe9t" + + "\xb7:a\xb8\xaf6\xdd\xed\xda*\xab\xa44\xb58\xff" + + "+\x00\x00\xff\xffo\xa6F\xe8" func RegisterSchema(reg *schemas.Registry) { reg.Register(&schemas.Schema{ diff --git a/std/capnp/rpctwoparty/rpc-twoparty.capnp.go b/std/capnp/rpctwoparty/rpc-twoparty.capnp.go index 92ebcd40..b90e9c8c 100644 --- a/std/capnp/rpctwoparty/rpc-twoparty.capnp.go +++ b/std/capnp/rpctwoparty/rpc-twoparty.capnp.go @@ -477,16 +477,22 @@ func (s JoinResult) SetSucceeded(v bool) { capnp.Struct(s).SetBit(32, v) } -func (s JoinResult) Cap() (capnp.Ptr, error) { - return capnp.Struct(s).Ptr(0) +func (s JoinResult) Cap() capnp.Client { + p, _ := capnp.Struct(s).Ptr(0) + return p.Interface().Client() } func (s JoinResult) HasCap() bool { return capnp.Struct(s).HasPtr(0) } -func (s JoinResult) SetCap(v capnp.Ptr) error { - return capnp.Struct(s).SetPtr(0, v) +func (s JoinResult) SetCap(c capnp.Client) error { + if !c.IsValid() { + return capnp.Struct(s).SetPtr(0, capnp.Ptr{}) + } + seg := s.Segment() + in := capnp.NewInterface(seg, seg.Message().CapTable().Add(c)) + return capnp.Struct(s).SetPtr(0, in.ToPtr()) } // JoinResult_List is a list of JoinResult. @@ -505,8 +511,8 @@ func (f JoinResult_Future) Struct() (JoinResult, error) { p, err := f.Future.Ptr() return JoinResult(p.Struct()), err } -func (p JoinResult_Future) Cap() *capnp.Future { - return p.Future.Field(0, nil) +func (p JoinResult_Future) Cap() capnp.Client { + return p.Future.Field(0, nil).Client() } const schema_a184c7885cdaf2a1 = "x\xda|\x92\xcfk\xd4@\x14\xc7\xdfw&u\xb7\xe8" + @@ -514,34 +520,34 @@ const schema_a184c7885cdaf2a1 = "x\xda|\x92\xcfk\xd4@\x14\xc7\xdfw&u\xb7\xe8" + "\xc1h\x91\x9d\xb5\x15\x0b\xf6\x10\x92\xa0\x916I\x93l" + "e\x0f\xb2\xa0\x82\xf6\xa0\xf4\"x\xb0\x96\x1e=\x89\xe2" + "\xaf\x82\x1e\x14D\xe8\xd1\x83\x07\xff\x05\xa1\x87\xf6\xb6 " + - "\x91\x09\xd8\x95\xfd\xe1m\xe6\xf1y_>\xef\xcd\x8c\x9b" + + "\x91\x09\xd8\x95\xfd\xe1-y|\xdew>\xef\xcd\x8c\x9b" + "\xa8j\x13\xa5\xb6FL\x9e\x1e\xd9\x95}\xbe[\xfd\xfd" + "ni{\x89t\x81lm\xeb\xe7\xf5\x87\xdf\xee\xaf\x91" + "V \x12GXGL\xb0\x02\xf1\xec\xdeF{tf" + - "\xf9\xf5\x13\x92\x02\xbdT\x89u\xc4~\xa6N{\xd9K" + - "B\xb6\xf9\xeb\xfd\xf8\x19\xe3\xe8J\x0f;\x02\x85\xbcb" + - "[\xe2S\x0e\xaf\xe7\xf0\xb3\x85\xf5\x07\x1f\x9f\xffX%" + - "]\xb0.K\x10\xd3\xfc\x8b\x98\xe5\x0a\x9c\xe1g\x09\xd9" + - "\xca\xdb\xe37ZV\xfbM\xbf\xe6\xa9Y~\x00b\x9e" + - "+\xcf}O\xb7\xbf\xbe\x18}\xf4a\x90\xa7\xc5;b" + - ":O\x94\xdc$d\x8f\x8ddsuy\xf7\xf7A\xec" + - "\x02\xdf\x10wr\xb6\xc5M\xaaeq\xe4\x9cHo\x87" + - "\x11\xb3\xe3\xb4u\xd2\xb1\xa3 2\x1a\x9e\xe3G\xa6\xef" + - "\x05\xa9\xe5\xd6\x81\x81\xcc\xc5\xd0\x0f.\x99^\xabn\xc7" + - "i\x1d\x90{\xb8F\xa4\x81H?o\x10\xc9*\x87\x9c" + - "d\xd0\xc1*PE\xabA$/p\xc8)\x06\x9d\xf1" + - "\x0a\x18\x91.\xcf\x11\xc9I\x0ey\x8d\xc1\xbc\x15\xfa\x81" + - "\xe5\xa2H\x0cEB\x16\xd9qZ\x0b\x9b\x01!E\x81" + - "\x18\x0a\x84\xb6\xaa]n\xce\xff\xbd\x0f\xf5j\x1c\xf4\x92" + - "\xe6\xdc\x7f\xb5\x0e\xf5k)\xd5\xdc\xea\xf0p\xab\xa4\xe9" + - "8\x9e\xe7z\x04\x17 \x06\x10\x0a\x8e\x1da\x8c\x18\xc6" + - "\x86\x18]\xf1]\x8f\x94K1\x8f\xd7\x0d\"@\x1f5" + - "\x88\xcc\xc4\x8b\x17\xbd\xd8t\xe6\xd4\xaew\x9a\xf9?\xcd" + - "S7\xfd\xd8U;n\xd5\xec\x88\x0f\x7f\x8ez\x1c." + - "\xfaf\xe2\x87A\xceHmg\xee\x92\x9a\xbb\xc8!+" + - "\xfd\xe3\x0cJ\xbaj\xa7\x96K\xd4\x13r\xac\x1bRN" + - "|\xd7C\xb9\xfb\xc1\x09(\x13\xfe\x04\x00\x00\xff\xff[" + - "\xb7\xf3\xb7" + "\xf9\xf5\x13\x92\x02\xbdT\x89u\xc4~\xa6\xbe\xf6\xb2\x97" + + "\x84l\xf3\xd7\xfb\xf13\xc6\xd1\x95\x1ev\x04\x0ay\xc5" + + "\xb6\xc4\xa7\x1c^\xcf\xe1g\x0b\xeb\x0f>>\xff\xb1J" + + "\xba`]\x96 \xa6\xf9\x171\xcb\x158\xc3\xcf\x12\xb2" + + "\x95\xb7\xc7o\xb4\xac\xf6\x9b~\xcdS\xb3\xfc\x00\xc4<" + + "W\x9e\xfb\x9en\x7f}1\xfa\xe8\xc3 O\x8bw\xc4" + + "t\x9e(\xb9I\xc8\x1e\x1b\xc9\xe6\xea\xf2\xee\xef\x83\xd8" + + "\x05\xbe!\xee\xe4l\x8b\x9bT\xcb\xe2\xc89\x91\xde\x0e" + + "#f\xc7i\xeb\xa4cGAd4<\xc7\x8fL\xdf" + + "\x0bR\xcb\xad\x03\x03\x99\x8b\xa1\x1f\\2\xbdV\xdd\x8e" + + "\xd3: \xf7p\x8dH\x03\x91~\xde \x92U\x0e9" + + "\xc9\xa0\x83U\xa0\x8aV\x83H^\xe0\x90S\x0c:\xe3" + + "\x150\"]\x9e#\x92\x93\x1c\xf2\x1a\x83y+\xf4\x03" + + "\xcbE\x91\x18\x8a\x84,\xb2\xe3\xb4\x166\x03B\x8a\x02" + + "1\x14\x08mU\xbb\xdc\x9c\xff\xfb?\xd4\xabq\xd0K" + + "\x9as\xff\xd5:\xd4\xaf\xa5Ts\xab\xc3\xc3\xad\x92\xa6" + + "\xe3x\x9e\xeb\x11\\\x80\x18@(8v\x841\x8d\x13" + + "06\xc4\xe9\x8a\xefz\xa4l\x8a\xf9\x01\xbaA\x04\xe8" + + "\xa3\x06\x91\x99x\xf1\xa2\x17\x9b\xce\x9c\xda\xf6N3\xff" + + "\xa7y\xea\xa6\x1f\xbbj\xcb\xad\x9a\x1d\xf1\xe1\x17R\x8f" + + "\xc3E\xdfL\xfc0\xc8\x19\xa9\xedL^R\x93\x179" + + "d\xa5\x7f\xa0AIW\xed\xd4r\x89zB\x8euC" + + "\xca\x89\xefz(w\x9f8\x01e\xc2\x9f\x00\x00\x00\xff" + + "\xff\xbe\xb4\xf3\xbd" func RegisterSchema(reg *schemas.Registry) { reg.Register(&schemas.Schema{ diff --git a/std/fixups.patch b/std/fixups.patch deleted file mode 100644 index 9d0723c2..00000000 --- a/std/fixups.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- a/capnp/schema.capnp 2021-10-21 15:03:20.221774538 -0400 -+++ b/capnp/schema.capnp 2021-10-21 15:04:20.870019327 -0400 -@@ -82,7 +82,7 @@ - - file @6 :Void; - -- struct :group { -+ struct :group $Go.name("structNode") { - dataWordCount @7 :UInt16; - # Size of the data section, in words. - -@@ -336,7 +336,7 @@ - typeId @15 :Id; - brand @21 :Brand; - } -- struct :group { -+ struct :group $Go.name("structType") { - typeId @16 :Id; - brand @22 :Brand; - } -@@ -450,7 +450,7 @@ - list @14 :AnyPointer; - - enum @15 :UInt16; -- struct @16 :AnyPointer; -+ struct @16 :AnyPointer $Go.name("structValue"); - - interface @17 :Void; - # The only interface value that can be represented statically is "null", whose methods always