-
Notifications
You must be signed in to change notification settings - Fork 383
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
Combine all Rust code-examples
into one binary
#4767
Conversation
The |
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.
Nice!
docs/code-examples/README.md
Outdated
- **Python**: `python <example_name>.py`, e.g. `python point3d_random.py`. | ||
- **Rust**: `cargo r -p code_examples --bin <example_name`, e.g. `cargo r -p code_examples --bin point3d_random`. | ||
- **Rust**: `cargo run -p code_examples -- <example_name`, e.g. `cargo run -p code_examples -- point3d_random`. |
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.
come to think it's a bit strange that they have different names in all languages!
- cpp: doc examples
- python: example name
- rust: code examples
can we unify this?
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.
I'll save that for a follow-up PR
Co-authored-by: Andreas Reich <[email protected]>
What
This reduces the number of binaries in our workspace from 99 to 55.
We do this by joining all
docs/code-examples
into one binary, with a little help from somebuild.rs
codegen.This will any compiler error messages to the wrong file though, so it is not a perfect solution by any means.
I also decided to put all the code examples in their own folder (
docs/code-examples/all
), with the control structures (Cargo.toml
,CMakeLists
, …) in the parent folder (docs/code-examples
). If you have a better idea for a name than "all" I'm all ears.Checklist
main
build: app.rerun.ionightly
build: app.rerun.io