Commit graph

8 commits

Author SHA1 Message Date
Rongsong Shen
5d64af4841 merge code 2025-04-21 13:13:34 +08:00
Jonah Beckford
014d4ea4df Implement attrs: extendedattribute and extraheader 2023-09-25 21:23:22 -07:00
Curt Brune
c70796b9fb add a capnp annotation for creating name spaces
This patch adds an annotation for creating name spaces within
capnproto files with the C-language code generator.

Use the annotation like this:

  using C = import "/c.capnp";
  $C.namespace("sample_namespace_");

The string passed into the namespace annotation is prepended to the
name of all the struct's in the schema file.

Signed-off-by: Curt Brune <curt@enfabrica.net>
2022-10-14 09:15:11 -07:00
Jason Heeris
9153fc39c4 Add an annotation to typedef structs and enums.
A new annotation 'typedefto' allows you to make a typedef in the generated
code for structs and enums (but not union 'which' enums).
2021-01-02 09:28:31 +08:00
Jason Heeris
b995a09c03 Add an annotation to skip including header files generated from specific
schema files.

Some schema files (eg. those that only decalare annotations) do not actually
result in any generated C code. They do not need to have a corresponding
include directive for C files generated from schemas that include them. This
introduces a "donotinclude" annotation that takes the Cap'n Proto ID (a
UInt64) of any such files and skips generating the include directive for them.
2021-01-02 09:28:31 +08:00
Alex Helfet
6b52d615a2 Add all .capnp files to make dist archive. 2017-03-26 15:23:35 +01:00
David Lamparter
da663f83ef compiler: add annotation to enable field get/set
Generating per-field getters/setters adds a lot of functions; this makes
them switchable with an annotation in the source schema.
2016-07-19 15:21:05 +02:00
David Lamparter
5d787b698e compiler: add "C::nameinfix" annotation
allows changing output filenames from "foo.capnp.c" to
"foo.capnpSOMETHING.c" where SOMETHING is the argument to the
annotation.
2016-06-22 15:16:40 +02:00