Skip to content
Open
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
3 changes: 3 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
# when using osx, we need to link against some golang libraries, it did just work with this missing flags
# from: https://github.com/golang/go/issues/42459
rustflags = ["-C", "link-args=-framework CoreFoundation -framework Security -framework CoreServices -lresolv"]

[target.x86_64-unknown-linux-gnu]
linker = "cc"
4 changes: 2 additions & 2 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ name: Codecov

jobs:
test:
name: Test
name: Test-codecov
env:
RUSTFLAGS: -C instrument-coverage
runs-on: ubuntu-latest
Expand All @@ -23,7 +23,7 @@ jobs:
go-version: '1.20'
- uses: actions-rs/toolchain@v1
with:
profile: minimal
profile: default
toolchain: stable
override: true
components: llvm-tools-preview
Expand Down
27 changes: 22 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@ on:

name: CI

# Make sure cc linker is used on Linux/macOS
x-setup-linker: &setup-linker
- name: Setup linker
run: |
mkdir -p .cargo
cat > .cargo/config.toml <<EOF
[target.x86_64-unknown-linux-gnu]
linker = "cc"

[target.aarch64-apple-darwin]
linker = "cc"

[target.x86_64-apple-darwin]
linker = "cc"
EOF

jobs:
check:
name: Check
Expand All @@ -19,7 +35,7 @@ jobs:
#- os: windows-latest
# toolchain: stable-x86_64-pc-windows-gnu
- os: macos-latest
toolchain: stable-x86_64-apple-darwin
toolchain: stable
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand All @@ -29,7 +45,7 @@ jobs:
run: git submodule update --init --recursive
- uses: actions-rs/toolchain@v1
with:
profile: minimal
profile: default
toolchain: ${{ matrix.toolchain }}
default: true
override: true
Expand All @@ -48,7 +64,7 @@ jobs:
#- os: windows-latest
# toolchain: stable-x86_64-pc-windows-gnu
- os: macos-latest
toolchain: stable-x86_64-apple-darwin
toolchain: stable
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand All @@ -58,10 +74,11 @@ jobs:
run: git submodule update --init --recursive
- uses: actions-rs/toolchain@v1
with:
profile: minimal
profile: default
toolchain: ${{ matrix.toolchain }}
default: true
override: true
- *setup-linker
- uses: actions-rs/cargo@v1
continue-on-error: false
with:
Expand All @@ -82,7 +99,7 @@ jobs:
run: git submodule update --init --recursive
- uses: actions-rs/toolchain@v1
with:
profile: minimal
profile: default
toolchain: stable
override: true
components: rustfmt, clippy
Expand Down
11 changes: 10 additions & 1 deletion Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ members = [
"waku-bindings",
"waku-sys",
"examples/basic"
]
]

1 change: 1 addition & 0 deletions examples/basic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ tokio = { version = "1.36.0", features = ["full"] }
tokio-util = { version = "0.7.10", features = ["rt"] }
waku = { path = "../../waku-bindings", package = "waku-bindings" }
serde_json = "1.0"
compiler_builtins = { version = "0.1", features = ["mem"] }
1 change: 1 addition & 0 deletions examples/tic-tac-toe-gui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ tokio-util = "0.6" # for utility functions if needed
egui = "0.22"
eframe = "0.22"
secp256k1 = { version = "0.26", features = ["rand", "recovery", "serde"] }
compiler_builtins = { version = "0.1", features = ["mem"] }

1 change: 1 addition & 0 deletions examples/tic-tac-toe-gui/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ async fn main() -> eframe::Result<()> {
tcp_port: Some(60010),
cluster_id: Some(16),
shards: vec![1, 32, 64, 128, 256],
num_shards_in_network: Some(257),
// node_key: Some(SecretKey::from_str("2fc0515879e52b7b73297cfd6ab3abf7c344ef84b7a90ff6f4cc19e05a198027").unwrap()),
max_message_size: Some("1024KiB".to_string()),
relay_topics: vec![String::from(&game_topic)],
Expand Down
3 changes: 2 additions & 1 deletion examples/toy-chat/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ crossterm = "0.25"
unicode-width = "0.1"
prost = "0.11"
chrono = "0.4"
tokio = { version = "1", features = ["full"] }
tokio = { version = "1", features = ["full"] }
compiler_builtins = { version = "0.1", features = ["mem"] }
1 change: 1 addition & 0 deletions examples/toy-chat/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ impl App<Initialized> {
tcp_port: Some(60010),
cluster_id: Some(16),
shards: vec![1, 32, 64, 128, 256],
num_shards_in_network: Some(257),
// node_key: Some(SecretKey::from_str("2fc0515879e52b7b73297cfd6ab3abf7c344ef84b7a90ff6f4cc19e05a198027").unwrap()),
max_message_size: Some("1024KiB".to_string()),
relay_topics: vec![String::from(&pubsub_topic)],
Expand Down
1 change: 1 addition & 0 deletions waku-bindings/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ categories = ["network-programming"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
compiler_builtins = { version = "0.1", features = ["mem"] }
aes-gcm = { version = "0.10", features = ["aes"] }
base64 = "0.21"
enr = { version = "0.7", features = ["serde", "rust-secp256k1"] }
Expand Down
5 changes: 4 additions & 1 deletion waku-bindings/src/node/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ pub struct WakuNodeConfig {
#[default(Some(true))]
pub relay: Option<bool>,
pub relay_topics: Vec<String>,
#[default(vec![1])]
#[default(vec![0])]
pub shards: Vec<usize>,
#[default(Some(1))]
#[serde(rename = "numShardsInNetwork")]
pub num_shards_in_network: Option<usize>,
#[serde(skip_serializing_if = "Option::is_none")]
pub max_message_size: Option<String>,

Expand Down
1 change: 1 addition & 0 deletions waku-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ crate-type = ["rlib"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
compiler_builtins = { version = "0.1", features = ["mem"] }

[build-dependencies]
bindgen = "0.64"
Expand Down
2 changes: 1 addition & 1 deletion waku-sys/vendor
Submodule vendor updated 475 files
Loading