-
Notifications
You must be signed in to change notification settings - Fork 33
Cpp Interop exercise #157
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
base: main
Are you sure you want to change the base?
Cpp Interop exercise #157
Conversation
Deploying ferrous-systems-rust-exercises with
|
| Latest commit: |
91b6631
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://02208642.ferrous-systems-rust-exercises.pages.dev |
| Branch Preview URL: | https://rapidcsv.ferrous-systems-rust-exercises.pages.dev |
| 1. Use `autocxx` to develop bindings to a `rapidcsv.h` and print out the dates in `example.csv`, from within Rust as well as the `RowCount`. | ||
|
|
||
| You should get: | ||
|
|
||
| ```console | ||
| 6 | ||
| 2017-02-24 | ||
| 2017-02-23 | ||
| 2017-02-22 | ||
| 2017-02-21 | ||
| 2017-02-17 | ||
| ``` | ||
|
|
||
| Because there are 5 rows of data and a header row. | ||
|
|
||
| 2. Use `autocxx` to read `weather.csv` and report the average temperature in June, which should be approximately | ||
|
|
||
| ```console | ||
| 1.20 | ||
| ``` | ||
|
|
||
| A full solution is available at `rust-exercises/exercises-solutions/cpp-interop`. |
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.
Maybe we should expand the tasks section? Give a list of steps to follow within each point to give people a plan to follow?
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've expanded both sections now. Care to review for phrasing please?
|
@listochkin This revision should be good enough for a merge or close enough so that you can get it over the finish line if you add small tweaks. |
Goal:
Write a fleshed out exercise that
autocxxwith some C++'isms like exceptions andstd::string, etc.polars)build.rs, gcc vs clang include flags, cleanup procedures for non-POD stuffStatus:
Reading the CSV with bindings generated via
autocxxis painful and so is navigating said errors. Invoking overloaded constructors forrapidcsv::Documentis quite cumbersome.