Skip to content

Commit 464e5b3

Browse files
committed
Initial Release
1 parent c1247dc commit 464e5b3

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ repository = "https://github.com/timelessos/lcas"
77
documentation = "https://docs.rs/lcas/"
88
license = "MIT"
99
keywords = [ "file-synchronization", "software-delivery", "content-addressable", "storage" ]
10-
catagories = [ "filesystems", "os::linux-apis" ]
10+
categories = [ "filesystem", "os::linux-apis" ]
1111
readme = "README.md"
1212
edition = "2024"
1313

examples/basic.rs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
use std::io;
2-
use std::path::absolute;
3-
use std::{fs, path::Path};
1+
#[cfg(all(feature = "encoding", feature = "decoding"))]
2+
fn main() -> Result<(), String> {
3+
use std::path::absolute;
4+
use std::{fs, path::Path};
45

5-
use lcas::{build, create_repo, create_store, install_artifact};
6+
use lcas::{build, create_repo, create_store, install_artifact};
67

7-
fn main() -> Result<(), String> {
88
// Helper variables
99
// `input_dir` is the artifact, likely produced by a build system etc. This is what we want to "transmit".
1010
let input_dir = absolute(Path::new("./example_dir")).unwrap();
@@ -40,3 +40,10 @@ fn main() -> Result<(), String> {
4040

4141
Ok(())
4242
}
43+
44+
#[cfg(not(all(feature = "encoding", feature = "decoding")))]
45+
fn main() {
46+
use core::panic;
47+
48+
panic!("You need the encoding and decoding features to run this example");
49+
}

0 commit comments

Comments
 (0)