-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
108 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
[package] | ||
name = "webln" | ||
version = "0.1.0" | ||
edition = "2021" | ||
description = "WebLN - Lightning Web Standard" | ||
[workspace] | ||
members = [ | ||
"webln", | ||
] | ||
resolver = "2" | ||
|
||
[workspace.package] | ||
authors = ["Yuki Kishimoto <[email protected]>"] | ||
homepage = "https://github.com/yukibtc/rust-webln" | ||
repository = "https://github.com/yukibtc/rust-webln.git" | ||
license = "MIT" | ||
#rust-version = "1.64.0" TODO: check MSRV | ||
keywords = ["webln", "lightning", "bitcoin"] | ||
rust-version = "1.64.0" # TODO: check MSRV | ||
|
||
[dependencies] | ||
js-sys = "0.3" | ||
wasm-bindgen = { version = "0.2", default-features = false } | ||
wasm-bindgen-futures = "0.4" | ||
web-sys = { version = "0.3", default-features = false, features = ["Window"] } | ||
[workspace.dependencies] | ||
|
||
[profile.release] | ||
lto = true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# WebLN | ||
# WebLN - Lightning Web Standard | ||
|
||
* [webln](./webln/): Rust implementation of WebLN | ||
|
||
## License | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
|
||
# Needed to exit from script on error | ||
set -e | ||
|
||
# MSRV | ||
msrv="1.64.0" | ||
|
||
is_msrv=false | ||
version="" | ||
|
||
# Check if "msrv" is passed as an argument | ||
if [[ "$#" -gt 0 && "$1" == "msrv" ]]; then | ||
is_msrv=true | ||
version="+$msrv" | ||
fi | ||
|
||
# Check if MSRV | ||
if [ "$is_msrv" == true ]; then | ||
# Install MSRV | ||
rustup install $msrv | ||
rustup component add clippy --toolchain $msrv | ||
rustup target add wasm32-unknown-unknown --toolchain $msrv | ||
fi | ||
|
||
buildargs=( | ||
"-p webln --target wasm32-unknown-unknown" | ||
) | ||
|
||
for arg in "${buildargs[@]}"; do | ||
if [[ $version == "" ]]; then | ||
echo "Checking '$arg' [default]" | ||
else | ||
echo "Checking '$arg' [$version]" | ||
fi | ||
cargo $version check $arg | ||
cargo $version clippy $arg -- -D warnings | ||
echo | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
# Needed to exit from script on error | ||
set -e | ||
|
||
buildargs=( | ||
"-p webln --target wasm32-unknown-unknown" | ||
) | ||
|
||
for arg in "${buildargs[@]}"; do | ||
echo "Checking '$arg' docs" | ||
cargo doc $arg --all-features | ||
echo | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
fmt: | ||
cargo fmt --all -- --config format_code_in_doc_comments=true | ||
|
||
check: | ||
cargo check | ||
cargo clippy | ||
cargo doc | ||
check: fmt check-crates check-crates-msrv check-docs | ||
|
||
check-fmt: | ||
cargo fmt --all -- --config format_code_in_doc_comments=true --check | ||
|
||
check-crates: | ||
@bash contrib/scripts/check-crates.sh | ||
|
||
check-crates-msrv: | ||
@bash contrib/scripts/check-crates.sh msrv | ||
|
||
check-docs: | ||
@bash contrib/scripts/check-docs.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[package] | ||
name = "webln" | ||
version = "0.1.0" | ||
edition = "2021" | ||
description = "WebLN - Lightning Web Standard" | ||
authors.workspace = true | ||
homepage.workspace = true | ||
repository.workspace = true | ||
license.workspace = true | ||
readme = "README.md" | ||
rust-version.workspace = true | ||
keywords = ["webln", "lightning", "bitcoin"] | ||
|
||
[dependencies] | ||
js-sys = "0.3" | ||
wasm-bindgen = { version = "0.2", default-features = false } | ||
wasm-bindgen-futures = "0.4" | ||
web-sys = { version = "0.3", default-features = false, features = ["Window"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# WebLN | ||
|
||
## License | ||
|
||
This project is distributed under the MIT software license - see the [LICENSE](../LICENSE) file for details | ||
|
||
## Donations | ||
|
||
⚡ Tips: https://getalby.com/p/yuki | ||
|
||
⚡ Lightning Address: [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters