Skip to content

Commit c7a04e5

Browse files
committed
*: add basic kvvm struct
Signed-off-by: Gyuho Lee <[email protected]>
1 parent 8234a2b commit c7a04e5

File tree

2 files changed

+31
-9
lines changed

2 files changed

+31
-9
lines changed

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)