more garbage
This commit is contained in:
parent
e00f2f08c8
commit
fd64968f3a
7
Cargo.lock
generated
7
Cargo.lock
generated
|
@ -78,12 +78,6 @@ dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "once_cell"
|
|
||||||
version = "1.19.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro2"
|
name = "proc-macro2"
|
||||||
version = "1.0.82"
|
version = "1.0.82"
|
||||||
|
@ -144,5 +138,4 @@ name = "xtask"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"argh",
|
"argh",
|
||||||
"once_cell",
|
|
||||||
]
|
]
|
||||||
|
|
|
@ -5,4 +5,3 @@ edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
argh = "0.1"
|
argh = "0.1"
|
||||||
once_cell = "1.18"
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
use {
|
use {
|
||||||
crate::{utils::IterExt, ROOT},
|
crate::utils::IterExt,
|
||||||
argh::FromArgs,
|
argh::FromArgs,
|
||||||
std::{
|
std::{
|
||||||
fs::File,
|
fs::File,
|
||||||
|
@ -17,8 +17,10 @@ pub struct Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn command(args: Command) -> io::Result<()> {
|
pub fn command(args: Command) -> io::Result<()> {
|
||||||
let mut file =
|
let mut file = File::options()
|
||||||
File::options().read(true).write(true).open(ROOT.join("hbbytecode/instructions.in"))?;
|
.read(true)
|
||||||
|
.write(true)
|
||||||
|
.open(crate::root().join("hbbytecode/instructions.in"))?;
|
||||||
|
|
||||||
// Extract records
|
// Extract records
|
||||||
let reader = BufReader::new(&file);
|
let reader = BufReader::new(&file);
|
||||||
|
|
|
@ -3,11 +3,12 @@ mod utils;
|
||||||
|
|
||||||
use {
|
use {
|
||||||
argh::FromArgs,
|
argh::FromArgs,
|
||||||
once_cell::sync::Lazy,
|
|
||||||
std::{io, path::Path},
|
std::{io, path::Path},
|
||||||
};
|
};
|
||||||
|
|
||||||
static ROOT: Lazy<&Path> = Lazy::new(|| Path::new(env!("CARGO_MANIFEST_DIR")).parent().unwrap());
|
fn root() -> &'static Path {
|
||||||
|
Path::new(env!("CARGO_MANIFEST_DIR")).parent().unwrap()
|
||||||
|
}
|
||||||
|
|
||||||
/// xTask for Holey Bytes project
|
/// xTask for Holey Bytes project
|
||||||
#[derive(FromArgs)]
|
#[derive(FromArgs)]
|
||||||
|
|
Loading…
Reference in a new issue