Skip to content

Add readme and improve docs for release#4

Merged
maurges merged 5 commits intomfrom
docs
Mar 25, 2026
Merged

Add readme and improve docs for release#4
maurges merged 5 commits intomfrom
docs

Conversation

@maurges
Copy link
Copy Markdown
Contributor

@maurges maurges commented Mar 18, 2026

The api docs were already pretty good, so I added a readme with an example usage, inspired by cggmp and givre

@socket-security
Copy link
Copy Markdown

socket-security bot commented Mar 18, 2026

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring alerts on:

  • cargo/num-bigint@0.3.3

View full report

@maurges
Copy link
Copy Markdown
Contributor Author

maurges commented Mar 18, 2026

@SocketSecurity allow num-bigint@0.3.3

@maurges
Copy link
Copy Markdown
Contributor Author

maurges commented Mar 18, 2026

@SocketSecurity ignore num-bigint@0.3.3

@maurges maurges marked this pull request as ready for review March 18, 2026 12:36
@maurges maurges requested a review from survived March 18, 2026 12:36
src/lib.rs Outdated
Comment on lines +4 to +6
//! To run the protocol, you need to call the [`start`] function. See the
//! repository [readme](https://github.com/dfns/LFDT-Lockness/blob/m/README.md)
//! for more information on how to set up the parameters
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why not #[doc = include_str!("../README.md")]? Then the doc examples will be automatically tested. Otherwise we will not notice if/when it breaks.

Copy link
Copy Markdown
Contributor Author

@maurges maurges Mar 19, 2026

Choose a reason for hiding this comment

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

Remind me, why don't we simply include the readme in any other lockness projects? I was mindlessly copying from them

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

depends on what you have in readme, whether you have links to structs (which are not correctly resolved in readme) and examples (hidden lines that start with #), you may need something more advanced than include_str!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't recall any project in which crate docs would say "go to readme" though

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, that last part is my invention =)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

But now that you do use # in examples, readme looks ugly:

image

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

cargo-readme generates a readme that has # lines in examples removed. It's setup we have pretty much in every repo. If you don't want to mess with it, I think it's better to an empty readme that has link to docs.rs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oh shit I forgot to read the readme itself. I find the approach with cargo-readme annoying, so I'd prefer to have an almost-empty readme

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

After rewriting the example to use futures, the repository readme also looks nice as it doesn't use any #, I think this could be left as is: https://github.com/dfns/tecdh/blob/38184eba051eba237202c9e2d4a9ca335196b7f5/README.md

@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedcargo/​futures@​0.3.3110010093100100

View full report

@maurges maurges merged commit f1fb4a0 into m Mar 25, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants