You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you are interested, i can instead work this into a PR for this one. I think last time i worked on it i only had some nicety functionality left to do.
It is basically a re-implementation of the whole cell struct (which is stack-allocated with macros anyway) into pure rust. Hand filling the fields for each type instead of the c macro. What i, so far, did not manage to do was implement this copy-free for strings (Because of String vs CString). However, if i didn't miss anything, these are for one time copy actions into or out of the API anyway, so this might be a ok for a first attempt anyway.
What do you think? There are two other things i have done - feature flag for the chrono crate and some more advanced error handling around the one built into spice. The former would be easy to also just PR in here, while the latter might need significant rework, but would be also really really nice.
Have a good week!
The text was updated successfully, but these errors were encountered:
Hey @mkalte666! I'm highly interested in a PR to address your issue and implement a proper wrapper for Cells. We can take inspiration on SpiceyPy for which I remember having used Cells recently and it was very convenient. Basically a Cell of integers could be iterated like a list. Looking quickly on your implementation, it looks like doing the same, which is good!
About the copying of string, it looks indeed okay for a first attempt, we can always improve that later. Maybe writing will show an issue, to me it's fine for the moment.
Let me know if you need help on this one. I'm very happy you're on that!
About conversion back and forth to Chrono dates and more advanced error handling, I'm not convinced. But we can still study that. I also think this should be part of a separate issue.
Should #10 go in, i basically have no reason to continue working on my attempt at a wrapper (which is a good thing, i don't have the time lol).
One thing i have done, which is, i think, still on the roadmap for this repo, is work out a cell API.
Here is the link: https://github.com/mkalte666/naifspice-rs/blob/main/src/naifspice/src/cell.rs
EDIT: yes i am aware of the dumb compare_some func (instead of
assert_eq!(whatever.pop(), Some(what_i_expect));
), though i am not sure what my brain was doing when i wrote this. woops.If you are interested, i can instead work this into a PR for this one. I think last time i worked on it i only had some nicety functionality left to do.
It is basically a re-implementation of the whole cell struct (which is stack-allocated with macros anyway) into pure rust. Hand filling the fields for each type instead of the c macro. What i, so far, did not manage to do was implement this copy-free for strings (Because of String vs CString). However, if i didn't miss anything, these are for one time copy actions into or out of the API anyway, so this might be a ok for a first attempt anyway.
What do you think? There are two other things i have done - feature flag for the chrono crate and some more advanced error handling around the one built into spice. The former would be easy to also just PR in here, while the latter might need significant rework, but would be also really really nice.
Have a good week!
The text was updated successfully, but these errors were encountered: