tangled
alpha
login
or
join now
edouard.paris
/
vnd-atproto
2
fork
atom
wip
2
fork
atom
overview
issues
pulls
pipelines
refac common module
edouard.paris
9 months ago
f3cb2bda
039b2b45
+30
-27
4 changed files
expand all
collapse all
unified
split
Cargo.toml
common
Cargo.toml
src
lib.rs
message.rs
+4
Cargo.toml
···
23
23
[dev-dependencies]
24
24
hex-literal = "0.4.1"
25
25
26
26
+
[profile.release]
27
27
+
opt-level = 3
28
28
+
lto = true
29
29
+
26
30
[workspace]
27
31
resolver = "2"
28
32
members = [
+2
-2
common/Cargo.toml
···
2
2
name = "vnd-atproto-common"
3
3
version = "0.0.1"
4
4
authors = ["Edouard Paris <m@edouard.paris>"]
5
5
-
edition = "2018"
5
5
+
edition = "2024"
6
6
description = "Vanadium app for atproto plc"
7
7
8
8
[dependencies]
9
9
-
serde = { version = "1.0", default-features = false, features = ["alloc"] }
9
9
+
serde = { version = "1.0", default-features = false, features = ["alloc", "derive"] }
+1
-25
common/src/lib.rs
···
2
2
3
3
extern crate alloc;
4
4
5
5
-
pub mod message {
6
6
-
use alloc::{string::String, vec::Vec};
7
7
-
use serde::{Deserialize, Serialize};
8
8
-
9
9
-
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
10
10
-
pub enum Request {
11
11
-
Exit,
12
12
-
GetDidKey { index: u32, display: bool },
13
13
-
// SignPlcOperation {
14
14
-
// key_index: u32,
15
15
-
// previous: Option<PlcOperation>,
16
16
-
// operation: PlcOperation,
17
17
-
// },
18
18
-
}
19
19
-
20
20
-
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
21
21
-
pub enum PlcOperation {}
22
22
-
23
23
-
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
24
24
-
pub enum Response {
25
25
-
DidKey(Vec<u8>),
26
26
-
// Signature(Vec<u8>),
27
27
-
Error(String),
28
28
-
}
29
29
-
}
5
5
+
pub mod message;
+23
common/src/message.rs
···
1
1
+
use alloc::{string::String, vec::Vec};
2
2
+
use serde::{Deserialize, Serialize};
3
3
+
4
4
+
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
5
5
+
pub enum Request {
6
6
+
Exit,
7
7
+
GetDidKey { index: u32, display: bool },
8
8
+
// SignPlcOperation {
9
9
+
// key_index: u32,
10
10
+
// previous: Option<PlcOperation>,
11
11
+
// operation: PlcOperation,
12
12
+
// },
13
13
+
}
14
14
+
15
15
+
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
16
16
+
pub enum PlcOperation {}
17
17
+
18
18
+
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
19
19
+
pub enum Response {
20
20
+
DidKey(Vec<u8>),
21
21
+
// Signature(Vec<u8>),
22
22
+
Error(String),
23
23
+
}