-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
INFRA - Config parsing #86
Conversation
huh i gotta figure out how to do the config file path for the nested boards. will push a new version tomorrow maybe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very epic, can merge once the board code is fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The non-Rust contingent of the Edinburgh Hyperloop Team, otherwise known as the telemetry team, approves :)
My kindest ever regards,
Mr. Arjun Naha
(Soon to be) Bachelors of Engineering from The University of Edinburgh, Influencing the world since 1583
Am setting an env var in build.rs, which is used to set the config path. The other option i have working is using nightly to use |
An unwise man has produced a yaml to rust transpiler because lmao. It is on crates.io (source here) should you ever need it.
what it does:
turns this
into
you can now access config values by doing
all your favourite rust types are here (if those are
i64
/f64
/&'static str
/bool
)! and because ofconst
, it all gets inlined at compile time so your billion line yaml file gets optimised down to only the exact values you care about (i think)two restrictions:
type
is the main restriction here but alsofor
,struct
, etc.also i 100% broke telemetry by changing the field names lol