-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add code generation of React Native bindings
- Loading branch information
Showing
51 changed files
with
2,833 additions
and
0 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
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,15 @@ | ||
# Generated by Cargo | ||
# will have compiled files and executables | ||
debug/ | ||
target/ | ||
|
||
# These are backup files generated by rustfmt | ||
**/*.rs.bk | ||
|
||
# MSVC Windows builds of rustc generate these, which store debugging information | ||
*.pdb | ||
|
||
# Generated files | ||
android/ | ||
ios/ | ||
ts/ |
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,28 @@ | ||
[package] | ||
name = "bindings-react-native" | ||
version = "0.0.1" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
anyhow = { version = "1.0.57", features = ["backtrace"] } | ||
thiserror = "1.0" | ||
tokio = { version = "1", features = ["full"] } | ||
uniffi = { version = "0.23.0", features = ["bindgen-tests", "cli"] } | ||
uniffi_bindgen = "0.23.0" | ||
uniffi_macros = "0.23.0" | ||
camino = "1.1.1" | ||
log = "*" | ||
serde = "*" | ||
askama = { version = "0.11.1", default-features = false, features = ["config"] } | ||
toml = "0.5" | ||
clap = { version = "3.2.22", features = ["derive"] } | ||
heck = "0.4" | ||
paste = "1.0" | ||
once_cell = "1.12" | ||
|
||
[build-dependencies] | ||
uniffi_build = { version = "0.23.0" } | ||
uniffi_bindgen = "0.23.0" | ||
anyhow = { version = "1.0.57", features = ["backtrace"] } |
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,19 @@ | ||
# breez-sdk-rn-generator | ||
|
||
This utility generates the liquid-swap-sdk React Native package code. | ||
|
||
## Prerequisites | ||
|
||
```bash | ||
brew install ktlint kotlin swiftformat | ||
``` | ||
|
||
```bash | ||
yarn global add tslint typescript | ||
``` | ||
|
||
## Run | ||
|
||
``` | ||
cargo run | ||
``` |
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,6 @@ | ||
[general] | ||
# Directories to search for templates, relative to the crate root. | ||
dirs = [ "src/gen_kotlin/templates", "src/gen_swift/templates", "src/gen_typescript/templates" ] | ||
|
||
[[syntax]] | ||
name = "rn" |
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,5 @@ | ||
SOURCES=$(sort $(wildcard ./src/*.rs ./src/**/*.rs)) | ||
|
||
codegen: $(SOURCES) | ||
cargo run | ||
|
Oops, something went wrong.