From fded05c6eb02faa398da8a6792baf1db73f560f2 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Fri, 5 May 2023 09:04:17 +0200 Subject: tutorial/proto: Also show how to build just the CC bindings --- doc/tutorial/proto.org | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'doc/tutorial') diff --git a/doc/tutorial/proto.org b/doc/tutorial/proto.org index d9600594..b4a02d48 100644 --- a/doc/tutorial/proto.org +++ b/doc/tutorial/proto.org @@ -309,6 +309,45 @@ into our ~C++~ rules is just convenience of our code base. If we had to cooperate with rules not aware of proto, we could have created a separate rule delegating the library creation to the anonymous target and then simply reflecting the values of that target. +In fact, we could simply use an empty library with a public ~proto~ +dependency for this purpose. + +#+SRCNAME: TARGETS +#+BEGIN_SRC js +... +, "address proto library": + {"type": ["@", "rules", "CC", "library"], "proto": ["address"]} +... +#+END_SRC + +#+BEGIN_SRC sh +$ just-mr analyse 'address proto library' +... +INFO: Requested target is [["@","","","address proto library"],{}] +INFO: Result of target [["@","","","address proto library"],{}]: { + "artifacts": { + }, + "provides": { + ... + "compile-deps": { + "addressbook.pb.h": {"data":{"id":"6d70cd10fabcbc7591cd82aae2f100cca39d3879","path":"work/addressbook.pb.h"},"type":"ACTION"}, + ... + }, + "link-args": [ + "libaddressbook.a", + ... + ], + "link-deps": { + "libaddressbook.a": {"data":{"id":"753073bd026b6470138c47e004469dd1d3df08d4","path":"libaddressbook.a"},"type":"ACTION"}, + ... + }, + ... + }, + "runfiles": { + } + } +$ +#+END_SRC ** Adding a test -- cgit v1.2.3