Skip to content

Commit f69d8aa

Browse files
authored
Merge pull request #633 from dfinity-berestovskyy/andriy/update-periodic-tasks
Update `rust/periodic_tasks` example
2 parents 81e3e53 + caf0b88 commit f69d8aa

File tree

8 files changed

+28
-28
lines changed

8 files changed

+28
-28
lines changed

.github/workflows/rust-periodic_tasks-example.yaml

+2-6
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ jobs:
1818
steps:
1919
- uses: actions/checkout@v1
2020
- name: Provision Darwin
21-
env:
22-
DFX_VERSION: 0.13.1
23-
run: bash .github/workflows/provision-darwin.sh
21+
run: DFX_VERSION="0.15.2" bash .github/workflows/provision-darwin.sh
2422
- name: Rust Periodic Tasks Darwin
2523
run: |
2624
dfx start --background
@@ -32,9 +30,7 @@ jobs:
3230
steps:
3331
- uses: actions/checkout@v1
3432
- name: Provision Linux
35-
env:
36-
DFX_VERSION: 0.13.1
37-
run: bash .github/workflows/provision-linux.sh
33+
run: DFX_VERSION="0.15.2" bash .github/workflows/provision-linux.sh
3834
- name: Rust Periodic Tasks Linux
3935
run: |
4036
dfx start --background

rust/periodic_tasks/Cargo.lock

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/periodic_tasks/dfx.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
}
1313
},
1414
"version": 1
15-
}
15+
}
+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[package]
2+
edition = "2021"
23
name = "heartbeat"
34
version = "1.0.0"
4-
edition = "2021"
55

66
[lib]
77
crate-type = ["cdylib"]
88

99
[dependencies]
10-
candid = "0.10.0"
11-
ic-cdk = "0.12.0"
12-
ic-cdk-macros = "0.8.2"
10+
candid = "0.10"
11+
ic-cdk = "0.12"
12+
ic-cdk-macros = "0.8"
+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
service : (nat64) -> {
2-
"counter": () -> (nat32) query;
3-
"set_interval_secs": (nat64) -> ();
4-
"stop": () -> ();
5-
"cycles_used": () -> (nat64) query;
6-
}
2+
"counter" : () -> (nat32) query;
3+
"set_interval_secs" : (nat64) -> ();
4+
"stop" : () -> ();
5+
"cycles_used" : () -> (nat64) query;
6+
};
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[toolchain]
2+
channel = "1.74"
3+
targets = ["wasm32-unknown-unknown"]
4+
components = ["rustfmt", "clippy"]

rust/periodic_tasks/timer/Cargo.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[package]
2+
edition = "2021"
23
name = "timer"
34
version = "1.0.0"
4-
edition = "2021"
55

66
[lib]
77
crate-type = ["cdylib"]
88

99
[dependencies]
10-
candid = "0.10.0"
10+
candid = "0.10"
1111
# Base Rust CDK crate provides support for heartbeats only.
12-
ic-cdk = "0.12.0"
12+
ic-cdk = "0.12"
1313
# The timers library is required for multiple and periodic timers.
14-
ic-cdk-timers = "0.6.0"
15-
ic-cdk-macros = "0.8.2"
14+
ic-cdk-macros = "0.8"
15+
ic-cdk-timers = "0.6"

rust/periodic_tasks/timer/timer.did

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
service : (nat64) -> {
2-
"counter": () -> (nat32) query;
3-
"start_with_interval_secs": (nat64) -> ();
4-
"stop": () -> ();
5-
"cycles_used": () -> (nat64) query;
6-
}
2+
"counter" : () -> (nat32) query;
3+
"start_with_interval_secs" : (nat64) -> ();
4+
"stop" : () -> ();
5+
"cycles_used" : () -> (nat64) query;
6+
};

0 commit comments

Comments
 (0)