1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 03:21:16 +02:00

Add NAR parser

This commit is contained in:
Eelco Dolstra 2019-09-18 00:31:51 +02:00
parent 6317f0f7a0
commit 7f08975050
6 changed files with 160 additions and 3 deletions

View file

@ -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();
}