mirror of
https://github.com/aziascreations/BakaShrot.git
synced 2026-11-23 20:58:46 +01:00
Moved the PureBasic version to OldSource/, Started the Rust rewrite in Source/
The rewrite's plan and decisions are in revamp.md. Steps 0 to 10 are done: the workspace and checks, bakashrot-proto, bakashrot-pki and bakashrot-cert, bakashrot-config, bakashrot-storage (schema v9), the server and the client library (every request but replication's, attachments and retention included), the C DLL with its C, PureBasic and Python bindings, and the bakashrot tool. Step 11 (replication) is next. OldSource/ is the old implementation, kept building and passing as the reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RwFeVTGs2SsufaH6zquzcb
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
//! `bindings/c/bakashrot.h` matches the exports: rewritten when it doesn't
|
||||
//! (the test fails then, check the new one in).
|
||||
|
||||
use std::path::Path;
|
||||
|
||||
#[test]
|
||||
fn the_header_is_current() {
|
||||
let crate_dir = env!("CARGO_MANIFEST_DIR");
|
||||
let path = Path::new(crate_dir).join("../../bindings/c/bakashrot.h");
|
||||
let mut generated = Vec::new();
|
||||
cbindgen::generate(crate_dir)
|
||||
.expect("cbindgen reads the crate")
|
||||
.write(&mut generated);
|
||||
let current = std::fs::read(&path).unwrap_or_default();
|
||||
if current != generated {
|
||||
std::fs::create_dir_all(path.parent().unwrap()).unwrap();
|
||||
std::fs::write(&path, &generated).unwrap();
|
||||
panic!("{} was out of date: rewritten, check it in", path.display());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user