Skip to content

Commit a6d8c96

Browse files
committed
Initial commit
0 parents  commit a6d8c96

File tree

19 files changed

+2137
-0
lines changed

19 files changed

+2137
-0
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Build & Test
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
env:
8+
CARGO_TERM_COLOR: always
9+
10+
jobs:
11+
test:
12+
name: Rust
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
toolchain:
17+
- stable
18+
- nightly
19+
steps:
20+
- uses: actions/checkout@v4
21+
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
22+
- run: cargo build --verbose
23+
- run: cargo test --verbose
24+
- run: cargo clippy --verbose

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/target

ARCHITECTURE.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Architecture of Flint
2+
3+
## Repository
4+
5+
Repositories are stored on a local machine at /var/lib/flint, and ~/.local/flint/ unless otherwise specified in its library form
6+
7+
### Manifest
8+
9+
The manifest contains repository metadata, including:
10+
11+
- **Name**
12+
- **Description**
13+
- **Updates URL** (URL to a SIGNED manifest that should be used as an update)
14+
- **Public Key** (The public key of the **NEXT** manifest)
15+
- **Mirror URLs**
16+
- **Minimum Flint version required**
17+
- **Hash type** (defaults to `blake3`)
18+
- **Package manifests**
19+
20+
Each package manifest includes individual metadata and a chunklist (similar to `mtree`), specifying expected permissions, a hash, and expected size in kilobytes.
21+
22+
### Chunks
23+
24+
Chunks are the basis of Flints content-addressable storage (CAS) and deduplication. Chunk filenames are derived from a hash of their contents.
25+
Each chunk contains the raw data from the file tree.
26+
27+
### Summary
28+
29+
The on-disk structure is:
30+
31+
```
32+
chunks/
33+
manifest.yml.sig
34+
manifest.yml
35+
```
36+
37+
## Bundles
38+
39+
### Headers
40+
41+
A bundle "header" is a prefixed bundle extractor and runner, allowing quick execution without flint being installed.
42+
43+
### Contents
44+
45+
The contents should be a repository with a single version of a single package, packed (NOT compressed) into a tar archive.
46+
47+
### On disk format
48+
49+
Headers may be 512 KB, 1024 KB, or larger in 512 KB increments. The end of the header is identified by the bytes `75 73 74 61 72` (`ustar` in ASCII, the standard tar file signature). This allows for flexible header sizes.

0 commit comments

Comments
 (0)