libelektra icon indicating copy to clipboard operation
libelektra copied to clipboard

Rust Binding Next Steps

Open markus2330 opened this issue 3 years ago • 3 comments

I am currently using the Rust binding and must say it is a pleasure to work with it. I published the 0.9.10 version. I noticed that following next steps could be worthwhile to pursue:

  • [ ] use rustfmt and let CI check if code is formatted correctly
  • [ ] type-safe higher-level API using specifications (allow parts of config objects to be passed around)
  • [ ] improve concurrent access
  • [ ] tokio/async integration
  • [ ] allow to store any Rust data structures in a KeySet (using serde.rs)
  • [ ] fix cross compilation of rust #3904
  • [ ] cmake improvements #4007
  • [ ] automatic publish crate on every release
  • [ ] remove LookupOption #4222
  • [ ] integrate tooling, 3-way merge and other libraries of Elektra
  • [ ] longer tutorial of different features
  • [ ] link to API descriptions of libelektra, at least for KDB
  • [ ] allow to implement plugins in Rust
  • [ ] lookup_by_name should actually use ksLookupByName for performance reasons
  • [ ] allow lookup on keyset without mut
  • [ ] example pretty printing of KDBError (KDBError { error_key: StringKey { ptr: 0x658b938, _marker: PhantomData } } on unwrap etc.)
  • [ ] logger integration (allow logger to be configured from Elektra)
  • [ ] operator overloading
  • [ ] "insert" for both Key and Keyset, see #3978
  • [ ] allow callbacks using interneralnotification
  • [ ] Implement external iteration of metakeys (src/key.rs line 539)
  • [ ] allow changing namespace of keys (should also fix src/key.rs line 593)
  • [ ] is_below, is_directly_below etc. should also work with other types (e.g. ReadOnly with StringKey etc.)

markus2330 avatar Jul 15 '22 05:07 markus2330

@lawli3t Anything else which you found while reimplementing the API?

markus2330 avatar Aug 17 '22 11:08 markus2330

Your list already looks pretty good.

Some additional traits such as FromStr for Keys would be interesting, there might be more but that one was just off the top of my head.

I also haven't seen the locking implemented (i only quickly glanced now) although that is a bit tricky in Rust as you might recall from that part in my work

lawli3t avatar Aug 31 '22 01:08 lawli3t

@PhilippGackstatter if you have some time, maybe you can have a look if there are any missing TODOs/left-overs of the Rust binding (not in the list above). Btw. I don't have your current email address. (Feel free to send me an email to stay in contact).

markus2330 avatar Dec 19 '22 06:12 markus2330

I mark this stale as it did not have any activity for one year. I'll close it in two weeks if no further activity occurs. If you want it to be alive again, ping by writing a message here or create a new issue with the remainder of this issue. Thank you for your contributions :sparkling_heart:

github-actions[bot] avatar Feb 24 '24 01:02 github-actions[bot]

I closed this now because it has been inactive for more than one year. If I closed it by mistake, please do not hesitate to reopen it or create a new issue with the remainder of this issue. Thank you for your contributions :sparkling_heart:

github-actions[bot] avatar Mar 10 '24 01:03 github-actions[bot]