ockam icon indicating copy to clipboard operation
ockam copied to clipboard

Update README files of each crate to show usage with `cargo add`

Open metaclips opened this issue 2 years ago • 4 comments

All crates in this folder have readme files https://github.com/build-trust/ockam/tree/2ea26c64036e61669181f17c92b0906a6a434a79/implementations/rust/ockam

We currently have this format as usage instruction in each README.md file https://github.com/build-trust/ockam/blob/2ea26c64036e61669181f17c92b0906a6a434a79/implementations/rust/ockam/ockam/README.md?plain=1#L65-L72

We want to update this Usage section to use the new cargo add command.

We also have readme files that are missing usage instructions so we have to add those as well, similar to other crates.

  • [ ] Ockam Transport BLE crate
  • [ ] Ockam MultiAddr crate
  • [ ] Ockam Command crate (we need to instead use the cargo install ockam_command@version command here)
  • [ ] Ockam API crate

metaclips avatar Aug 09 '22 10:08 metaclips

Hey, I was looking into other major rust projects like tokio, most of them use current format:

[dependencies] 
"crate-name" = "major version" 
"crate-name" = "*"

This format also allows better representation of features used (if any), and rust book also uses it.

lameferret avatar Aug 14 '22 19:08 lameferret

@anuvratsingh Interesting point about features. @metaclips Maybe we should stay with the old format for now. Just add the places where the instructions are missing.

At the top level when introducing new people, in examples/guides etc, we can start with cargo add.

mrinalwadhwa avatar Aug 14 '22 20:08 mrinalwadhwa

For examples: cargo run --example <example-name> doesn't help, it just shows how to run the example. Better approach would be: Tokio example.

lameferret avatar Aug 14 '22 20:08 lameferret

Hey, I was looking into other major rust projects like tokio, most of them use current format:

[dependencies] 
"crate-name" = "major version" 
"crate-name" = "*"

This format also allows better representation of features used (if any), and rust book also uses it.

Thanks @anuvratsingh . Cargo add also has the feature options. I'm in support to stay with the old format till cargo add is widely known. As @mrinalwadhwa stated, we should ensure all crates readme include in them, usage instructions.

metaclips avatar Aug 15 '22 16:08 metaclips

Hi there, I am working with some new contributors to open source (and ockam) and wondering if you would be open to us working on this issue?

mariannegoldin avatar Apr 20 '23 20:04 mariannegoldin

@mariannegoldin that would be great 👍

mrinalwadhwa avatar Apr 20 '23 20:04 mrinalwadhwa

~I don't think this is needed as we now use cargo-readme to generate readme files cc @etorreborre @mrinalwadhwa~

metaclips avatar Jun 05 '23 08:06 metaclips

I updated the issue to use cargo-readme instead to update readme files

metaclips avatar Jun 05 '23 09:06 metaclips

Closing now. Thanks everyone

metaclips avatar Sep 11 '23 11:09 metaclips