Replies: 1 comment
-
@nosjojo Could you try calling: let custom_config = Config::from_file(
&FilePath::new(b"my/custom/config/file.toml")?)?;
let node = NodeBuilder::new()
// provide custom object to the node
.config(&custom_config)
.create::<ipc::Service>()?; and tell me if this works.
When you call
This is correct. We still have some work to do with the config file. The idea is that you can store the config file in any of the usual XDG config paths like
Did you mean toml? Why couldn't you use the file from here: https://github.com/eclipse-iceoryx/iceoryx2/blob/main/config/iceoryx2.toml . Is this what you meant with airgapped PC that you didn't have access to github? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've got a series of programs that are communicating over pub/sub and events, and I wanted to use a global config so that I could simply my definitions. From what I understand in the docs, setting up a global config should cause all instances to use those settings.
I created a file and load it with
Config::setup_global_config_from_file(path)
. This seems to work, I don't get errors, but when my other programs run they throw a bunch of warnings stating "Default config file found but unable to read data, populate config with default values.".I'm not on the newest build, so I don't know if this warning is coming from #437 or if it's actually having a problem loading my file. Is there anything else to it besides loading the file?
Also, as an aside note: I don't think any example config files are bundled in the crate when it's pulled. I had a hell of a time getting the yaml file correct because I'm on an airgapped PC and can't just reference the source to copy your template. It might be useful to bundle that in the crate so others can easily reference it too.
Beta Was this translation helpful? Give feedback.
All reactions