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

Create getting started guide for nim-libp2p #245

Open
15 tasks
salmad3 opened this issue Nov 23, 2022 · 5 comments
Open
15 tasks

Create getting started guide for nim-libp2p #245

salmad3 opened this issue Nov 23, 2022 · 5 comments
Labels
area:guides Tutorials, how-tos, examples, and common guides. P2 Medium type:new page New content page

Comments

@salmad3
Copy link
Member

salmad3 commented Nov 23, 2022

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 salmad3 added type:new page New content page area:guides Tutorials, how-tos, examples, and common guides. labels Nov 23, 2022
@p-shahi
Copy link
Member

p-shahi commented Nov 23, 2022

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

@salmad3 salmad3 added the P2 Medium label Nov 23, 2022
@Menduist
Copy link
Contributor

Menduist commented Dec 5, 2022

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!

@p-shahi
Copy link
Member

p-shahi commented Dec 5, 2022

@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.

@Menduist
Copy link
Contributor

Menduist commented Dec 5, 2022

Yup, did that here: #265
So now we are in the same state as Rust, but you also want to move rust examples here, according to #247

@mxinden
Copy link
Member

mxinden commented Dec 6, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:guides Tutorials, how-tos, examples, and common guides. P2 Medium type:new page New content page
Projects
None yet
Development

No branches or pull requests

4 participants