blob: ae18346906d726bd2a051d86af678c64be79d78c [file] [log] [blame]
Brian Silverman7edd1ce2022-07-23 16:10:54 -07001#ifndef AOS_CONFIGURATION_FOR_RUST_H_
2#define AOS_CONFIGURATION_FOR_RUST_H_
3
4#include "aos/configuration.h"
5#include "cxx.h"
6
7namespace aos::configuration {
8
9const 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).
16rust::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_