Brian Silverman | 7edd1ce | 2022-07-23 16:10:54 -0700 | [diff] [blame^] | 1 | #ifndef AOS_CONFIGURATION_FOR_RUST_H_ |
| 2 | #define AOS_CONFIGURATION_FOR_RUST_H_ |
| 3 | |
| 4 | #include "aos/configuration.h" |
| 5 | #include "cxx.h" |
| 6 | |
| 7 | namespace aos::configuration { |
| 8 | |
| 9 | const Channel *GetChannelForRust(const Configuration *config, rust::Str name, |
| 10 | rust::Str type, rust::Str application_name, |
| 11 | const Node *node); |
| 12 | |
| 13 | // Returns a Configuration flatbuffer. Returns an empty vector on errors. |
| 14 | // TODO: It would be nice to return more detailed errors (not found vs could not |
| 15 | // parse vs merging error). |
| 16 | rust::Vec<uint8_t> MaybeReadConfigForRust( |
| 17 | rust::Str path, rust::Slice<const rust::Str> extra_import_paths); |
| 18 | |
| 19 | } // namespace aos::configuration |
| 20 | |
| 21 | #endif // AOS_CONFIGURATION_FOR_RUST_H_ |