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

Provide some docs #273

Closed
0xTim opened this issue Oct 12, 2024 · 2 comments · Fixed by #283
Closed

Provide some docs #273

0xTim opened this issue Oct 12, 2024 · 2 comments · Fixed by #283
Labels
area/documentation Improvements or additions to documentation. good first issue Good for newcomers

Comments

@0xTim
Copy link
Contributor

0xTim commented Oct 12, 2024

New API Proposal: Add Documentation

Motivation:

Currently Swift Crypto offers no documentation site that can be referred to, to see how the API works. There are CryptoKit docs (https://developer.apple.com/documentation/cryptokit) but that can cause confusion for those coming from non-Apple platforms that aren't aware of any differences. Additionally CryptoExtras has no documentation anywhere.

There are DocC comments throughout the files so generating the docs and hosting them on SPI shouldn't be too hard.

Importance:

Documentation helps people understand how to use the package.

Side note

The GH repo points to https://apple.github.io/swift-crypto which is horribly out of date so should be removed until up to date docs are available

@Lukasa
Copy link
Contributor

Lukasa commented Oct 14, 2024

Thanks, this makes a lot of sense. I think we should begin by producing shell documentation for Crypto that links to the CryptoKit documentation and start some API docs for CryptoExtras. If the community wanted to start with some PRs that added these shells, including an spi.yml, I'd be more than happy to review and merge them.

@Lukasa Lukasa added area/documentation Improvements or additions to documentation. good first issue Good for newcomers labels Oct 14, 2024
@0xTim 0xTim mentioned this issue Oct 16, 2024
5 tasks
@nhcoding4
Copy link

Better documentation would be brilliant. It took me a good bit of digging that to use this library you had add:
dependencies: [.product(name: "Crypto", package: "swift-crypto")]) instead of just "Crypto" as stated on the front page.

Lukasa pushed a commit that referenced this issue Dec 12, 2024
Adds some additional documentation. I don't know how far you want me to
go with documenting everything so let me know. This should at least get
the current APIs rendered on SPI. As an aside I'm not a huge fan of
linking out to the CryptoKit docs since not everything is available
here, all the code is already documented here and most of the tutorials
and articles on developer.apple.com for CryptoKit refer to Apple
Platform specific stuff, like interacting with the keychain, that is not
applicable here.

Resolves #273 

### Checklist
- [x] I've run tests to see all new and existing tests pass
- [x] I've followed the code style of the rest of the project
- [x] I've read the [Contribution Guidelines](CONTRIBUTING.md)
- [x] I've updated the documentation if necessary

#### If you've made changes to `gyb` files
- [x] I've run `.script/generate_boilerplate_files_with_gyb` and
included updated generated files in a commit of this pull request

### Motivation:

Currently Swift Crypto has no documentation which is not great

### Modifications:

Adds additional DocC scaffolding to take advantage of the DocC comments
in Crypto and CryptoExtras. Adds an SPI config file for Swift Package
Index

### Result:

We will have some documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Improvements or additions to documentation. good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants