show
show copied to clipboard
Conditional compilation (Windows, Mac, Linux)
What?
The original plan was to write a command line tool, that opens a file with the default program on the given operating system, but that already exists. Therefore I'll need to find something else, where I can show conditional compilation on. Maybe a tool I can port from Golang?
Why?
Show how to structure commands in separate modules.
Build platform-dependent code using cargo.
Show how to use dependency injection or a simple plugin system in Rust?
Explain different idioms in Golang and Rust.
How?
~~Port open-golang.~~ I don't know yet.
https://doc.rust-lang.org/book/first-edition/conditional-compilation.html
Needed that recently and https://github.com/Byron/open-rs did a nice job. It's also is a bit more robust on linux :)
(Not saying that to stop you from doing an episode on this, just so you know it's out there)
Thanks for the heads-up. Looked at the code an it's intimidatingly good. No surprise, @Byron style. Plenty of fish in the sea, so I'll close this, I guess. 😅
No! On second thought, the gist of the show might be conditional compilation. It's just the example that is ill-fitting. I guess I'll simply rename the issue and wait for inspiration (hint, hint) on what might be a good fit for the topic. 😁