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

feature: add an example of native provider #514

Merged
merged 1 commit into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/qaci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
run: cargo test --all --verbose

build_ffi:
name: Build and test for ffi
name: Build and test for examples
timeout-minutes: 20
strategy:
matrix:
Expand Down Expand Up @@ -124,9 +124,12 @@ jobs:
with:
python-version: "3.11"

- name: Smoke test
- name: Smoke test ffi
run: pip install wheel && pip install web3 cffi && python examples/ffi/rings.py

- name: Smoke test native
run: cargo run -p rings-native-example

rustfmt_and_clippy:
name: Check rustfmt style && run clippy
timeout-minutes: 10
Expand Down
97 changes: 54 additions & 43 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]
resolver = "2"
members = ["core", "transport", "node", "rpc", "derive"]
members = ["core", "transport", "node", "rpc", "derive", "examples/native"]

[workspace.package]
version = "0.5.2"
Expand All @@ -10,10 +10,12 @@ authors = ["RND <dev@ringsnetwork.io>"]
repository = "https://github.com/RingsNetwork/rings-node"

[workspace.dependencies]
async-trait = "0.1.77"
js-sys = "0.3.64"
jsonrpc-core = "18.0.0"
rings-core = { path = "core", default-features = false }
rings-derive = { path = "derive", default-features = false }
rings-node = { path = "node" }
rings-rpc = { path = "rpc", default-features = false }
rings-transport = { path = "transport" }
serde-wasm-bindgen = "0.6.1"
Expand Down
2 changes: 1 addition & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ arrayref = "0.3.6"
async-lock = "2.5.0"
async-recursion = "1.0.0"
async-stream = "0.3.2"
async-trait = "0.1.52"
async-trait = { workspace = true }
base58 = "0.2.0"
base58-monero = { version = "0.3", default-features = false, features = ["check"] }
bincode = "1.3.3"
Expand Down
1 change: 0 additions & 1 deletion examples/ffi/rings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import platform
import re
import time
Expand Down
14 changes: 14 additions & 0 deletions examples/native/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[package]
name = "rings-native-example"
version.workspace = true
edition.workspace = true
license.workspace = true
authors.workspace = true
repository.workspace = true

[dependencies]
async-trait = { workspace = true }
rings-core = { workspace = true }
rings-node = { workspace = true }
rings-rpc = { workspace = true }
tokio = { version = "1.13.0", features = ["full"] }
Loading
Loading