Skip to content

Commit 44c42e0

Browse files
committed
wip: bring back core crate
1 parent b8e2a25 commit 44c42e0

File tree

18 files changed

+585
-409
lines changed

18 files changed

+585
-409
lines changed

Cargo.lock

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ members = [
1010
"sandpolis-audit",
1111
"sandpolis-bootagent",
1212
"sandpolis-client",
13+
"sandpolis-core",
1314
"sandpolis-database",
1415
"sandpolis-deploy",
1516
"sandpolis-desktop",

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ active development.
1919

2020
Virtual/digital estate is an all-encompassing term that generally refers to all
2121
of the (non-physical) assets in your possession. Some of them may be entirely
22-
virtual, like accounts on _github.com_. Others have a physical component as
23-
well, like a server in your closet, Raspberry Pi, or laptop.
22+
virtual and controlled by a corporation, like accounts on _github.com_. Others
23+
have a physical component as well, like a server in your closet, Raspberry Pi,
24+
or laptop.
2425

2526
All of these entities are part of your _virtual estate_ and are often
2627
intricately connected in various ways. As an example, you might have an SSH key
@@ -137,6 +138,17 @@ Provides an interactive remote shell.
137138
cargo install sandpolis
138139
```
139140

141+
As an added benefit for this installation method, you can customize exactly what
142+
features you need. For example, to build with support for remote desktop and
143+
nothing else:
144+
145+
```sh
146+
cargo install sandpolis --no-default-features --features layer-desktop
147+
```
148+
149+
As a result, your installation artifacts will be smaller and will be unable to
150+
perform any excluded functionality.
151+
140152
</details>
141153

142154
<details>

sandpolis-account/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
//! This layer enables account-level management.
22
3-
use sandpolis_database::Collection;
3+
use sandpolis_database::DataView;
44
use sandpolis_instance::InstanceId;
55
use serde::{Deserialize, Serialize};
66
use validator::Validate;
77

88
pub struct AccountLayer {
9-
accounts: Collection<Account>,
10-
links: Collection<AccountLink>,
9+
accounts: DataView<AccountData>,
10+
links: DataView<AccountLinkData>,
1111
}
1212

1313
#[derive(Serialize, Deserialize, Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
@@ -28,7 +28,7 @@ impl Default for AccountValue {
2828
}
2929

3030
#[derive(Serialize, Deserialize, Clone, Debug)]
31-
pub struct Account {
31+
pub struct AccountData {
3232
service: Option<String>,
3333
username: Option<String>,
3434
email: Option<String>,
@@ -40,7 +40,7 @@ pub struct Account {
4040
}
4141

4242
#[derive(Serialize, Deserialize, Clone, Debug)]
43-
pub struct AccountLink {
43+
pub struct AccountLinkData {
4444
r#type: AccountLinkType,
4545
incoming: AccountId,
4646
outgoing: AccountId,

sandpolis-core/Cargo.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[package]
2+
description = "Virtual estate monitoring & management!"
3+
edition = "2024"
4+
license = "AGPL-3.0-only"
5+
name = "sandpolis-core"
6+
version = "0.0.1"
7+
8+
[dependencies]
9+
anyhow = { workspace = true }
10+
colored = { workspace = true }
11+
native_db = { workspace = true }
12+
native_model = { workspace = true }
13+
regex = { workspace = true }
14+
serde = { workspace = true }
15+
strum = { workspace = true }
16+
uuid = { workspace = true }
17+
validator = { workspace = true }
18+
19+
[features]
20+
server = []
21+
agent = []
22+
client = []

sandpolis-core/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## `sandpolis-core`
2+
3+
Contains foundational types used by every other module like `InstanceId`. This
4+
is the apex of the dependency tree.

0 commit comments

Comments
 (0)