-
Notifications
You must be signed in to change notification settings - Fork 21
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
Documentation/Example improvements #59
Comments
These look good to me. I didn't realize the readme wasn't updated when we made breaking changes, so that's a good catch. The vendored openssl is also useful, although if I remember correctly it wasn't working on windows a few years ago when I wrote this guide. It's probably been fixed since then so I'm not concerned. |
naskya
added a commit
to naskya/rust-web-push
that referenced
this issue
Jun 1, 2024
naskya
added a commit
to naskya/rust-web-push
that referenced
this issue
Jun 1, 2024
naskya
added a commit
to naskya/rust-web-push
that referenced
this issue
Jun 1, 2024
naskya
added a commit
to naskya/rust-web-push
that referenced
this issue
Jun 1, 2024
andyblarblar
pushed a commit
that referenced
this issue
Jun 1, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think there is room for improvement in the documentation and the examples. If the maintainer(s) agree with my suggestion, I’m willing to open a new pull request to fix it.
1.
println!
usage in the example codeThe use of the
println!
macro is a bit weird here, since thisresponse
is()
. We should just remove the print statement or use.map_err()
/if let Err(err) = response { ... }
/ etc. to print only the errors (in case it fails).rust-web-push/examples/simple_send.rs
Lines 85 to 86 in 010cac3
ref: #57 (comment)
2. The example in README does not compile
The example in README does not compile because
web_push::clients
is a private module. SinceIsahcWebPushClient
is re-exported, we can simply remove the seconduse
to make it compilable.rust-web-push/README.md
Lines 26 to 27 in 40febe4
rust-web-push/src/lib.rs
Lines 55 to 56 in 40febe4
rust-web-push/src/lib.rs
Line 67 in 40febe4
3. There is an alternative solution to the OpenSSL requirement
README says
rust-web-push/README.md
Lines 13 to 15 in 40febe4
but system OpenSSL is not a strict requirement.
We can use
vendored
feature ofopenssl
crate to make it work without installing OpenSSL on host (althoughvendored
feature requires other dependencies, but most of them are covered bybuild-essential
on Debian/Ubuntu,base-devel
on Arch Linux,groupinstall "Development Tools"
on Fedora/Red Hat distros, etc). I can provide a minimal working example of this (in a sample GitHub workflow run or something like that) if needed, but I already confirmed this by actually using web-push and openssl crates in our project.Thanks a lot for maintaining this project!
The text was updated successfully, but these errors were encountered: