Skip to content
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

Published Rust Bindings #2980

Merged

Conversation

PhilippGackstatter
Copy link
Contributor

@PhilippGackstatter PhilippGackstatter commented Sep 18, 2019

The Rust Bindings are now published to crates.io. Since there are some differences between what cmake requires and what I need for publishing, I had to add modified versions of Cargo.toml and build.rs. I also added some additional documentation in the elektra crate and added a short guide for publishing future crate versions.

fixes #2730

Basics

Check relevant points but please do not remove entries.
Do not describe the purpose of this PR in the PR description but:

  • Short descriptions should be in the release notes (added as entry in
    doc/news/_preparation_next_release.md which contains _(my name)_)
    Please always add something to the the release notes.
  • Longer descriptions should be in documentation or in design decisions.
  • Describe details of how you changed the code in commit messages
    (first line should have module: short statement syntax)
  • References to issues, e.g. close #X, should be in the commit messages.

Checklist

Check relevant points but please do not remove entries.
For docu fixes, spell checking, and similar none of these points below
need to be checked.

  • I added unit tests for my code
  • I fixed all affected documentation
  • I added code comments, logging, and assertions as appropriate (see Coding Guidelines)
  • I updated all meta data (e.g. README.md of plugins and METADATA.ini)
  • I mentioned every code not directly written by me in THIRD-PARTY-LICENSES

Review

Reviewers will usually check the following:

Labels

  • Add the "work in progress" label if you do not want the PR to be reviewed yet.
  • Add the "ready to merge" label if the build server is happy and also you
    say that everything is ready to be merged.

@@ -147,7 +147,7 @@ you up to date with the multi-language support provided by Elektra.

- Add the `elektra-sys` crate which contains raw bindings to libelektra for Rust. _(Philipp Gackstatter)_
- Add the `elektra` crate which contains safe wrapper methods for the raw bindings. The crate contains bindings for the low-level API, which means that the data types `Key` and `KeySet` can now safely be used from Rust. The Rust version of the API has been designed to take advantage of Rust's type system and to be in accordance with the memory safety of Rust. For instance, the Key has been divided into `StringKey` and `BinaryKey`, to prevent type mismatches at compile time. With the binding for `KDB`, one can take advantage of the elektra ecosystem from Rust. See the [Readme](../../src/bindings/rust/README.md) for more. _(Philipp Gackstatter)_
- The [elektra](https://crates.io/crates/elektra) and [elektra-sys](https://crates.io/crates/elektra-sys) crates have been published to crates.io for easier usage. _(Philipp Gackstatter)_
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you remove the links?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They don't pass the link checker.
Somehow it returns a NotFound, and I don't think we can fix this.

$ curl https://crates.io/crate/elektra
{"errors":[{"detail":"Not Found"}]}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then put the links to the whitelist. They obviously work in the browser. (But beware of typos, in the curl statement above there is a typo: crate -> crates).

- Also update the published_build.rs script
@@ -10,3 +10,5 @@ https://build.libelektra.org/jenkins/job/libelektra/pipeline-syntax
# see https://github.com/ElektraInitiative/libelektra/issues/2913
http://webdemo.libelektra.org
https://webdemo.libelektra.org
https://crates.io/crates/elektra
https://crates.io/crates/elektra-sys
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it work without new-line at the end?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link checker succeeded, so I guess it works.

@markus2330 markus2330 merged commit e52f4aa into ElektraInitiative:master Sep 27, 2019
@markus2330
Copy link
Contributor

Thank you, great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rust Bindings
2 participants