Closed ivmarkov closed 9 months ago
@andy31415 @kedars ^^^
@ivmarkov should we add a separate issue to support custom clusters?
Right now our macros will include all CSA-spec defined clusters (and a unit-testing one) however custom app clusters would need a different IDL.
Low priority since anyone can use the example in rs-matter-macros to create their own macro.
Yes, let's at least have an issue for that.
This PR removes the need for the
RS_MATTER_IDL_DIR
environment variable that points to the location of the Matter Clusters' IDL file.The inconvenience of this environment variable should not be underestimated:
rs-matter
project does have a.cargo/config.toml
file listing the env var, this is only helping the Continuous integration build of thers-matter
library itselfrs-matter
, the user still has to declare its own version of the env var which ideally must point to... the same IDL file which is checked-in in thers-matter
GIT repo. So in a way, the user must have thers-matter
repo checked out somewhere, just because of the IDL file; UPDATE: moreover, the checked outrs-matter
GIT repo should correspond exactly to the one published oncrates.io
or else, it might mis-compile itself, if we - ourselves - use the IDL file to generate our own clusters - which is already the case albeit for demoing purposes - with theon_off
cluster.The PR completely bypasses all of this by
rs-matter/idl
folder as a sub-folder ofrs-matter-macros-impl/src
include_str!
to include the content of the IDL file - at build time - in the macro generating code