docs icon indicating copy to clipboard operation
docs copied to clipboard

Create getting started guide for nim-libp2p

Open salmad3 opened this issue 3 years ago • 5 comments

Done Criteria

  • [ ] Tutorial introduction: Ping application
  • [ ] Prerequisites
    • [ ] Install Nim
    • [ ] Create an empty project
    • [ ] Install nim-libp2p
  • [ ] Setup
    • [ ] Create new file "test.nim"
    • [ ] Introduce chronos.
    • [ ] Import dependencies
      • [ ] Import chronos
      • [ ] Import libp2p and ping protocol
  • [ ] libp2p procedures
    • [ ] Gentle introduction to nim procedures
    • [ ] Create ping procedure
  • [ ] Run the ping protocol

Why Important

  • Showcases how users can get started with nim-libp2p.
  • Follows the other getting started tutorials on the docs.

Notes

  • Link to status.im tutorials and existing examples.

salmad3 avatar Nov 23 '22 00:11 salmad3

Ideally this is something the nim-libp2p maintainers can take on and not the PL libp2p or docs team

p-shahi avatar Nov 23 '22 01:11 p-shahi

Very cool, thanks! We have a tutorial that looks quite similar to this on our website: https://status-im.github.io/nim-libp2p/docs/tutorial_1_connect/ Source is here: https://github.com/status-im/nim-libp2p/blob/unstable/examples/tutorial_1_connect.nim

The nice thing about having it on our repo is that we can keep it up to date more frequently when we add new sugar for instance, and make sure that it still compiles. I think rust is in the same situation as us (cc @mxinden). Having it in another repo makes it a bit harder (I have PTSD from outdated examples & tutorials :D )

But maybe we can find a way to make it work, for instance some CI action that would keep it in sync here?

Also happy to get some feedback / fixes to our tutorial!

Menduist avatar Dec 05 '22 15:12 Menduist

@Menduist thanks, in this case, perhaps we can just create a page that links or redirects to your website. This way, we get the benefit of having a nim tutorial here without the maintenance cost.

p-shahi avatar Dec 05 '22 16:12 p-shahi

Yup, did that here: https://github.com/libp2p/docs/pull/265 So now we are in the same state as Rust, but you also want to move rust examples here, according to https://github.com/libp2p/docs/issues/247

Menduist avatar Dec 05 '22 16:12 Menduist

Having it in another repo makes it a bit harder (I have PTSD from outdated examples & tutorials :D )

Agreed. I think example code should live as close to the code it is showcasing as possible.

mxinden avatar Dec 06 '22 18:12 mxinden