mirror of
https://github.com/zap-proto/erlang.git
synced 2026-10-30 15:05:14 +00:00
Mechanical, byte-balanced rename across the full tree (1648 ins / 1648 del): - ecapnp -> ezap, capnpc-erl -> zapc-erl, *_capnp.erl -> *_zap.erl - .capnp schemas -> .zap (schema, rpc, c++, test, addressbook, calculator) - "Cap'n Proto" prose -> "Zap" in docs and module @doc comments - 58 renamed/modified source, header, schema, sample and test files Brand-neutrality (canonical zap-proto): - README + overview.edoc project URLs -> zap-proto.io / github.com/zap-proto/erlang - doc links -> zap-proto.dev (encoding, otherlang, sdks/erlang) - generator banner (ezap_compiler) + all 6 generated modules -> https://github.com/zap-proto/erlang - Makefile dep_zap_test -> https://github.com/zap-proto/zap_test.git Build hygiene: - modernize git:// -> https:// for dep_eunit_formatters (git:// is dead on GitHub) Upstream license/author attribution headers (Andreas Stenius) preserved. Tests unchanged: proper_SUITE / ezap_props property tests + eunit suite.
59 lines
1.6 KiB
Erlang
59 lines
1.6 KiB
Erlang
-record(builder, {
|
|
pid :: pid()
|
|
}).
|
|
|
|
-record(reader, {
|
|
data :: list(binary()) | binary(),
|
|
caps = [] :: list()
|
|
}).
|
|
|
|
-record(ref, {
|
|
segment :: ezap:segment_id(),
|
|
pos = -1 :: ezap:segment_pos(),
|
|
offset = 0 :: ezap:segment_offset(), %% or capability index in CapTable for #interface_ref{}'s
|
|
align = 0 :: ezap:bit_count(),
|
|
kind = null :: ezap:ref_kind(),
|
|
data :: #builder{} | #reader{}
|
|
}).
|
|
|
|
-record(struct_ref, {
|
|
dsize = 0 :: ezap:word_count(),
|
|
psize = 0 :: ezap:ptr_count()
|
|
}).
|
|
|
|
-record(list_ref, {
|
|
size = 0 :: ezap:bit_count() | pointer | {inlineComposite, #struct_ref{}},
|
|
count = 0 :: non_neg_integer() %% ALWAYS number of elements in list
|
|
}).
|
|
|
|
-record(far_ref, {
|
|
segment = 0 :: non_neg_integer(),
|
|
double_far = false :: boolean()
|
|
}).
|
|
|
|
-record(interface_ref, {
|
|
owner :: {atom(), pid()},
|
|
id :: term()
|
|
}).
|
|
|
|
-record(object, {
|
|
ref = null :: #ref{},
|
|
schema :: atom() | ezap:schema_node()
|
|
}).
|
|
|
|
-record(rpc_call, {
|
|
target :: term(),
|
|
interface :: ezap:type_id(),
|
|
method :: non_neg_integer(),
|
|
params :: ezap:object(),
|
|
results :: ezap:object(),
|
|
resultSchema = object :: ezap:schema_node() | object
|
|
}).
|
|
|
|
-record(promise, {
|
|
owner :: {atom(), pid()},
|
|
pid :: pid(), %% ezap_promise pid
|
|
transform = [] :: list(),
|
|
schema :: ezap:schema_node()
|
|
}).
|