Skip to content

Commit 59fd1e1

Browse files
authored
Merge pull request #1 from ava-labs/basic-struct
*: add basic kvvm struct template
2 parents 8234a2b + db73e3b commit 59fd1e1

File tree

3 files changed

+34
-12
lines changed

3 files changed

+34
-12
lines changed

.github/workflows/test-and-release.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ jobs:
9191
- os: macos-latest
9292
platform: darwin
9393
target: x86_64-apple-darwin
94-
- os: ubuntu-latest
95-
platform: linux
96-
target: aarch64-unknown-linux-musl
94+
# - os: ubuntu-latest
95+
# platform: linux
96+
# target: aarch64-unknown-linux-musl
9797
- os: macos-latest
9898
platform: darwin
9999
target: aarch64-apple-darwin

src/kvvm.rs

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#![allow(dead_code)]
2+
#![allow(unused_imports)]
3+
4+
use std::sync::{Arc, Mutex};
5+
6+
use crate::vm::vm_server::Vm;
7+
8+
#[derive(Debug)]
9+
pub struct Handler {
10+
db: Db,
11+
}
12+
13+
#[derive(Debug, Clone)]
14+
struct Db {
15+
shared: Arc<Shared>,
16+
}
17+
18+
#[derive(Debug)]
19+
struct Shared {
20+
state: Mutex<State>,
21+
}
22+
23+
#[derive(Debug)]
24+
struct State {
25+
bootstrapped: bool,
26+
}
27+
28+
// impl Vm for Handler {
29+
// TODO
30+
// }

src/lib.rs

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
11
pub mod genesis;
2+
pub mod kvvm;
23
pub mod plugin;
34

45
pub mod vm {
56
tonic::include_proto!("vm");
67
}
7-
#[allow(unused_imports)]
8-
use vm::vm_server::Vm;
98

109
pub mod metrics {
1110
tonic::include_proto!("metrics");
1211
}
13-
14-
#[derive(Debug)]
15-
pub struct KvVm {}
16-
17-
// impl Vm for KvVm {
18-
// TODO
19-
// }

0 commit comments

Comments
 (0)