mirror of
https://github.com/NixOS/nix
synced 2025-06-26 03:21:16 +02:00
Add NAR parser
This commit is contained in:
parent
6317f0f7a0
commit
7f08975050
6 changed files with 160 additions and 3 deletions
|
@ -1,4 +1,8 @@
|
|||
use super::{foreign::{self, CBox}, error, util, store};
|
||||
use super::{
|
||||
error,
|
||||
foreign::{self, CBox},
|
||||
util,
|
||||
};
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn unpack_tarfile(
|
||||
|
@ -10,7 +14,8 @@ pub extern "C" fn unpack_tarfile(
|
|||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn rust_test() {
|
||||
use crate::store::Store;
|
||||
/*
|
||||
use crate::store::{self, Store};
|
||||
use futures::future::{FutureExt, TryFutureExt};
|
||||
use std::path::Path;
|
||||
|
||||
|
@ -39,4 +44,9 @@ pub extern "C" fn rust_test() {
|
|||
};
|
||||
|
||||
tokio::run(fut.boxed().compat());
|
||||
*/
|
||||
|
||||
let file = std::fs::File::open("test.nar").unwrap();
|
||||
|
||||
crate::nar::parse(&mut std::io::BufReader::new(file)).unwrap();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue