-
Notifications
You must be signed in to change notification settings - Fork 90
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
Improve Examples section #29
Comments
@yusefnapora I created a pull for the Go getting started example. In its current state, it won't compile. There's no mention of the necessary declaration of // The context governs the lifetime of the libp2p node.
// Cancelling it will stop the the host.
ctx, cancel := context.WithCancel(context.Background())
defer cancel() |
Reach out to other implementations (Python, Nim, Zig, etc) to be included in examples page. Will close the child tickets in favor of this one. @DannyS03 plans to combine the Tutorials and Examples section in the future, so some of this work will be addressed by that. |
After having touched on this issue (and idea) a few times in the latter half of 2022, the preference among the stewards is to keep the examples in their respective repos. We also have a general "Guides" section now that provides guides to get started with libp2p, and it will continue to refer to the examples in each repo (for example, as mentioned here). Implementations that do not have a getting started guide will be added shortly. As a result, let's close this and revisit if necessary. |
The current examples section just links to external sources for go, js and rust.
I think there's a big opportunity to take those external examples and rework them a bit, pull them into the site, and use them as teaching tools to walk people through libp2p use cases.
I think that keeping the examples in their own repos will probably work best, since that's the easiest place to keep them up-to-date and integrated with CI.
My tentative plan is to clone the example repos as part of the build process for this site, run them through some formatting, and embed the result into the site.
For this to work well, some work needs to be done on the example repos so that they all have enough narrative & framing around them, and I need to develop the formatting / build process.
The text was updated successfully, but these errors were encountered: