From a6c008d1d8bd11376b724b5fc1ff6caeddfecb21 Mon Sep 17 00:00:00 2001 From: litlep-nibbyt <9344275+litlep-nibbyt@users.noreply.github.com> Date: Thu, 13 Jun 2024 11:20:06 -0400 Subject: [PATCH 01/13] newt.rs: changed new_mock output file to allow writes --- rust/ares/src/newt.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rust/ares/src/newt.rs b/rust/ares/src/newt.rs index 2723a09..882fac5 100644 --- a/rust/ares/src/newt.rs +++ b/rust/ares/src/newt.rs @@ -78,7 +78,11 @@ impl Newt { pub fn new_mock() -> Newt { Newt { input: std::fs::File::open("/dev/null").expect("newt: could not open /dev/null"), - output: std::fs::File::open("/dev/null").expect("newt: could not open /dev/null"), + //output: std::fs::File::open("/dev/null").expect("newt: could not open /dev/null"), + output: std::fs::File::options() + .read(true) + .write(true) + .open("/dev/null").expect("newt: could not open /dev/null") } } From 396a00e222138e6a58b5cbcae1c07c6d1881f797 Mon Sep 17 00:00:00 2001 From: litlep-nibbyt <9344275+litlep-nibbyt@users.noreply.github.com> Date: Thu, 13 Jun 2024 11:22:21 -0400 Subject: [PATCH 02/13] newt.rs: remove commented out code --- rust/ares/src/newt.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/rust/ares/src/newt.rs b/rust/ares/src/newt.rs index 882fac5..9522d01 100644 --- a/rust/ares/src/newt.rs +++ b/rust/ares/src/newt.rs @@ -78,7 +78,6 @@ impl Newt { pub fn new_mock() -> Newt { Newt { input: std::fs::File::open("/dev/null").expect("newt: could not open /dev/null"), - //output: std::fs::File::open("/dev/null").expect("newt: could not open /dev/null"), output: std::fs::File::options() .read(true) .write(true) From a64f193d0802c0a93f39370346d3a52b4fa966f5 Mon Sep 17 00:00:00 2001 From: litlep-nibbyt <9344275+litlep-nibbyt@users.noreply.github.com> Date: Thu, 13 Jun 2024 11:45:45 -0400 Subject: [PATCH 03/13] appease format checker --- rust/ares/src/newt.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rust/ares/src/newt.rs b/rust/ares/src/newt.rs index 9522d01..e569e7c 100644 --- a/rust/ares/src/newt.rs +++ b/rust/ares/src/newt.rs @@ -79,9 +79,10 @@ impl Newt { Newt { input: std::fs::File::open("/dev/null").expect("newt: could not open /dev/null"), output: std::fs::File::options() - .read(true) - .write(true) - .open("/dev/null").expect("newt: could not open /dev/null") + .read(true) + .write(true) + .open("/dev/null") + .expect("newt: could not open /dev/null"), } } From 717668315f34e35701bf0123008a1f6cff766005 Mon Sep 17 00:00:00 2001 From: Chris Allen Date: Thu, 11 Jul 2024 10:15:51 -0500 Subject: [PATCH 04/13] Pin last working version of cc for ares_guard build.rs --- rust/ares_guard/Cargo.lock | 7 ++----- rust/ares_guard/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/rust/ares_guard/Cargo.lock b/rust/ares_guard/Cargo.lock index 26d68b9..9ca8e67 100644 --- a/rust/ares_guard/Cargo.lock +++ b/rust/ares_guard/Cargo.lock @@ -50,12 +50,9 @@ checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" [[package]] name = "cc" -version = "1.0.83" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] +checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" [[package]] name = "cexpr" diff --git a/rust/ares_guard/Cargo.toml b/rust/ares_guard/Cargo.toml index 5a3f718..66b6eab 100644 --- a/rust/ares_guard/Cargo.toml +++ b/rust/ares_guard/Cargo.toml @@ -9,4 +9,4 @@ edition = "2021" [build-dependencies] bindgen = "0.69" -cc = "1.0" +cc = "=1.0.99" From 73575216825fec0b06b58e0b585f97559486d1b4 Mon Sep 17 00:00:00 2001 From: Chris Allen Date: Fri, 19 Jul 2024 14:59:33 -0500 Subject: [PATCH 05/13] Fixing warnings --- rust/ares/src/interpreter.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/rust/ares/src/interpreter.rs b/rust/ares/src/interpreter.rs index c250d88..15c8b2d 100644 --- a/rust/ares/src/interpreter.rs +++ b/rust/ares/src/interpreter.rs @@ -14,7 +14,6 @@ use crate::mem::Preserve; use crate::newt::Newt; use crate::noun; use crate::noun::{Atom, Cell, IndirectAtom, Noun, Slots, D, T}; -use crate::serf::TERMINATOR; use crate::trace::{write_nock_trace, TraceInfo, TraceStack}; use crate::unifying_equality::unifying_equality; use ares_macros::tas; @@ -22,8 +21,6 @@ use assert_no_alloc::{assert_no_alloc, ensure_alloc_counters}; use bitvec::prelude::{BitSlice, Lsb0}; use either::*; use std::result; -use std::sync::atomic::Ordering; -use std::sync::Arc; use std::time::Instant; crate::gdb!(); From db30cf92089d3e942a5495308422215754852051 Mon Sep 17 00:00:00 2001 From: Chris Allen Date: Mon, 22 Jul 2024 12:30:23 -0500 Subject: [PATCH 06/13] Fixing lints and build errors --- rust/ares/Cargo.lock | 7 ++----- rust/ares/src/interpreter.rs | 6 +++--- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/rust/ares/Cargo.lock b/rust/ares/Cargo.lock index 274c0b5..bbe15cc 100644 --- a/rust/ares/Cargo.lock +++ b/rust/ares/Cargo.lock @@ -220,12 +220,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.83" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] +checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" [[package]] name = "cexpr" diff --git a/rust/ares/src/interpreter.rs b/rust/ares/src/interpreter.rs index 15c8b2d..4e30d81 100644 --- a/rust/ares/src/interpreter.rs +++ b/rust/ares/src/interpreter.rs @@ -14,6 +14,7 @@ use crate::mem::Preserve; use crate::newt::Newt; use crate::noun; use crate::noun::{Atom, Cell, IndirectAtom, Noun, Slots, D, T}; +use crate::serf::TERMINATOR; use crate::trace::{write_nock_trace, TraceInfo, TraceStack}; use crate::unifying_equality::unifying_equality; use ares_macros::tas; @@ -21,6 +22,8 @@ use assert_no_alloc::{assert_no_alloc, ensure_alloc_counters}; use bitvec::prelude::{BitSlice, Lsb0}; use either::*; use std::result; +use std::sync::atomic::Ordering; +use std::sync::Arc; use std::time::Instant; crate::gdb!(); @@ -1353,11 +1356,8 @@ mod hint { use crate::jets::cold; use crate::jets::nock::util::{mook, LEAF}; use crate::noun::{tape, Atom, Cell, Noun, D, T}; - use crate::serf::TERMINATOR; use crate::unifying_equality::unifying_equality; use ares_macros::tas; - use std::sync::atomic::Ordering; - use std::sync::Arc; pub fn is_tail(tag: Atom) -> bool { // XX: handle IndirectAtom tags From d957982e5ac9da13f85dc3d60d66c4d75d3700cb Mon Sep 17 00:00:00 2001 From: ryjm Date: Fri, 2 Aug 2024 13:38:46 -0400 Subject: [PATCH 07/13] new_from_files --- rust/ares/src/newt.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rust/ares/src/newt.rs b/rust/ares/src/newt.rs index e569e7c..92c8d13 100644 --- a/rust/ares/src/newt.rs +++ b/rust/ares/src/newt.rs @@ -68,6 +68,13 @@ pub struct Newt { } impl Newt { + pub fn new_from_files(input: std::fs::File, output: std::fs::File) -> Newt { + Newt { + input, + output, + } + } + pub fn new() -> Newt { Newt { input: unsafe { std::fs::File::from_raw_fd(0) }, From f04dacdac3906785bfc1e1bf0e5cfc3156ee8749 Mon Sep 17 00:00:00 2001 From: ryjm Date: Thu, 8 Aug 2024 12:38:02 -0400 Subject: [PATCH 08/13] formatting --- rust/ares/src/newt.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/rust/ares/src/newt.rs b/rust/ares/src/newt.rs index 92c8d13..26934eb 100644 --- a/rust/ares/src/newt.rs +++ b/rust/ares/src/newt.rs @@ -69,10 +69,7 @@ pub struct Newt { impl Newt { pub fn new_from_files(input: std::fs::File, output: std::fs::File) -> Newt { - Newt { - input, - output, - } + Newt { input, output } } pub fn new() -> Newt { From 9841143d0c5ce040b303b484c474528034919a16 Mon Sep 17 00:00:00 2001 From: Edward Amsden Date: Thu, 8 Aug 2024 10:20:56 -0500 Subject: [PATCH 09/13] Make noun::Error an instance of std::error::Error --- rust/ares/src/noun.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/rust/ares/src/noun.rs b/rust/ares/src/noun.rs index 3ce5f80..1e2489f 100644 --- a/rust/ares/src/noun.rs +++ b/rust/ares/src/noun.rs @@ -4,6 +4,7 @@ use bitvec::prelude::{BitSlice, Lsb0}; use either::{Either, Left, Right}; use ibig::{Stack, UBig}; use intmap::IntMap; +use std::error; use std::fmt; use std::ptr; use std::slice::{from_raw_parts, from_raw_parts_mut}; @@ -172,6 +173,21 @@ pub enum Error { NotRepresentable, } +impl error::Error for Error {} + +impl std::fmt::Display for Error { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> fmt::Result { + match self { + Error::NotAllocated => f.write_str("not an allocated noun"), + Error::NotAtom => f.write_str("not an atom"), + Error::NotCell => f.write_str("not a cell"), + Error::NotDirectAtom => f.write_str("not a direct atom"), + Error::NotIndirectAtom => f.write_str("not an indirect atom"), + Error::NotRepresentable => f.write_str("unrepresentable value"), + } + } +} + impl From for () { fn from(_: Error) -> Self {} } From e87ef042758e4477fb532c0c2b28fe1a64d18bce Mon Sep 17 00:00:00 2001 From: litlep-nibbyt <9344275+litlep-nibbyt@users.noreply.github.com> Date: Fri, 16 Aug 2024 16:39:01 -0400 Subject: [PATCH 10/13] disable turn --- rust/ares/src/jets/hot.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/rust/ares/src/jets/hot.rs b/rust/ares/src/jets/hot.rs index 97bf5c7..71ba179 100644 --- a/rust/ares/src/jets/hot.rs +++ b/rust/ares/src/jets/hot.rs @@ -94,11 +94,6 @@ pub const URBIT_HOT_STATE: &[HotEntry] = &[ 1, jet_lent, ), - ( - &[K_139, Left(b"one"), Left(b"two"), Left(b"turn")], - 1, - jet_turn, - ), ( &[K_139, Left(b"one"), Left(b"two"), Left(b"zing")], 1, From 59478b0eb84402278749452a94fc36866690d8be Mon Sep 17 00:00:00 2001 From: Edward Amsden Date: Sat, 17 Aug 2024 19:11:25 -0500 Subject: [PATCH 11/13] Make interpret() generic over slogger (#10) * newt: slogger trait * make interpret() generic over Slogger trait * impl Slogger for pin recurses * What if we asked for Unpin * format * clean up hanging commented code * fix warnings --------- Co-authored-by: Chris Allen --- rust/ares/src/flog.rs | 2 +- rust/ares/src/interpreter.rs | 59 +++++++++++++++++++++++++++--------- rust/ares/src/jets.rs | 18 +++++++++-- rust/ares/src/newt.rs | 48 +++++++++++++++++++---------- rust/ares/src/serf.rs | 28 ++++++++--------- 5 files changed, 106 insertions(+), 49 deletions(-) diff --git a/rust/ares/src/flog.rs b/rust/ares/src/flog.rs index 219bbe4..893af6f 100644 --- a/rust/ares/src/flog.rs +++ b/rust/ares/src/flog.rs @@ -61,7 +61,7 @@ pub fn nock_fmt(context: &mut Context, fmt: Arguments<'_>) -> Result { pub fn flog_fmt(context: &mut Context, fmt: Arguments<'_>) -> Result<()> { let cord = nock_fmt(context, fmt)?; - context.newt.flog(&mut context.stack, cord.as_noun()); + context.slogger.flog(&mut context.stack, cord.as_noun()); Ok(()) } diff --git a/rust/ares/src/interpreter.rs b/rust/ares/src/interpreter.rs index 4e30d81..ac2e7c9 100644 --- a/rust/ares/src/interpreter.rs +++ b/rust/ares/src/interpreter.rs @@ -11,7 +11,6 @@ use crate::jets::warm::Warm; use crate::jets::JetErr; use crate::mem::NockStack; use crate::mem::Preserve; -use crate::newt::Newt; use crate::noun; use crate::noun::{Atom, Cell, IndirectAtom, Noun, Slots, D, T}; use crate::serf::TERMINATOR; @@ -21,6 +20,8 @@ use ares_macros::tas; use assert_no_alloc::{assert_no_alloc, ensure_alloc_counters}; use bitvec::prelude::{BitSlice, Lsb0}; use either::*; +use std::ops::DerefMut; +use std::pin::Pin; use std::result; use std::sync::atomic::Ordering; use std::sync::Arc; @@ -257,6 +258,35 @@ enum NockWork { Work12(Nock12), } +pub trait Slogger { + // type SlogTarget; + // DerefMut; + /** Send %slog, pretty-printed debug output. + * + * pri = debug priority + * tank = output as tank + */ + fn slog(&mut self, stack: &mut NockStack, pri: u64, tank: Noun); + + /** Send %flog, raw debug output. */ + fn flog(&mut self, stack: &mut NockStack, cord: Noun); +} + +impl Slogger for Pin<&mut T> +where + T::Target: Slogger + DerefMut + Unpin + Sized, +{ + // + Unpin + // type SlogTarget = T::Target; + fn flog(&mut self, stack: &mut NockStack, cord: Noun) { + (*self).deref_mut().flog(stack, cord); + } + + fn slog(&mut self, stack: &mut NockStack, pri: u64, tank: Noun) { + (**self).slog(stack, pri, tank); + } +} + pub struct ContextSnapshot { cold: Cold, warm: Warm, @@ -264,7 +294,7 @@ pub struct ContextSnapshot { pub struct Context { pub stack: NockStack, - pub newt: Newt, + pub slogger: Pin>, pub cold: Cold, pub warm: Warm, pub hot: Hot, @@ -1472,14 +1502,15 @@ mod hint { match tag.direct()?.data() { tas!(b"slog") => { let stack = &mut context.stack; - let newt = &mut context.newt; + let slogger = &mut context.slogger; let (_form, clue) = hint?; let slog_cell = clue.cell()?; let pri = slog_cell.head().direct()?.data(); let tank = slog_cell.tail(); - newt.slog(stack, pri, tank); + let s = (*slogger).deref_mut(); + s.slog(stack, pri, tank); } tas!(b"hand") | tas!(b"hunk") | tas!(b"lose") | tas!(b"mean") | tas!(b"spot") => { let terminator = Arc::clone(&TERMINATOR); @@ -1504,7 +1535,7 @@ mod hint { match mook(context, tone, true) { Ok(toon) => { let stack = &mut context.stack; - let newt = &mut context.newt; + let slogger = &mut context.slogger; if unsafe { !toon.head().raw_equals(D(2)) } { // +mook will only ever return a $toon with non-%2 head if that's what it was given as @@ -1520,12 +1551,12 @@ mod hint { } if let Ok(cell) = list.as_cell() { - newt.slog(stack, 0, cell.head()); + slogger.slog(stack, 0, cell.head()); list = cell.tail(); } else { let stack = &mut context.stack; let tape = tape(stack, "serf: %hela: list ends without ~"); - slog_leaf(stack, newt, tape); + slog_leaf(stack, slogger, tape); break; } } @@ -1553,7 +1584,7 @@ mod hint { res: Noun, ) -> Option { let stack = &mut context.stack; - let newt = &mut context.newt; + let slogger = &mut context.slogger; let cold = &mut context.cold; let hot = &context.hot; let cache = &mut context.cache; @@ -1605,7 +1636,7 @@ mod hint { stack, "serf: cold: register: invalid root parent axis", ); - slog_leaf(stack, newt, tape); + slog_leaf(stack, slogger, tape); Ok(false) } } else { @@ -1622,19 +1653,19 @@ mod hint { stack, "serf: cold: register: could not find parent battery at given axis", ); - slog_leaf(stack, newt, tape); + slog_leaf(stack, slogger, tape); } Err(cold::Error::BadNock) => { // XX: Need better message in slog; need better slogging tools // format!("bad clue formula: {}", clue) let tape = tape(stack, "serf: cold: register: bad clue formula"); - slog_leaf(stack, newt, tape); + slog_leaf(stack, slogger, tape); } _ => {} } } else { let tape = tape(stack, "serf: cold: register: no clue for %fast"); - slog_leaf(stack, newt, tape); + slog_leaf(stack, slogger, tape); } } } @@ -1644,9 +1675,9 @@ mod hint { None } - fn slog_leaf(stack: &mut NockStack, newt: &mut Newt, tape: Noun) { + fn slog_leaf(stack: &mut NockStack, slogger: &mut Pin>, tape: Noun) { let tank = T(stack, &[LEAF, tape]); - newt.slog(stack, 0u64, tank); + slogger.slog(stack, 0u64, tank); } } diff --git a/rust/ares/src/jets.rs b/rust/ares/src/jets.rs index f9ebe3c..46c0234 100644 --- a/rust/ares/src/jets.rs +++ b/rust/ares/src/jets.rs @@ -36,7 +36,6 @@ use crate::jets::sort::*; use crate::jets::tree::*; use crate::jets::warm::Warm; use crate::mem::{NockStack, Preserve}; -use crate::newt::Newt; use crate::noun::{self, Noun, Slots, D}; use ares_macros::tas; @@ -308,23 +307,36 @@ pub mod util { pub mod test { use super::*; use crate::hamt::Hamt; + use crate::interpreter::Slogger; use crate::mem::NockStack; use crate::noun::{Atom, Noun, D, T}; use crate::unifying_equality::unifying_equality; use assert_no_alloc::assert_no_alloc; use ibig::UBig; + struct TestSlogger {} + + impl Slogger for TestSlogger { + fn slog(&mut self, _stack: &mut NockStack, _pri: u64, _noun: Noun) { + eprintln!("Jet slogged."); + } + + fn flog(&mut self, _stack: &mut NockStack, _cord: Noun) { + eprintln!("Jet flogged."); + } + } + pub fn init_context() -> Context { let mut stack = NockStack::new(8 << 10 << 10, 0); - let newt = Newt::new_mock(); let cold = Cold::new(&mut stack); let warm = Warm::new(&mut stack); let hot = Hot::init(&mut stack, URBIT_HOT_STATE); let cache = Hamt::::new(&mut stack); + let slogger = std::boxed::Box::pin(TestSlogger {}); Context { stack, - newt, + slogger, cold, warm, hot, diff --git a/rust/ares/src/newt.rs b/rust/ares/src/newt.rs index 26934eb..fcbff25 100644 --- a/rust/ares/src/newt.rs +++ b/rust/ares/src/newt.rs @@ -1,3 +1,4 @@ +use crate::interpreter::Slogger; /** Newt: IPC to the king * * This manages an IPC connection to the king over stdin and stdout. The protocol is jammed nouns, @@ -57,6 +58,7 @@ use ares_macros::tas; use either::Either; use std::io::{Read, Write}; use std::os::unix::prelude::FromRawFd; +use std::pin::Pin; use std::ptr::copy_nonoverlapping; use std::slice::from_raw_parts_mut; @@ -149,22 +151,6 @@ impl Newt { self.write_noun(stack, live); } - /** Send %slog, pretty-printed debug output. - * - * pri = debug priority - * tank = output as tank - */ - pub fn slog(&mut self, stack: &mut NockStack, pri: u64, tank: Noun) { - let slog = T(stack, &[D(tas!(b"slog")), D(pri), tank]); - self.write_noun(stack, slog); - } - - /** Send %flog, raw debug output. */ - pub fn flog(&mut self, stack: &mut NockStack, cord: Noun) { - let flog = T(stack, &[D(tas!(b"flog")), cord]); - self.write_noun(stack, flog); - } - /** Send %peek %done, successfully scried. */ pub fn peek_done(&mut self, stack: &mut NockStack, dat: Noun) { let peek = T(stack, &[D(tas!(b"peek")), D(tas!(b"done")), dat]); @@ -232,6 +218,12 @@ impl Newt { self.write_noun(stack, work); } + pub fn slogger(&self) -> Result>, std::io::Error> { + let input = self.input.try_clone()?; + let output = self.output.try_clone()?; + Ok(std::boxed::Box::pin(NewtSlogger(Newt { input, output }))) + } + /** Send %work %bail, failed to run event. * * lud = list of goof @@ -270,8 +262,32 @@ impl Newt { } } +impl Slogger for Newt { + fn slog(&mut self, stack: &mut NockStack, pri: u64, tank: Noun) { + let slog = T(stack, &[D(tas!(b"slog")), D(pri), tank]); + self.write_noun(stack, slog); + } + + fn flog(&mut self, stack: &mut NockStack, cord: Noun) { + let flog = T(stack, &[D(tas!(b"flog")), cord]); + self.write_noun(stack, flog); + } +} + impl Default for Newt { fn default() -> Self { Self::new() } } + +struct NewtSlogger(Newt); + +impl Slogger for NewtSlogger { + fn slog(&mut self, stack: &mut NockStack, pri: u64, tank: Noun) { + self.0.slog(stack, pri, tank); + } + + fn flog(&mut self, stack: &mut NockStack, cord: Noun) { + self.0.flog(stack, cord); + } +} diff --git a/rust/ares/src/serf.rs b/rust/ares/src/serf.rs index be84067..c618f2e 100644 --- a/rust/ares/src/serf.rs +++ b/rust/ares/src/serf.rs @@ -85,6 +85,7 @@ struct Context { event_num: u64, arvo: Noun, mug: u32, + newt: Newt, nock_context: interpreter::Context, } @@ -162,10 +163,11 @@ impl Context { let hot = Hot::init(&mut stack, constant_hot_state); let warm = Warm::init(&mut stack, &mut cold, &hot); let mug = mug_u32(&mut stack, arvo); + let slogger = newt.slogger().expect("Newt should make slogger"); let nock_context = interpreter::Context { stack, - newt, + slogger, cold, warm, hot, @@ -178,6 +180,7 @@ impl Context { epoch, event_num, arvo, + newt, mug, nock_context, } @@ -223,11 +226,11 @@ impl Context { // pub fn next(&mut self) -> Option { - self.nock_context.newt.next(&mut self.nock_context.stack) + self.newt.next(&mut self.nock_context.stack) } pub fn ripe(&mut self) { - self.nock_context.newt.ripe( + self.newt.ripe( &mut self.nock_context.stack, self.event_num, self.mug as u64, @@ -235,23 +238,20 @@ impl Context { } pub fn live(&mut self) { - self.nock_context.newt.live(&mut self.nock_context.stack); + self.newt.live(&mut self.nock_context.stack); } pub fn peek_done(&mut self, dat: Noun) { - self.nock_context - .newt - .peek_done(&mut self.nock_context.stack, dat); + self.newt.peek_done(&mut self.nock_context.stack, dat); } pub fn play_done(&mut self) { - self.nock_context - .newt + self.newt .play_done(&mut self.nock_context.stack, self.mug as u64); } pub fn play_bail(&mut self, dud: Noun) { - self.nock_context.newt.play_bail( + self.newt.play_bail( &mut self.nock_context.stack, self.event_num, self.mug as u64, @@ -260,7 +260,7 @@ impl Context { } pub fn work_done(&mut self, fec: Noun) { - self.nock_context.newt.work_done( + self.newt.work_done( &mut self.nock_context.stack, self.event_num, self.mug as u64, @@ -269,7 +269,7 @@ impl Context { } pub fn work_swap(&mut self, job: Noun, fec: Noun) { - self.nock_context.newt.work_swap( + self.newt.work_swap( &mut self.nock_context.stack, self.event_num, self.mug as u64, @@ -279,9 +279,7 @@ impl Context { } pub fn work_bail(&mut self, lud: Noun) { - self.nock_context - .newt - .work_bail(&mut self.nock_context.stack, lud); + self.newt.work_bail(&mut self.nock_context.stack, lud); } } From f2f63a93443fbc6c9a82c7706dc3964a3f5f8394 Mon Sep 17 00:00:00 2001 From: Edward Amsden Date: Wed, 21 Aug 2024 11:54:33 -0500 Subject: [PATCH 12/13] add jet for +trip (#11) --- rust/ares/src/jets/hot.rs | 13 +++++++++++++ rust/ares/src/jets/parse.rs | 33 ++++++++++++++++++++++++++++++++- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/rust/ares/src/jets/hot.rs b/rust/ares/src/jets/hot.rs index 71ba179..dacb843 100644 --- a/rust/ares/src/jets/hot.rs +++ b/rust/ares/src/jets/hot.rs @@ -276,6 +276,19 @@ pub const URBIT_HOT_STATE: &[HotEntry] = &[ jet_sha1, ), // + ( + &[ + K_139, + Left(b"one"), + Left(b"two"), + Left(b"tri"), + Left(b"qua"), + Left(b"trip"), + ], + 1, + jet_trip, + ), + // ( &[ K_139, diff --git a/rust/ares/src/jets/parse.rs b/rust/ares/src/jets/parse.rs index 01b452e..9538574 100644 --- a/rust/ares/src/jets/parse.rs +++ b/rust/ares/src/jets/parse.rs @@ -1,14 +1,45 @@ /** Parsing jets */ use crate::interpreter::Context; +use crate::jets::bits::util::met; use crate::jets::math::util::{gte_b, lte_b, lth_b}; use crate::jets::util::{kick, slam, slot, BAIL_FAIL}; use crate::jets::Result; -use crate::noun::{Noun, D, T}; +use crate::noun::{Cell, Noun, D, T}; use either::{Left, Right}; crate::gdb!(); +// +// Text conversion +// +pub fn jet_trip(context: &mut Context, subject: Noun) -> Result { + let sam = slot(subject, 6)?.as_atom()?; + let chars = met(3, sam); + if chars == 0 { + return Ok(D(0)); + }; + + let bytes = &sam.as_bytes()[0..chars]; + + let mut result = D(0); + let mut dest = &mut result as *mut Noun; + + for byte in bytes { + unsafe { + let (it, it_mem) = Cell::new_raw_mut(&mut context.stack); + + // safe because a byte can't overflow a direct atom + (*it_mem).head = D((*byte) as u64); + + *dest = it.as_noun(); + dest = &mut (*it_mem).tail as *mut Noun; + } + } + unsafe { *dest = D(0) }; + Ok(result) +} + // // Tracing // From a7005c704970e89306d38d2eb8772a6407c3a792 Mon Sep 17 00:00:00 2001 From: Edward Amsden Date: Thu, 22 Aug 2024 10:11:30 -0500 Subject: [PATCH 13/13] Ares -> Sword (#12) * Update README.md * Rename ares -> sword * Workspace * Cargo-only CI --- .github/workflows/ares-feature.yml | 12 - .github/workflows/ares-once.yml | 8 - .github/workflows/ares-shared.yml | 93 -- .github/workflows/ares-status.yml | 14 - .github/workflows/build.yml | 36 + .gitignore | 1 + CONTRIBUTING.md | 4 +- rust/ares/Cargo.lock => Cargo.lock | 811 +++++++++++------- Cargo.toml | 10 + DEVELOPERS.md | 32 +- rust/ares_crypto/Cargo.lock | 783 ----------------- rust/ares_guard/Cargo.lock | 429 --------- rust/ares_macros/Cargo.lock | 46 - rust/ares_pma/Cargo.lock | 454 ---------- .../Cargo.toml | 0 .../LICENSE | 0 .../README.md | 0 .../examples/main.rs | 0 .../src/lib.rs | 0 .../tests/test.rs | 0 rust/{ibig-rs => ibig}/.gitignore | 0 rust/{ibig-rs => ibig}/CHANGELOG.md | 0 rust/{ibig-rs => ibig}/Cargo.toml | 4 +- rust/{ibig-rs => ibig}/LICENSE-APACHE | 0 rust/{ibig-rs => ibig}/LICENSE-MIT | 0 rust/{ibig-rs => ibig}/README.md | 0 rust/{ibig-rs => ibig}/benches/benchmarks.rs | 0 rust/{ibig-rs => ibig}/dev-tools/Cargo.toml | 0 .../dev-tools/src/bin/ntt_primes.rs | 0 rust/{ibig-rs => ibig}/examples/factorial.rs | 0 rust/{ibig-rs => ibig}/generate_coverage.sh | 0 rust/{ibig-rs => ibig}/src/add.rs | 0 rust/{ibig-rs => ibig}/src/add_ops.rs | 0 .../{ibig-rs => ibig}/src/arch/generic/add.rs | 0 .../src/arch/generic/digits.rs | 0 .../src/arch/generic_16_bit/mod.rs | 0 .../src/arch/generic_16_bit/ntt.rs | 0 .../src/arch/generic_16_bit/word.rs | 0 .../src/arch/generic_32_bit/mod.rs | 0 .../src/arch/generic_32_bit/ntt.rs | 0 .../src/arch/generic_32_bit/word.rs | 0 .../src/arch/generic_64_bit/mod.rs | 0 .../src/arch/generic_64_bit/ntt.rs | 0 .../src/arch/generic_64_bit/word.rs | 0 rust/{ibig-rs => ibig}/src/arch/mod.rs | 0 rust/{ibig-rs => ibig}/src/arch/x86/add.rs | 0 rust/{ibig-rs => ibig}/src/arch/x86/mod.rs | 0 rust/{ibig-rs => ibig}/src/arch/x86_64/add.rs | 0 rust/{ibig-rs => ibig}/src/arch/x86_64/mod.rs | 0 rust/{ibig-rs => ibig}/src/assert.rs | 0 rust/{ibig-rs => ibig}/src/bits.rs | 0 rust/{ibig-rs => ibig}/src/buffer.rs | 0 rust/{ibig-rs => ibig}/src/cmp.rs | 0 rust/{ibig-rs => ibig}/src/convert.rs | 0 .../src/div/divide_conquer.rs | 0 rust/{ibig-rs => ibig}/src/div/mod.rs | 0 rust/{ibig-rs => ibig}/src/div/simple.rs | 0 rust/{ibig-rs => ibig}/src/div_ops.rs | 0 rust/{ibig-rs => ibig}/src/error.rs | 0 rust/{ibig-rs => ibig}/src/fast_divide.rs | 0 .../{ibig-rs => ibig}/src/fmt/digit_writer.rs | 0 rust/{ibig-rs => ibig}/src/fmt/mod.rs | 0 .../src/fmt/non_power_two.rs | 0 rust/{ibig-rs => ibig}/src/fmt/power_two.rs | 0 rust/{ibig-rs => ibig}/src/gcd.rs | 0 rust/{ibig-rs => ibig}/src/helper_macros.rs | 0 rust/{ibig-rs => ibig}/src/ibig.rs | 0 rust/{ibig-rs => ibig}/src/lib.rs | 0 rust/{ibig-rs => ibig}/src/macros.rs | 0 rust/{ibig-rs => ibig}/src/math.rs | 0 rust/{ibig-rs => ibig}/src/memory.rs | 0 rust/{ibig-rs => ibig}/src/modular/add.rs | 0 rust/{ibig-rs => ibig}/src/modular/cmp.rs | 0 rust/{ibig-rs => ibig}/src/modular/convert.rs | 0 rust/{ibig-rs => ibig}/src/modular/div.rs | 0 rust/{ibig-rs => ibig}/src/modular/fmt.rs | 0 rust/{ibig-rs => ibig}/src/modular/mod.rs | 0 rust/{ibig-rs => ibig}/src/modular/modulo.rs | 0 .../src/modular/modulo_ring.rs | 0 rust/{ibig-rs => ibig}/src/modular/mul.rs | 0 rust/{ibig-rs => ibig}/src/modular/pow.rs | 0 rust/{ibig-rs => ibig}/src/mul/helpers.rs | 0 rust/{ibig-rs => ibig}/src/mul/karatsuba.rs | 0 rust/{ibig-rs => ibig}/src/mul/mod.rs | 0 rust/{ibig-rs => ibig}/src/mul/ntt.rs | 0 rust/{ibig-rs => ibig}/src/mul/simple.rs | 0 rust/{ibig-rs => ibig}/src/mul/toom_3.rs | 0 rust/{ibig-rs => ibig}/src/mul_ops.rs | 0 rust/{ibig-rs => ibig}/src/num_traits.rs | 0 rust/{ibig-rs => ibig}/src/ops.rs | 0 rust/{ibig-rs => ibig}/src/parse/mod.rs | 0 .../src/parse/non_power_two.rs | 0 rust/{ibig-rs => ibig}/src/parse/power_two.rs | 0 rust/{ibig-rs => ibig}/src/pow.rs | 0 rust/{ibig-rs => ibig}/src/primitive.rs | 0 rust/{ibig-rs => ibig}/src/radix.rs | 0 rust/{ibig-rs => ibig}/src/rand.rs | 0 rust/{ibig-rs => ibig}/src/serde.rs | 0 rust/{ibig-rs => ibig}/src/shift.rs | 0 rust/{ibig-rs => ibig}/src/shift_ops.rs | 0 rust/{ibig-rs => ibig}/src/sign.rs | 0 rust/{ibig-rs => ibig}/src/ubig.rs | 0 rust/{ibig-rs => ibig}/tests/add.rs | 0 rust/{ibig-rs => ibig}/tests/bits.rs | 0 rust/{ibig-rs => ibig}/tests/cmp.rs | 0 rust/{ibig-rs => ibig}/tests/convert.rs | 0 rust/{ibig-rs => ibig}/tests/div.rs | 0 rust/{ibig-rs => ibig}/tests/gcd.rs | 0 rust/{ibig-rs => ibig}/tests/hash.rs | 0 rust/{ibig-rs => ibig}/tests/modular.rs | 0 rust/{ibig-rs => ibig}/tests/mul.rs | 0 rust/{ibig-rs => ibig}/tests/pow.rs | 0 rust/{ibig-rs => ibig}/tests/radix.rs | 0 rust/{ibig-rs => ibig}/tests/random.rs | 0 rust/{ibig-rs => ibig}/tests/serde.rs | 0 rust/{ibig-rs => ibig}/tests/shift.rs | 0 rust/{ibig-rs => ibig}/tests/sign.rs | 0 rust/{ares => sword}/Cargo.toml | 23 +- rust/{ares => sword}/benches/cue_pill.rs | 6 +- rust/{ares => sword}/src/flog.rs | 0 rust/{ares => sword}/src/guard.rs | 2 +- rust/{ares => sword}/src/hamt.rs | 0 rust/{ares => sword}/src/interpreter.rs | 4 +- rust/{ares => sword}/src/jets.rs | 2 +- rust/{ares => sword}/src/jets/bits.rs | 0 rust/{ares => sword}/src/jets/cold.rs | 0 rust/{ares => sword}/src/jets/form.rs | 4 +- rust/{ares => sword}/src/jets/hash.rs | 0 rust/{ares => sword}/src/jets/hot.rs | 4 +- rust/{ares => sword}/src/jets/list.rs | 0 rust/{ares => sword}/src/jets/lock.rs | 0 rust/{ares => sword}/src/jets/lock/aes.rs | 4 +- rust/{ares => sword}/src/jets/lock/ed.rs | 2 +- rust/{ares => sword}/src/jets/lock/sha.rs | 2 +- rust/{ares => sword}/src/jets/lute.rs | 2 +- rust/{ares => sword}/src/jets/math.rs | 0 rust/{ares => sword}/src/jets/nock.rs | 4 +- rust/{ares => sword}/src/jets/parse.rs | 0 rust/{ares => sword}/src/jets/serial.rs | 0 rust/{ares => sword}/src/jets/sort.rs | 0 rust/{ares => sword}/src/jets/tree.rs | 0 rust/{ares => sword}/src/jets/warm.rs | 0 rust/{ares => sword}/src/lib.rs | 2 +- rust/{ares => sword}/src/main.rs | 30 +- rust/{ares => sword}/src/mem.rs | 0 rust/{ares => sword}/src/mug.rs | 0 rust/{ares => sword}/src/newt.rs | 2 +- rust/{ares => sword}/src/noun.rs | 2 +- rust/{ares => sword}/src/persist.rs | 2 +- rust/{ares => sword}/src/serf.rs | 2 +- rust/{ares => sword}/src/serialization.rs | 0 rust/{ares => sword}/src/trace.rs | 2 +- rust/{ares => sword}/src/unifying_equality.rs | 0 rust/{ares => sword}/updates/9-20-2023.md | 0 rust/{ares_crypto => sword_crypto}/Cargo.toml | 8 +- .../src/aes_siv.rs | 4 +- .../src/ed25519.rs | 4 +- rust/{ares_crypto => sword_crypto}/src/lib.rs | 0 rust/{ares_crypto => sword_crypto}/src/sha.rs | 4 +- rust/{ares_guard => sword_guard}/Cargo.toml | 2 +- rust/{ares_guard => sword_guard}/build.rs | 0 .../{ares_guard => sword_guard}/c-src/guard.c | 0 .../{ares_guard => sword_guard}/c-src/guard.h | 0 .../c-src/wrapper.h | 0 rust/{ares_guard => sword_guard}/src/lib.rs | 0 rust/{ares_macros => sword_macros}/Cargo.toml | 2 +- rust/{ares_macros => sword_macros}/src/lib.rs | 0 rust/{ares_pma => sword_pma}/Cargo.toml | 2 +- rust/{ares_pma => sword_pma}/build.rs | 0 .../c-src/btest-overrides.h | 0 rust/{ares_pma => sword_pma}/c-src/btest.c | 0 rust/{ares_pma => sword_pma}/c-src/btree.c | 2 +- rust/{ares_pma => sword_pma}/c-src/btree.h | 0 .../c-src/lib/checksum.c | 0 .../c-src/lib/checksum.h | 0 rust/{ares_pma => sword_pma}/c-src/wrapper.h | 0 rust/{ares_pma => sword_pma}/src/lib.rs | 0 177 files changed, 621 insertions(+), 2245 deletions(-) delete mode 100644 .github/workflows/ares-feature.yml delete mode 100644 .github/workflows/ares-once.yml delete mode 100644 .github/workflows/ares-shared.yml delete mode 100644 .github/workflows/ares-status.yml create mode 100644 .github/workflows/build.yml rename rust/ares/Cargo.lock => Cargo.lock (68%) create mode 100644 Cargo.toml delete mode 100644 rust/ares_crypto/Cargo.lock delete mode 100644 rust/ares_guard/Cargo.lock delete mode 100644 rust/ares_macros/Cargo.lock delete mode 100644 rust/ares_pma/Cargo.lock rename rust/{rust-assert-no-alloc => assert_no_alloc}/Cargo.toml (100%) rename rust/{rust-assert-no-alloc => assert_no_alloc}/LICENSE (100%) rename rust/{rust-assert-no-alloc => assert_no_alloc}/README.md (100%) rename rust/{rust-assert-no-alloc => assert_no_alloc}/examples/main.rs (100%) rename rust/{rust-assert-no-alloc => assert_no_alloc}/src/lib.rs (100%) rename rust/{rust-assert-no-alloc => assert_no_alloc}/tests/test.rs (100%) rename rust/{ibig-rs => ibig}/.gitignore (100%) rename rust/{ibig-rs => ibig}/CHANGELOG.md (100%) rename rust/{ibig-rs => ibig}/Cargo.toml (92%) rename rust/{ibig-rs => ibig}/LICENSE-APACHE (100%) rename rust/{ibig-rs => ibig}/LICENSE-MIT (100%) rename rust/{ibig-rs => ibig}/README.md (100%) rename rust/{ibig-rs => ibig}/benches/benchmarks.rs (100%) rename rust/{ibig-rs => ibig}/dev-tools/Cargo.toml (100%) rename rust/{ibig-rs => ibig}/dev-tools/src/bin/ntt_primes.rs (100%) rename rust/{ibig-rs => ibig}/examples/factorial.rs (100%) rename rust/{ibig-rs => ibig}/generate_coverage.sh (100%) rename rust/{ibig-rs => ibig}/src/add.rs (100%) rename rust/{ibig-rs => ibig}/src/add_ops.rs (100%) rename rust/{ibig-rs => ibig}/src/arch/generic/add.rs (100%) rename rust/{ibig-rs => ibig}/src/arch/generic/digits.rs (100%) rename rust/{ibig-rs => ibig}/src/arch/generic_16_bit/mod.rs (100%) rename rust/{ibig-rs => ibig}/src/arch/generic_16_bit/ntt.rs (100%) rename rust/{ibig-rs => ibig}/src/arch/generic_16_bit/word.rs (100%) rename rust/{ibig-rs => ibig}/src/arch/generic_32_bit/mod.rs (100%) rename rust/{ibig-rs => ibig}/src/arch/generic_32_bit/ntt.rs (100%) rename rust/{ibig-rs => ibig}/src/arch/generic_32_bit/word.rs (100%) rename rust/{ibig-rs => ibig}/src/arch/generic_64_bit/mod.rs (100%) rename rust/{ibig-rs => ibig}/src/arch/generic_64_bit/ntt.rs (100%) rename rust/{ibig-rs => ibig}/src/arch/generic_64_bit/word.rs (100%) rename rust/{ibig-rs => ibig}/src/arch/mod.rs (100%) rename rust/{ibig-rs => ibig}/src/arch/x86/add.rs (100%) rename rust/{ibig-rs => ibig}/src/arch/x86/mod.rs (100%) rename rust/{ibig-rs => ibig}/src/arch/x86_64/add.rs (100%) rename rust/{ibig-rs => ibig}/src/arch/x86_64/mod.rs (100%) rename rust/{ibig-rs => ibig}/src/assert.rs (100%) rename rust/{ibig-rs => ibig}/src/bits.rs (100%) rename rust/{ibig-rs => ibig}/src/buffer.rs (100%) rename rust/{ibig-rs => ibig}/src/cmp.rs (100%) rename rust/{ibig-rs => ibig}/src/convert.rs (100%) rename rust/{ibig-rs => ibig}/src/div/divide_conquer.rs (100%) rename rust/{ibig-rs => ibig}/src/div/mod.rs (100%) rename rust/{ibig-rs => ibig}/src/div/simple.rs (100%) rename rust/{ibig-rs => ibig}/src/div_ops.rs (100%) rename rust/{ibig-rs => ibig}/src/error.rs (100%) rename rust/{ibig-rs => ibig}/src/fast_divide.rs (100%) rename rust/{ibig-rs => ibig}/src/fmt/digit_writer.rs (100%) rename rust/{ibig-rs => ibig}/src/fmt/mod.rs (100%) rename rust/{ibig-rs => ibig}/src/fmt/non_power_two.rs (100%) rename rust/{ibig-rs => ibig}/src/fmt/power_two.rs (100%) rename rust/{ibig-rs => ibig}/src/gcd.rs (100%) rename rust/{ibig-rs => ibig}/src/helper_macros.rs (100%) rename rust/{ibig-rs => ibig}/src/ibig.rs (100%) rename rust/{ibig-rs => ibig}/src/lib.rs (100%) rename rust/{ibig-rs => ibig}/src/macros.rs (100%) rename rust/{ibig-rs => ibig}/src/math.rs (100%) rename rust/{ibig-rs => ibig}/src/memory.rs (100%) rename rust/{ibig-rs => ibig}/src/modular/add.rs (100%) rename rust/{ibig-rs => ibig}/src/modular/cmp.rs (100%) rename rust/{ibig-rs => ibig}/src/modular/convert.rs (100%) rename rust/{ibig-rs => ibig}/src/modular/div.rs (100%) rename rust/{ibig-rs => ibig}/src/modular/fmt.rs (100%) rename rust/{ibig-rs => ibig}/src/modular/mod.rs (100%) rename rust/{ibig-rs => ibig}/src/modular/modulo.rs (100%) rename rust/{ibig-rs => ibig}/src/modular/modulo_ring.rs (100%) rename rust/{ibig-rs => ibig}/src/modular/mul.rs (100%) rename rust/{ibig-rs => ibig}/src/modular/pow.rs (100%) rename rust/{ibig-rs => ibig}/src/mul/helpers.rs (100%) rename rust/{ibig-rs => ibig}/src/mul/karatsuba.rs (100%) rename rust/{ibig-rs => ibig}/src/mul/mod.rs (100%) rename rust/{ibig-rs => ibig}/src/mul/ntt.rs (100%) rename rust/{ibig-rs => ibig}/src/mul/simple.rs (100%) rename rust/{ibig-rs => ibig}/src/mul/toom_3.rs (100%) rename rust/{ibig-rs => ibig}/src/mul_ops.rs (100%) rename rust/{ibig-rs => ibig}/src/num_traits.rs (100%) rename rust/{ibig-rs => ibig}/src/ops.rs (100%) rename rust/{ibig-rs => ibig}/src/parse/mod.rs (100%) rename rust/{ibig-rs => ibig}/src/parse/non_power_two.rs (100%) rename rust/{ibig-rs => ibig}/src/parse/power_two.rs (100%) rename rust/{ibig-rs => ibig}/src/pow.rs (100%) rename rust/{ibig-rs => ibig}/src/primitive.rs (100%) rename rust/{ibig-rs => ibig}/src/radix.rs (100%) rename rust/{ibig-rs => ibig}/src/rand.rs (100%) rename rust/{ibig-rs => ibig}/src/serde.rs (100%) rename rust/{ibig-rs => ibig}/src/shift.rs (100%) rename rust/{ibig-rs => ibig}/src/shift_ops.rs (100%) rename rust/{ibig-rs => ibig}/src/sign.rs (100%) rename rust/{ibig-rs => ibig}/src/ubig.rs (100%) rename rust/{ibig-rs => ibig}/tests/add.rs (100%) rename rust/{ibig-rs => ibig}/tests/bits.rs (100%) rename rust/{ibig-rs => ibig}/tests/cmp.rs (100%) rename rust/{ibig-rs => ibig}/tests/convert.rs (100%) rename rust/{ibig-rs => ibig}/tests/div.rs (100%) rename rust/{ibig-rs => ibig}/tests/gcd.rs (100%) rename rust/{ibig-rs => ibig}/tests/hash.rs (100%) rename rust/{ibig-rs => ibig}/tests/modular.rs (100%) rename rust/{ibig-rs => ibig}/tests/mul.rs (100%) rename rust/{ibig-rs => ibig}/tests/pow.rs (100%) rename rust/{ibig-rs => ibig}/tests/radix.rs (100%) rename rust/{ibig-rs => ibig}/tests/random.rs (100%) rename rust/{ibig-rs => ibig}/tests/serde.rs (100%) rename rust/{ibig-rs => ibig}/tests/shift.rs (100%) rename rust/{ibig-rs => ibig}/tests/sign.rs (100%) rename rust/{ares => sword}/Cargo.toml (61%) rename rust/{ares => sword}/benches/cue_pill.rs (94%) rename rust/{ares => sword}/src/flog.rs (100%) rename rust/{ares => sword}/src/guard.rs (99%) rename rust/{ares => sword}/src/hamt.rs (100%) rename rust/{ares => sword}/src/interpreter.rs (99%) rename rust/{ares => sword}/src/jets.rs (99%) rename rust/{ares => sword}/src/jets/bits.rs (100%) rename rust/{ares => sword}/src/jets/cold.rs (100%) rename rust/{ares => sword}/src/jets/form.rs (98%) rename rust/{ares => sword}/src/jets/hash.rs (100%) rename rust/{ares => sword}/src/jets/hot.rs (99%) rename rust/{ares => sword}/src/jets/list.rs (100%) rename rust/{ares => sword}/src/jets/lock.rs (100%) rename rust/{ares => sword}/src/jets/lock/aes.rs (99%) rename rust/{ares => sword}/src/jets/lock/ed.rs (99%) rename rust/{ares => sword}/src/jets/lock/sha.rs (99%) rename rust/{ares => sword}/src/jets/lute.rs (99%) rename rust/{ares => sword}/src/jets/math.rs (100%) rename rust/{ares => sword}/src/jets/nock.rs (99%) rename rust/{ares => sword}/src/jets/parse.rs (100%) rename rust/{ares => sword}/src/jets/serial.rs (100%) rename rust/{ares => sword}/src/jets/sort.rs (100%) rename rust/{ares => sword}/src/jets/tree.rs (100%) rename rust/{ares => sword}/src/jets/warm.rs (100%) rename rust/{ares => sword}/src/lib.rs (98%) rename rust/{ares => sword}/src/main.rs (53%) rename rust/{ares => sword}/src/mem.rs (100%) rename rust/{ares => sword}/src/mug.rs (100%) rename rust/{ares => sword}/src/newt.rs (99%) rename rust/{ares => sword}/src/noun.rs (99%) rename rust/{ares => sword}/src/persist.rs (99%) rename rust/{ares => sword}/src/serf.rs (99%) rename rust/{ares => sword}/src/serialization.rs (100%) rename rust/{ares => sword}/src/trace.rs (99%) rename rust/{ares => sword}/src/unifying_equality.rs (100%) rename rust/{ares => sword}/updates/9-20-2023.md (100%) rename rust/{ares_crypto => sword_crypto}/Cargo.toml (83%) rename rust/{ares_crypto => sword_crypto}/src/aes_siv.rs (98%) rename rust/{ares_crypto => sword_crypto}/src/ed25519.rs (98%) rename rust/{ares_crypto => sword_crypto}/src/lib.rs (100%) rename rust/{ares_crypto => sword_crypto}/src/sha.rs (96%) rename rust/{ares_guard => sword_guard}/Cargo.toml (91%) rename rust/{ares_guard => sword_guard}/build.rs (100%) rename rust/{ares_guard => sword_guard}/c-src/guard.c (100%) rename rust/{ares_guard => sword_guard}/c-src/guard.h (100%) rename rust/{ares_guard => sword_guard}/c-src/wrapper.h (100%) rename rust/{ares_guard => sword_guard}/src/lib.rs (100%) rename rust/{ares_macros => sword_macros}/Cargo.toml (83%) rename rust/{ares_macros => sword_macros}/src/lib.rs (100%) rename rust/{ares_pma => sword_pma}/Cargo.toml (92%) rename rust/{ares_pma => sword_pma}/build.rs (100%) rename rust/{ares_pma => sword_pma}/c-src/btest-overrides.h (100%) rename rust/{ares_pma => sword_pma}/c-src/btest.c (100%) rename rust/{ares_pma => sword_pma}/c-src/btree.c (99%) rename rust/{ares_pma => sword_pma}/c-src/btree.h (100%) rename rust/{ares_pma => sword_pma}/c-src/lib/checksum.c (100%) rename rust/{ares_pma => sword_pma}/c-src/lib/checksum.h (100%) rename rust/{ares_pma => sword_pma}/c-src/wrapper.h (100%) rename rust/{ares_pma => sword_pma}/src/lib.rs (100%) diff --git a/.github/workflows/ares-feature.yml b/.github/workflows/ares-feature.yml deleted file mode 100644 index f9facd2..0000000 --- a/.github/workflows/ares-feature.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: 'Ares: Pull request' - -on: - pull_request: - paths: - - '.github/workflows/ares-feature.yml' - - '.github/workflows/ares-shared.yml' - - 'rust/**' - -jobs: - urbit: - uses: ./.github/workflows/ares-shared.yml diff --git a/.github/workflows/ares-once.yml b/.github/workflows/ares-once.yml deleted file mode 100644 index eb64018..0000000 --- a/.github/workflows/ares-once.yml +++ /dev/null @@ -1,8 +0,0 @@ -name: 'Ares: On Demand' - -on: - workflow_dispatch - -jobs: - urbit: - uses: ./.github/workflows/ares-shared.yml diff --git a/.github/workflows/ares-shared.yml b/.github/workflows/ares-shared.yml deleted file mode 100644 index 244017e..0000000 --- a/.github/workflows/ares-shared.yml +++ /dev/null @@ -1,93 +0,0 @@ -on: - workflow_call: - -env: - CARGO_TERM_COLOR: always - ACTIONS_ALLOW_UNSECURE_COMMANDS: "true" - -defaults: - run: - working-directory: rust/ares - -jobs: - build: - runs-on: 'ubuntu-latest' - steps: - - uses: actions/checkout@v3 - - # Determine proper nix platform attribute for runner - - name: Determine Nix platform - id: set-nix-platform - working-directory: . - run: - .github/scripts/arch/get-runner-arch ${{ runner.arch }} ${{ runner.os }} > $GITHUB_OUTPUT - - # Install nix, required by nix-shell-action - - uses: cachix/install-nix-action@v23 - name: Install Nix - with: - extra_nix_config: "extra-experimental-features = nix-command flakes" - - - name: Set cache key for dev env - id: set-cache-key - run: | - echo "Determining devshell path for platform ${{ steps.set-nix-platform.outputs.nix-arch }}" - echo "nix-devshell-path=$(nix eval --raw ".#devShells.${{ steps.set-nix-platform.outputs.nix-arch }}.default.outPath")" >> $GITHUB_OUTPUT - - - name: Cache nix build artifacts - id: nix-cache - uses: actions/cache@v3 - with: - path: | - nix-devshell.nixstore - key: nix-${{ steps.set-cache-key.outputs.nix-devshell-path }} - - - name: Restore cached nix artifacts - if: steps.nix-cache.outputs.cache-hit == 'true' - working-directory: . - run: | - pwd - ls - nix-store --import < nix-devshell.nixstore - - - name: Cache rust build artifacts - id: cache_rust - uses: Swatinem/rust-cache@v2 - with: - key: rust-${{ steps.set-cache-key.outputs.nix-devshell-path }} - workspaces: "rust/ares -> target" - - # Check formatting - - name: Format - run: | - nix develop --command bash -c "cargo fmt --check" - - # See clippy linter docs: https://github.com/rust-lang/rust-clippy - # - # First linter is set to fail for all warnings, then ignored warnings are - # explicitly listed - # - # XX TODO make a script with all the flags for the linter - - name: Lint - run: | - nix develop --command bash -c "cargo clippy --all-targets --no-deps -- -D warnings -A clippy::missing_safety_doc" - - # Build Ares - - name: Build - run: | - nix develop --command bash -c "cargo build --release --verbose" - - # Run tests - - name: Test - run: | - nix develop --command bash -c "cargo test --verbose -- --test-threads=1" - - - name: Build nix cache export - if: steps.nix-cache.outputs.cache-hit != 'true' - run: | - pwd - nix eval --json ".#devShells.${{ steps.set-nix-platform.outputs.nix-arch }}.default.buildInputs" 2>/dev/null - nix eval --json ".#devShells.${{ steps.set-nix-platform.outputs.nix-arch }}.default.buildInputs" 2>/dev/null | jq -r '.[]' | xargs nix-store --query --requisites - nix-store --export $(nix eval --json ".#devShells.${{ steps.set-nix-platform.outputs.nix-arch }}.default.buildInputs" 2>/dev/null | jq -r '.[]' | xargs nix-store --query --requisites) > ../../nix-devshell.nixstore - ls -lh - diff --git a/.github/workflows/ares-status.yml b/.github/workflows/ares-status.yml deleted file mode 100644 index 3523954..0000000 --- a/.github/workflows/ares-status.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: 'Ares: Push to status' - -on: - push: - branches: - - status - paths: - - '.github/workflows/ares-shared.yml' - - '.github/workflows/ares-status.yml' - - 'rust/**' - -jobs: - urbit: - uses: ./.github/workflows/ares-shared.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..8b6725b --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,36 @@ +name: Build + +env: + CARGO_TERM_COLOR: always + CARGO_INCREMENTAL: 0 + CARGO_NET_RETRY: 10 + CARGO_NET_GIT_FETCH_WITH_CLI: true + CI: 1 + RUST_BACKTRACE: short + RUSTFLAGS: "-D warnings -W rust-2021-compatibility" + RUSTUP_MAX_RETRIES: 10 + +on: + pull_request: + branches: [ "master" ] + push: + branches: [ "master" ] + +jobs: + build: + name: "Build Sword" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: zorp-corp/rust-cache@v2 + with: + workspaces: ". -> target" + # Test building and running are split for caching and build time tracking purposes + # XX need to fix all the tests + #- name: Build tests + # run: cargo test --no-run + #- name: Run tests + # run: cargo test + - name: Build + run: cargo build + diff --git a/.gitignore b/.gitignore index e90d778..68c5598 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ urbit *.jam.out *.o *.a +target/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 557d7ce..3d3aa7d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ -# Contributing to Ares +# Contributing to Sword -Below are guidelines for contributions to Ares. For information on building and hacking on ares, see [DEVELOPERS.md](DEVELOPERS.md). +Below are guidelines for contributions to Sword. For information on building and hacking on Sword, see [DEVELOPERS.md](DEVELOPERS.md). ## Style Hoon should generally follow the [Hoon Style Guide](https://docs.urbit.org/language/hoon/guides/style). diff --git a/rust/ares/Cargo.lock b/Cargo.lock similarity index 68% rename from rust/ares/Cargo.lock rename to Cargo.lock index bbe15cc..bcb215c 100644 --- a/rust/ares/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,19 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +[[package]] +name = "addr2line" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aead" @@ -14,9 +27,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", "cipher", @@ -41,9 +54,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] @@ -54,75 +67,13 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" -[[package]] -name = "ares" -version = "0.1.0" -dependencies = [ - "ares_crypto", - "ares_guard", - "ares_macros", - "ares_pma", - "assert_no_alloc", - "autotools", - "bitvec", - "cc", - "criterion", - "either", - "ibig 0.3.6", - "intmap", - "json", - "lazy_static", - "libc", - "memmap", - "murmur3", - "num-derive", - "num-traits", - "signal-hook", - "static_assertions", -] - -[[package]] -name = "ares_crypto" -version = "0.1.0" -dependencies = [ - "aes", - "aes-siv", - "assert_no_alloc", - "curve25519-dalek", - "ed25519-dalek", - "ibig 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "sha1", - "sha2", - "x25519-dalek", -] - -[[package]] -name = "ares_guard" -version = "0.1.0" -dependencies = [ - "bindgen", - "cc", -] - -[[package]] -name = "ares_macros" -version = "0.1.0" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ares_pma" -version = "0.1.0" -dependencies = [ - "bindgen", - "cc", -] - [[package]] name = "assert_no_alloc" version = "1.1.2" +dependencies = [ + "backtrace", + "log", +] [[package]] name = "atty" @@ -137,39 +88,54 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "autotools" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aef8da1805e028a172334c3b680f93e71126f2327622faef2ec3d893c0a4ad77" +checksum = "ef941527c41b0fc0dd48511a8154cd5fc7e29200a0ff8b7203c5d777dbc795cf" dependencies = [ "cc", ] [[package]] -name = "bindgen" -version = "0.69.2" +name = "backtrace" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c69fae65a523209d34240b60abe0c42d33d1045d445c0839d8a4894a736e2d" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ - "bitflags 2.4.2", + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "bindgen" +version = "0.69.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +dependencies = [ + "bitflags 2.6.0", "cexpr", "clang-sys", + "itertools 0.12.1", "lazy_static", "lazycell", "log", - "peeking_take_while", "prettyplease", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn 2.0.48", + "syn 2.0.75", "which", ] @@ -181,9 +147,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "bitvec" @@ -208,9 +174,15 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "cast" @@ -263,7 +235,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" dependencies = [ "ciborium-io", - "half", + "half 2.4.1", ] [[package]] @@ -278,15 +250,26 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", "libc", "libloading", ] +[[package]] +name = "clap" +version = "2.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +dependencies = [ + "bitflags 1.3.2", + "textwrap 0.11.0", + "unicode-width", +] + [[package]] name = "clap" version = "3.2.25" @@ -296,7 +279,7 @@ dependencies = [ "bitflags 1.3.2", "clap_lex", "indexmap", - "textwrap", + "textwrap 0.16.1", ] [[package]] @@ -321,13 +304,39 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] +[[package]] +name = "criterion" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b01d6de93b2b6c65e17c634a26653a29d107b3c98c607c765bf38d041531cd8f" +dependencies = [ + "atty", + "cast", + "clap 2.34.0", + "criterion-plot 0.4.5", + "csv", + "itertools 0.10.5", + "lazy_static", + "num-traits", + "oorandom", + "plotters", + "rayon", + "regex", + "serde", + "serde_cbor", + "serde_derive", + "serde_json", + "tinytemplate", + "walkdir", +] + [[package]] name = "criterion" version = "0.4.0" @@ -338,9 +347,9 @@ dependencies = [ "atty", "cast", "ciborium", - "clap", - "criterion-plot", - "itertools", + "clap 3.2.25", + "criterion-plot 0.5.0", + "itertools 0.10.5", "lazy_static", "num-traits", "oorandom", @@ -354,6 +363,16 @@ dependencies = [ "walkdir", ] +[[package]] +name = "criterion-plot" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2673cc8207403546f45f5fd319a974b1e6983ad1a3ee7e6041650013be041876" +dependencies = [ + "cast", + "itertools 0.10.5", +] + [[package]] name = "criterion-plot" version = "0.5.0" @@ -361,7 +380,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" dependencies = [ "cast", - "itertools", + "itertools 0.10.5", ] [[package]] @@ -385,9 +404,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -406,6 +425,27 @@ dependencies = [ "typenum", ] +[[package]] +name = "csv" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" +dependencies = [ + "csv-core", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "csv-core" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" +dependencies = [ + "memchr", +] + [[package]] name = "ctr" version = "0.9.2" @@ -417,16 +457,15 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.1.1" +version = "4.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" dependencies = [ "cfg-if", "cpufeatures", "curve25519-dalek-derive", "digest", "fiat-crypto", - "platforms", "rustc_version", "subtle", ] @@ -439,7 +478,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.75", ] [[package]] @@ -473,9 +512,9 @@ dependencies = [ [[package]] name = "ed25519-dalek" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" dependencies = [ "curve25519-dalek", "ed25519", @@ -485,15 +524,15 @@ dependencies = [ [[package]] name = "either" -version = "1.9.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -501,9 +540,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.2.5" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" [[package]] name = "funty" @@ -521,6 +560,23 @@ dependencies = [ "version_check", ] +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "gimli" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" + [[package]] name = "glob" version = "0.3.1" @@ -529,9 +585,15 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "half" -version = "2.3.1" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc52e53916c08643f1b56ec082790d1e86a32e58dc5268f897f313fbae7b4872" +checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" + +[[package]] +name = "half" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" dependencies = [ "cfg-if", "crunchy", @@ -566,20 +628,11 @@ name = "ibig" version = "0.3.6" dependencies = [ "cfg-if", + "criterion 0.3.6", "num-traits", "rand", - "static_assertions", -] - -[[package]] -name = "ibig" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1fcc7f316b2c079dde77564a1360639c1a956a23fa96122732e416cb10717bb" -dependencies = [ - "cfg-if", - "num-traits", - "rand", + "serde", + "serde_test", "static_assertions", ] @@ -618,16 +671,25 @@ dependencies = [ ] [[package]] -name = "itoa" -version = "1.0.10" +name = "itertools" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.68" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -640,9 +702,9 @@ checksum = "078e285eafdfb6c4b434e0d31e8cfcb5115b651496faca5749b88fafd4f23bfd" [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "lazycell" @@ -652,37 +714,37 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.152" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libloading" -version = "0.8.1" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" +checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-sys 0.48.0", + "windows-targets", ] [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "log" -version = "0.4.20" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memmap" @@ -700,6 +762,15 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" +[[package]] +name = "miniz_oxide" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +dependencies = [ + "adler", +] + [[package]] name = "murmur3" version = "0.5.2" @@ -728,13 +799,22 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] +[[package]] +name = "object" +version = "0.36.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" +dependencies = [ + "memchr", +] + [[package]] name = "once_cell" version = "1.19.0" @@ -743,9 +823,9 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "oorandom" -version = "11.1.3" +version = "11.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" +checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" [[package]] name = "os_str_bytes" @@ -753,23 +833,11 @@ version = "6.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - -[[package]] -name = "platforms" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" - [[package]] name = "plotters" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" +checksum = "a15b6eccb8484002195a3e44fe65a4ce8e93a625797a063735536fd59cb01cf3" dependencies = [ "num-traits", "plotters-backend", @@ -780,43 +848,52 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" +checksum = "414cec62c6634ae900ea1c56128dfe87cf63e7caece0852ec76aba307cebadb7" [[package]] name = "plotters-svg" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" +checksum = "81b30686a7d9c3e010b84284bdd26a29f2138574f52f5eb6f794fc0ad924e705" dependencies = [ "plotters-backend", ] [[package]] -name = "prettyplease" -version = "0.2.16" +name = "ppv-lite86" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "prettyplease" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.48", + "syn 2.0.75", ] [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -833,6 +910,18 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", "rand_core", ] @@ -841,12 +930,15 @@ name = "rand_core" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] [[package]] name = "rayon" -version = "1.8.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -864,9 +956,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.3" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -876,9 +968,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.4" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b7fa1134405e2ec9353fd416b17f8dacd46c473d7d3fd1cf202706a14eb792a" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", @@ -887,9 +979,15 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" + +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" @@ -908,11 +1006,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.30" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", @@ -921,9 +1019,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -936,41 +1034,61 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.21" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.196" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2" dependencies = [ "serde_derive", ] [[package]] -name = "serde_derive" -version = "1.0.196" +name = "serde_cbor" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" +dependencies = [ + "half 1.8.3", + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.208" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.75", ] [[package]] name = "serde_json" -version = "1.0.113" +version = "1.0.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" +checksum = "83c8e735a073ccf5be70aa8066aa984eaf2fa000db6c8d0100ae605b366d31ed" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] +[[package]] +name = "serde_test" +version = "1.0.177" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f901ee573cab6b3060453d2d5f0bae4e6d628c23c0a962ff9b5f1d7c8d4f1ed" +dependencies = [ + "serde", +] + [[package]] name = "sha1" version = "0.10.6" @@ -1011,9 +1129,9 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ "libc", ] @@ -1032,9 +1150,75 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "sword" +version = "0.1.0" +dependencies = [ + "assert_no_alloc", + "autotools", + "bitvec", + "cc", + "criterion 0.4.0", + "either", + "ibig", + "intmap", + "json", + "lazy_static", + "libc", + "memmap", + "murmur3", + "num-derive", + "num-traits", + "signal-hook", + "static_assertions", + "sword_crypto", + "sword_guard", + "sword_macros", + "sword_pma", +] + +[[package]] +name = "sword_crypto" +version = "0.1.0" +dependencies = [ + "aes", + "aes-siv", + "assert_no_alloc", + "curve25519-dalek", + "ed25519-dalek", + "ibig", + "sha1", + "sha2", + "x25519-dalek", +] + +[[package]] +name = "sword_guard" +version = "0.1.0" +dependencies = [ + "bindgen", + "cc", +] + +[[package]] +name = "sword_macros" +version = "0.1.0" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "sword_pma" +version = "0.1.0" +dependencies = [ + "bindgen", + "cc", +] [[package]] name = "syn" @@ -1049,9 +1233,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9" dependencies = [ "proc-macro2", "quote", @@ -1066,9 +1250,18 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "textwrap" -version = "0.16.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "textwrap" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" [[package]] name = "tinytemplate" @@ -1093,51 +1286,64 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] -name = "version_check" -version = "0.9.4" +name = "unicode-width" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", ] [[package]] -name = "wasm-bindgen" -version = "0.2.91" +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.93" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.91" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.75", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.91" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1145,28 +1351,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.91" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.75", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.91" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-sys" -version = "0.3.68" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -1202,11 +1408,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -1215,137 +1421,87 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows-sys" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", ] [[package]] name = "windows-targets" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" -dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] -name = "windows_i686_gnu" -version = "0.52.0" +name = "windows_i686_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "wyz" @@ -1358,16 +1514,37 @@ dependencies = [ [[package]] name = "x25519-dalek" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" +checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277" dependencies = [ "curve25519-dalek", "rand_core", ] [[package]] -name = "zeroize" -version = "1.7.0" +name = "zerocopy" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.75", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..4717112 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,10 @@ +[workspace] +members = [ + "rust/assert_no_alloc", + "rust/ibig", + "rust/sword", + "rust/sword_crypto", + "rust/sword_guard", + "rust/sword_macros", + "rust/sword_pma", +] diff --git a/DEVELOPERS.md b/DEVELOPERS.md index 844a97d..0adb6f2 100644 --- a/DEVELOPERS.md +++ b/DEVELOPERS.md @@ -1,7 +1,7 @@ -# Developing Ares +# Developing Sword ## Nix -Ares uses a Nix developer shell to set up the environment for rust builds. Please [Install Nix](https://nixos.org/download#download-nix). +Sword uses a Nix developer shell to set up the environment for rust builds. Please [Install Nix](https://nixos.org/download#download-nix). With Nix installed, you can run ```bash @@ -26,26 +26,26 @@ extra-experimental-features = nix-command ### Build -To build Ares, start a nix development shell as above. Within the shell, in the `rust/ares` directory, you can run: +To build Sword, start a nix development shell as above. Within the shell, in the `rust/sword` directory, you can run: ```bash cargo build ``` -to build the Ares executable. This will place the built executable at `target/debug/ares` under the `rust/ares` directory. +to build the Sword executable. This will place the built executable at `target/debug/sword` under the `rust/sword` directory. ### Run -Ares is made to run as an urbit "serf", meaning it is intended to be invoked by a "king" which sends it commands and performs side-effects specified by its output. We use the Vere king. +Sword is made to run as an urbit "serf", meaning it is intended to be invoked by a "king" which sends it commands and performs side-effects specified by its output. We use the Vere king. -To run the Vere king with Ares as serf, it's necessary to modify the Vere king to launch Ares instead of its own serf. This is done by modifying the executable of the serf protocol in the `u3_lord_init` function in `lord.c` of the Vere source: +To run the Vere king with Sword as serf, it's necessary to modify the Vere king to launch Sword instead of its own serf. This is done by modifying the executable of the serf protocol in the `u3_lord_init` function in `lord.c` of the Vere source: ```C // arg_c[0] = god_u->bin_c; -arg_c[0] = "/path/to/ares/repo/rust/ares/target/debug/ares"; +arg_c[0] = "/path/to/sword/repo/rust/sword/target/debug/sword"; ``` -Then, it is necessary to follow the [Vere build instrcutions](https://github.com/urbit/vere/blob/develop/INSTALL.md). (You should exit the `nix develop` shell first for such a build.) Afterwards, it's possible to launch Vere with Ares as the serf using the usual commands: +Then, it is necessary to follow the [Vere build instrcutions](https://github.com/urbit/vere/blob/develop/INSTALL.md). (You should exit the `nix develop` shell first for such a build.) Afterwards, it's possible to launch Vere with Sword as the serf using the usual commands: ```bash bazel-bin/pkg/vere/urbit -F zod @@ -53,7 +53,7 @@ bazel-bin/pkg/vere/urbit -F zod #### Pills -Ares development and testing, unlike regular development and ship operation, currently requires careful control over what pill is used to launch a ship. Currently, there are several pills available in `resources/pills/`: +Sword development and testing, unlike regular development and ship operation, currently requires careful control over what pill is used to launch a ship. Currently, there are several pills available in `resources/pills/`: - **baby.pill**: an extremely minimal Arvo-shaped core and Hoon standard library (`~wicdev-wisryt` [streamed a video of its development](https://youtu.be/fOVhCx1a-9A)) - **toddler.pill**: a slightly more complex Arvo and Hoon than `baby`, which runs slow recursive operations for testing jets @@ -61,17 +61,17 @@ video of its development](https://youtu.be/fOVhCx1a-9A)) - **full.pill**: the complete Urbit `v2.11` pill - **slim.pill**: a slimmed down version of the Urbit `v2.11` pill that has had every desk and agent not necessary for booting to dojo removed -More information on the pills used by Ares can be found [here](https://github.com/urbit/ares/blob/status/docs/pills.md). +More information on the pills used by Sword can be found [here](https://github.com/urbit/sword/blob/status/docs/pills.md). To launch a ship with a local pill (instead of downloading the default pill from urbit.org), the `-B` option is used: ```bash -bazel-bin/pkg/vere/urbit -F zod -B /path/to/ares/repo/resources/pills/baby.pill +bazel-bin/pkg/vere/urbit -F zod -B /path/to/sword/repo/resources/pills/baby.pill ``` ### Test -The command to run the Ares suite of unit tests is: +The command to run the Sword suite of unit tests is: ```bash cargo test --verbose -- --test-threads=1 @@ -82,7 +82,7 @@ specify ordered test dependencies. Therefore, the only way to ensure that tests ### Style -Ares uses the default Rust formatting and style. The CI jobs are configured to reject any code which produces linter or style warnings. Therefore, as a final step before uploading code changes to GitHub, it's recommended to run the following commands: +Sword uses the default Rust formatting and style. The CI jobs are configured to reject any code which produces linter or style warnings. Therefore, as a final step before uploading code changes to GitHub, it's recommended to run the following commands: ```bash cargo fmt @@ -99,11 +99,11 @@ To watch rust and check for errors, run cargo watch --clear ``` -Until terminated with ctrl-c, this will rebuild Ares library on any change to the underlying source files and report any warnings and errors. It will *not* produce the executable. You must run the build command above to rebuild the executable. +Until terminated with ctrl-c, this will rebuild Sword library on any change to the underlying source files and report any warnings and errors. It will *not* produce the executable. You must run the build command above to rebuild the executable. ## Hoon -The Nock analysis and lowering for Ares is written in Hoon, and lives at `hoon/codegen.` It is meant to be jammed and included in the Ares binary. (See [`src/load.rs`](rust/ares/src/load.rs) in the Rust sources for details.) +The Nock analysis and lowering for Sword is written in Hoon, and lives at `hoon/codegen.` It is meant to be jammed and included in the Sword binary. (See [`src/load.rs`](rust/sword/src/load.rs) in the Rust sources for details.) If the hoon source has been synced to a desk, e.g. `sandbox`, on a fakezod, then the build generator can be invoked as: @@ -111,6 +111,6 @@ If the hoon source has been synced to a desk, e.g. `sandbox`, on a fakezod, then .cg/jam +sandbox!cg-make ``` -This will build the Hoon standard library and the Ares Nock analysis as a "trap" meant to be run by Ares. The jammed output can be found at `/.urb/put/cg.jam`, and should be copied to the `rust/ares/bin` directory, from whence the rust build will include it in the executable. +This will build the Hoon standard library and the Sword Nock analysis as a "trap" meant to be run by Sword. The jammed output can be found at `/.urb/put/cg.jam`, and should be copied to the `rust/sword/bin` directory, from whence the rust build will include it in the executable. Instructions on testing the analysis in a fakezod are forthcoming. diff --git a/rust/ares_crypto/Cargo.lock b/rust/ares_crypto/Cargo.lock deleted file mode 100644 index cf47b03..0000000 --- a/rust/ares_crypto/Cargo.lock +++ /dev/null @@ -1,783 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "aead" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" -dependencies = [ - "crypto-common", - "generic-array", -] - -[[package]] -name = "aes" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", -] - -[[package]] -name = "aes-siv" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e08d0cdb774acd1e4dac11478b1a0c0d203134b2aab0ba25eb430de9b18f8b9" -dependencies = [ - "aead", - "aes", - "cipher", - "cmac", - "ctr", - "dbl", - "digest", - "zeroize", -] - -[[package]] -name = "aho-corasick" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" -dependencies = [ - "memchr", -] - -[[package]] -name = "ares_crypto" -version = "0.1.0" -dependencies = [ - "aes", - "aes-siv", - "assert_no_alloc", - "curve25519-dalek", - "ed25519-dalek", - "ibig", - "rand", - "sha1", - "sha2", - "x25519-dalek", -] - -[[package]] -name = "assert_no_alloc" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55ca83137a482d61d916ceb1eba52a684f98004f18e0cafea230fe5579c178a3" - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "bindgen" -version = "0.68.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "726e4313eb6ec35d2730258ad4e15b547ee75d6afaa1361a922e78e59b7d8078" -dependencies = [ - "bitflags", - "cexpr", - "clang-sys", - "lazy_static", - "lazycell", - "log", - "peeking_take_while", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn", - "which", -] - -[[package]] -name = "bitflags" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - -[[package]] -name = "clang-sys" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" -dependencies = [ - "glob", - "libc", - "libloading", -] - -[[package]] -name = "cmac" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8543454e3c3f5126effff9cd44d562af4e31fb8ce1cc0d3dcd8f084515dbc1aa" -dependencies = [ - "cipher", - "dbl", - "digest", -] - -[[package]] -name = "cpufeatures" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" -dependencies = [ - "libc", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "rand_core", - "typenum", -] - -[[package]] -name = "ctr" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" -dependencies = [ - "cipher", -] - -[[package]] -name = "curve25519-dalek" -version = "4.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" -dependencies = [ - "cfg-if", - "cpufeatures", - "curve25519-dalek-derive", - "digest", - "fiat-crypto", - "platforms", - "rustc_version", - "subtle", -] - -[[package]] -name = "curve25519-dalek-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "dbl" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd2735a791158376708f9347fe8faba9667589d82427ef3aed6794a8981de3d9" -dependencies = [ - "generic-array", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", - "subtle", -] - -[[package]] -name = "ed25519" -version = "2.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" -dependencies = [ - "signature", -] - -[[package]] -name = "ed25519-dalek" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" -dependencies = [ - "curve25519-dalek", - "ed25519", - "sha2", - "subtle", -] - -[[package]] -name = "either" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" - -[[package]] -name = "errno" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "fiat-crypto" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "ibig" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1fcc7f316b2c079dde77564a1360639c1a956a23fa96122732e416cb10717bb" -dependencies = [ - "cfg-if", - "num-traits", - "rand", - "static_assertions", -] - -[[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -dependencies = [ - "generic-array", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - -[[package]] -name = "libc" -version = "0.2.152" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" - -[[package]] -name = "libloading" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - -[[package]] -name = "linux-raw-sys" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" - -[[package]] -name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" - -[[package]] -name = "memchr" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "num-traits" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" -dependencies = [ - "autocfg", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - -[[package]] -name = "pkg-config" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" - -[[package]] -name = "platforms" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" - -[[package]] -name = "prettyplease" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" -dependencies = [ - "proc-macro2", - "syn", -] - -[[package]] -name = "proc-macro2" -version = "1.0.76" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "regex" -version = "1.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver", -] - -[[package]] -name = "rustix" -version = "0.38.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" -dependencies = [ - "bitflags", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - -[[package]] -name = "semver" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" - -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "shlex" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" - -[[package]] -name = "signature" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "subtle" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" - -[[package]] -name = "syn" -version = "2.0.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.0", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" -dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" - -[[package]] -name = "x25519-dalek" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" -dependencies = [ - "curve25519-dalek", - "rand_core", -] - -[[package]] -name = "zeroize" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" diff --git a/rust/ares_guard/Cargo.lock b/rust/ares_guard/Cargo.lock deleted file mode 100644 index 9ca8e67..0000000 --- a/rust/ares_guard/Cargo.lock +++ /dev/null @@ -1,429 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "aho-corasick" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" -dependencies = [ - "memchr", -] - -[[package]] -name = "ares_guard" -version = "0.1.0" -dependencies = [ - "bindgen", - "cc", -] - -[[package]] -name = "bindgen" -version = "0.69.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c69fae65a523209d34240b60abe0c42d33d1045d445c0839d8a4894a736e2d" -dependencies = [ - "bitflags", - "cexpr", - "clang-sys", - "lazy_static", - "lazycell", - "log", - "peeking_take_while", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn", - "which", -] - -[[package]] -name = "bitflags" -version = "2.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" - -[[package]] -name = "cc" -version = "1.0.99" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" - -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "clang-sys" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" -dependencies = [ - "glob", - "libc", - "libloading", -] - -[[package]] -name = "either" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" - -[[package]] -name = "errno" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - -[[package]] -name = "libc" -version = "0.2.152" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" - -[[package]] -name = "libloading" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - -[[package]] -name = "linux-raw-sys" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" - -[[package]] -name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" - -[[package]] -name = "memchr" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - -[[package]] -name = "prettyplease" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" -dependencies = [ - "proc-macro2", - "syn", -] - -[[package]] -name = "proc-macro2" -version = "1.0.76" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "regex" -version = "1.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustix" -version = "0.38.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" -dependencies = [ - "bitflags", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - -[[package]] -name = "shlex" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" - -[[package]] -name = "syn" -version = "2.0.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.0", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" -dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" diff --git a/rust/ares_macros/Cargo.lock b/rust/ares_macros/Cargo.lock deleted file mode 100644 index 396e62a..0000000 --- a/rust/ares_macros/Cargo.lock +++ /dev/null @@ -1,46 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "ares_macros" -version = "0.1.0" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "proc-macro2" -version = "1.0.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "syn" -version = "1.0.107" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "unicode-ident" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" diff --git a/rust/ares_pma/Cargo.lock b/rust/ares_pma/Cargo.lock deleted file mode 100644 index a4dfb7b..0000000 --- a/rust/ares_pma/Cargo.lock +++ /dev/null @@ -1,454 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "aho-corasick" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" -dependencies = [ - "memchr", -] - -[[package]] -name = "ares_pma" -version = "0.1.0" -dependencies = [ - "bindgen", - "cc", -] - -[[package]] -name = "bindgen" -version = "0.69.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ffcebc3849946a7170a05992aac39da343a90676ab392c51a4280981d6379c2" -dependencies = [ - "bitflags", - "cexpr", - "clang-sys", - "lazy_static", - "lazycell", - "log", - "peeking_take_while", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn", - "which", -] - -[[package]] -name = "bitflags" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" - -[[package]] -name = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] - -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "clang-sys" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" -dependencies = [ - "glob", - "libc", - "libloading", -] - -[[package]] -name = "either" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" - -[[package]] -name = "errno" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "home" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" -dependencies = [ - "windows-sys 0.48.0", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - -[[package]] -name = "libc" -version = "0.2.150" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" - -[[package]] -name = "libloading" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" -dependencies = [ - "cfg-if", - "winapi", -] - -[[package]] -name = "linux-raw-sys" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" - -[[package]] -name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" - -[[package]] -name = "memchr" -version = "2.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "once_cell" -version = "1.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" - -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - -[[package]] -name = "prettyplease" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" -dependencies = [ - "proc-macro2", - "syn", -] - -[[package]] -name = "proc-macro2" -version = "1.0.70" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "regex" -version = "1.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustix" -version = "0.38.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" -dependencies = [ - "bitflags", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.48.0", -] - -[[package]] -name = "shlex" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" - -[[package]] -name = "syn" -version = "2.0.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.0", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" -dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" diff --git a/rust/rust-assert-no-alloc/Cargo.toml b/rust/assert_no_alloc/Cargo.toml similarity index 100% rename from rust/rust-assert-no-alloc/Cargo.toml rename to rust/assert_no_alloc/Cargo.toml diff --git a/rust/rust-assert-no-alloc/LICENSE b/rust/assert_no_alloc/LICENSE similarity index 100% rename from rust/rust-assert-no-alloc/LICENSE rename to rust/assert_no_alloc/LICENSE diff --git a/rust/rust-assert-no-alloc/README.md b/rust/assert_no_alloc/README.md similarity index 100% rename from rust/rust-assert-no-alloc/README.md rename to rust/assert_no_alloc/README.md diff --git a/rust/rust-assert-no-alloc/examples/main.rs b/rust/assert_no_alloc/examples/main.rs similarity index 100% rename from rust/rust-assert-no-alloc/examples/main.rs rename to rust/assert_no_alloc/examples/main.rs diff --git a/rust/rust-assert-no-alloc/src/lib.rs b/rust/assert_no_alloc/src/lib.rs similarity index 100% rename from rust/rust-assert-no-alloc/src/lib.rs rename to rust/assert_no_alloc/src/lib.rs diff --git a/rust/rust-assert-no-alloc/tests/test.rs b/rust/assert_no_alloc/tests/test.rs similarity index 100% rename from rust/rust-assert-no-alloc/tests/test.rs rename to rust/assert_no_alloc/tests/test.rs diff --git a/rust/ibig-rs/.gitignore b/rust/ibig/.gitignore similarity index 100% rename from rust/ibig-rs/.gitignore rename to rust/ibig/.gitignore diff --git a/rust/ibig-rs/CHANGELOG.md b/rust/ibig/CHANGELOG.md similarity index 100% rename from rust/ibig-rs/CHANGELOG.md rename to rust/ibig/CHANGELOG.md diff --git a/rust/ibig-rs/Cargo.toml b/rust/ibig/Cargo.toml similarity index 92% rename from rust/ibig-rs/Cargo.toml rename to rust/ibig/Cargo.toml index 5eb5a65..a5967d2 100644 --- a/rust/ibig-rs/Cargo.toml +++ b/rust/ibig/Cargo.toml @@ -70,5 +70,5 @@ name = "benchmarks" required-features = ["rand"] harness = false -[workspace] -members = ["dev-tools"] +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(force_bits, values("16","32","64"))'] } diff --git a/rust/ibig-rs/LICENSE-APACHE b/rust/ibig/LICENSE-APACHE similarity index 100% rename from rust/ibig-rs/LICENSE-APACHE rename to rust/ibig/LICENSE-APACHE diff --git a/rust/ibig-rs/LICENSE-MIT b/rust/ibig/LICENSE-MIT similarity index 100% rename from rust/ibig-rs/LICENSE-MIT rename to rust/ibig/LICENSE-MIT diff --git a/rust/ibig-rs/README.md b/rust/ibig/README.md similarity index 100% rename from rust/ibig-rs/README.md rename to rust/ibig/README.md diff --git a/rust/ibig-rs/benches/benchmarks.rs b/rust/ibig/benches/benchmarks.rs similarity index 100% rename from rust/ibig-rs/benches/benchmarks.rs rename to rust/ibig/benches/benchmarks.rs diff --git a/rust/ibig-rs/dev-tools/Cargo.toml b/rust/ibig/dev-tools/Cargo.toml similarity index 100% rename from rust/ibig-rs/dev-tools/Cargo.toml rename to rust/ibig/dev-tools/Cargo.toml diff --git a/rust/ibig-rs/dev-tools/src/bin/ntt_primes.rs b/rust/ibig/dev-tools/src/bin/ntt_primes.rs similarity index 100% rename from rust/ibig-rs/dev-tools/src/bin/ntt_primes.rs rename to rust/ibig/dev-tools/src/bin/ntt_primes.rs diff --git a/rust/ibig-rs/examples/factorial.rs b/rust/ibig/examples/factorial.rs similarity index 100% rename from rust/ibig-rs/examples/factorial.rs rename to rust/ibig/examples/factorial.rs diff --git a/rust/ibig-rs/generate_coverage.sh b/rust/ibig/generate_coverage.sh similarity index 100% rename from rust/ibig-rs/generate_coverage.sh rename to rust/ibig/generate_coverage.sh diff --git a/rust/ibig-rs/src/add.rs b/rust/ibig/src/add.rs similarity index 100% rename from rust/ibig-rs/src/add.rs rename to rust/ibig/src/add.rs diff --git a/rust/ibig-rs/src/add_ops.rs b/rust/ibig/src/add_ops.rs similarity index 100% rename from rust/ibig-rs/src/add_ops.rs rename to rust/ibig/src/add_ops.rs diff --git a/rust/ibig-rs/src/arch/generic/add.rs b/rust/ibig/src/arch/generic/add.rs similarity index 100% rename from rust/ibig-rs/src/arch/generic/add.rs rename to rust/ibig/src/arch/generic/add.rs diff --git a/rust/ibig-rs/src/arch/generic/digits.rs b/rust/ibig/src/arch/generic/digits.rs similarity index 100% rename from rust/ibig-rs/src/arch/generic/digits.rs rename to rust/ibig/src/arch/generic/digits.rs diff --git a/rust/ibig-rs/src/arch/generic_16_bit/mod.rs b/rust/ibig/src/arch/generic_16_bit/mod.rs similarity index 100% rename from rust/ibig-rs/src/arch/generic_16_bit/mod.rs rename to rust/ibig/src/arch/generic_16_bit/mod.rs diff --git a/rust/ibig-rs/src/arch/generic_16_bit/ntt.rs b/rust/ibig/src/arch/generic_16_bit/ntt.rs similarity index 100% rename from rust/ibig-rs/src/arch/generic_16_bit/ntt.rs rename to rust/ibig/src/arch/generic_16_bit/ntt.rs diff --git a/rust/ibig-rs/src/arch/generic_16_bit/word.rs b/rust/ibig/src/arch/generic_16_bit/word.rs similarity index 100% rename from rust/ibig-rs/src/arch/generic_16_bit/word.rs rename to rust/ibig/src/arch/generic_16_bit/word.rs diff --git a/rust/ibig-rs/src/arch/generic_32_bit/mod.rs b/rust/ibig/src/arch/generic_32_bit/mod.rs similarity index 100% rename from rust/ibig-rs/src/arch/generic_32_bit/mod.rs rename to rust/ibig/src/arch/generic_32_bit/mod.rs diff --git a/rust/ibig-rs/src/arch/generic_32_bit/ntt.rs b/rust/ibig/src/arch/generic_32_bit/ntt.rs similarity index 100% rename from rust/ibig-rs/src/arch/generic_32_bit/ntt.rs rename to rust/ibig/src/arch/generic_32_bit/ntt.rs diff --git a/rust/ibig-rs/src/arch/generic_32_bit/word.rs b/rust/ibig/src/arch/generic_32_bit/word.rs similarity index 100% rename from rust/ibig-rs/src/arch/generic_32_bit/word.rs rename to rust/ibig/src/arch/generic_32_bit/word.rs diff --git a/rust/ibig-rs/src/arch/generic_64_bit/mod.rs b/rust/ibig/src/arch/generic_64_bit/mod.rs similarity index 100% rename from rust/ibig-rs/src/arch/generic_64_bit/mod.rs rename to rust/ibig/src/arch/generic_64_bit/mod.rs diff --git a/rust/ibig-rs/src/arch/generic_64_bit/ntt.rs b/rust/ibig/src/arch/generic_64_bit/ntt.rs similarity index 100% rename from rust/ibig-rs/src/arch/generic_64_bit/ntt.rs rename to rust/ibig/src/arch/generic_64_bit/ntt.rs diff --git a/rust/ibig-rs/src/arch/generic_64_bit/word.rs b/rust/ibig/src/arch/generic_64_bit/word.rs similarity index 100% rename from rust/ibig-rs/src/arch/generic_64_bit/word.rs rename to rust/ibig/src/arch/generic_64_bit/word.rs diff --git a/rust/ibig-rs/src/arch/mod.rs b/rust/ibig/src/arch/mod.rs similarity index 100% rename from rust/ibig-rs/src/arch/mod.rs rename to rust/ibig/src/arch/mod.rs diff --git a/rust/ibig-rs/src/arch/x86/add.rs b/rust/ibig/src/arch/x86/add.rs similarity index 100% rename from rust/ibig-rs/src/arch/x86/add.rs rename to rust/ibig/src/arch/x86/add.rs diff --git a/rust/ibig-rs/src/arch/x86/mod.rs b/rust/ibig/src/arch/x86/mod.rs similarity index 100% rename from rust/ibig-rs/src/arch/x86/mod.rs rename to rust/ibig/src/arch/x86/mod.rs diff --git a/rust/ibig-rs/src/arch/x86_64/add.rs b/rust/ibig/src/arch/x86_64/add.rs similarity index 100% rename from rust/ibig-rs/src/arch/x86_64/add.rs rename to rust/ibig/src/arch/x86_64/add.rs diff --git a/rust/ibig-rs/src/arch/x86_64/mod.rs b/rust/ibig/src/arch/x86_64/mod.rs similarity index 100% rename from rust/ibig-rs/src/arch/x86_64/mod.rs rename to rust/ibig/src/arch/x86_64/mod.rs diff --git a/rust/ibig-rs/src/assert.rs b/rust/ibig/src/assert.rs similarity index 100% rename from rust/ibig-rs/src/assert.rs rename to rust/ibig/src/assert.rs diff --git a/rust/ibig-rs/src/bits.rs b/rust/ibig/src/bits.rs similarity index 100% rename from rust/ibig-rs/src/bits.rs rename to rust/ibig/src/bits.rs diff --git a/rust/ibig-rs/src/buffer.rs b/rust/ibig/src/buffer.rs similarity index 100% rename from rust/ibig-rs/src/buffer.rs rename to rust/ibig/src/buffer.rs diff --git a/rust/ibig-rs/src/cmp.rs b/rust/ibig/src/cmp.rs similarity index 100% rename from rust/ibig-rs/src/cmp.rs rename to rust/ibig/src/cmp.rs diff --git a/rust/ibig-rs/src/convert.rs b/rust/ibig/src/convert.rs similarity index 100% rename from rust/ibig-rs/src/convert.rs rename to rust/ibig/src/convert.rs diff --git a/rust/ibig-rs/src/div/divide_conquer.rs b/rust/ibig/src/div/divide_conquer.rs similarity index 100% rename from rust/ibig-rs/src/div/divide_conquer.rs rename to rust/ibig/src/div/divide_conquer.rs diff --git a/rust/ibig-rs/src/div/mod.rs b/rust/ibig/src/div/mod.rs similarity index 100% rename from rust/ibig-rs/src/div/mod.rs rename to rust/ibig/src/div/mod.rs diff --git a/rust/ibig-rs/src/div/simple.rs b/rust/ibig/src/div/simple.rs similarity index 100% rename from rust/ibig-rs/src/div/simple.rs rename to rust/ibig/src/div/simple.rs diff --git a/rust/ibig-rs/src/div_ops.rs b/rust/ibig/src/div_ops.rs similarity index 100% rename from rust/ibig-rs/src/div_ops.rs rename to rust/ibig/src/div_ops.rs diff --git a/rust/ibig-rs/src/error.rs b/rust/ibig/src/error.rs similarity index 100% rename from rust/ibig-rs/src/error.rs rename to rust/ibig/src/error.rs diff --git a/rust/ibig-rs/src/fast_divide.rs b/rust/ibig/src/fast_divide.rs similarity index 100% rename from rust/ibig-rs/src/fast_divide.rs rename to rust/ibig/src/fast_divide.rs diff --git a/rust/ibig-rs/src/fmt/digit_writer.rs b/rust/ibig/src/fmt/digit_writer.rs similarity index 100% rename from rust/ibig-rs/src/fmt/digit_writer.rs rename to rust/ibig/src/fmt/digit_writer.rs diff --git a/rust/ibig-rs/src/fmt/mod.rs b/rust/ibig/src/fmt/mod.rs similarity index 100% rename from rust/ibig-rs/src/fmt/mod.rs rename to rust/ibig/src/fmt/mod.rs diff --git a/rust/ibig-rs/src/fmt/non_power_two.rs b/rust/ibig/src/fmt/non_power_two.rs similarity index 100% rename from rust/ibig-rs/src/fmt/non_power_two.rs rename to rust/ibig/src/fmt/non_power_two.rs diff --git a/rust/ibig-rs/src/fmt/power_two.rs b/rust/ibig/src/fmt/power_two.rs similarity index 100% rename from rust/ibig-rs/src/fmt/power_two.rs rename to rust/ibig/src/fmt/power_two.rs diff --git a/rust/ibig-rs/src/gcd.rs b/rust/ibig/src/gcd.rs similarity index 100% rename from rust/ibig-rs/src/gcd.rs rename to rust/ibig/src/gcd.rs diff --git a/rust/ibig-rs/src/helper_macros.rs b/rust/ibig/src/helper_macros.rs similarity index 100% rename from rust/ibig-rs/src/helper_macros.rs rename to rust/ibig/src/helper_macros.rs diff --git a/rust/ibig-rs/src/ibig.rs b/rust/ibig/src/ibig.rs similarity index 100% rename from rust/ibig-rs/src/ibig.rs rename to rust/ibig/src/ibig.rs diff --git a/rust/ibig-rs/src/lib.rs b/rust/ibig/src/lib.rs similarity index 100% rename from rust/ibig-rs/src/lib.rs rename to rust/ibig/src/lib.rs diff --git a/rust/ibig-rs/src/macros.rs b/rust/ibig/src/macros.rs similarity index 100% rename from rust/ibig-rs/src/macros.rs rename to rust/ibig/src/macros.rs diff --git a/rust/ibig-rs/src/math.rs b/rust/ibig/src/math.rs similarity index 100% rename from rust/ibig-rs/src/math.rs rename to rust/ibig/src/math.rs diff --git a/rust/ibig-rs/src/memory.rs b/rust/ibig/src/memory.rs similarity index 100% rename from rust/ibig-rs/src/memory.rs rename to rust/ibig/src/memory.rs diff --git a/rust/ibig-rs/src/modular/add.rs b/rust/ibig/src/modular/add.rs similarity index 100% rename from rust/ibig-rs/src/modular/add.rs rename to rust/ibig/src/modular/add.rs diff --git a/rust/ibig-rs/src/modular/cmp.rs b/rust/ibig/src/modular/cmp.rs similarity index 100% rename from rust/ibig-rs/src/modular/cmp.rs rename to rust/ibig/src/modular/cmp.rs diff --git a/rust/ibig-rs/src/modular/convert.rs b/rust/ibig/src/modular/convert.rs similarity index 100% rename from rust/ibig-rs/src/modular/convert.rs rename to rust/ibig/src/modular/convert.rs diff --git a/rust/ibig-rs/src/modular/div.rs b/rust/ibig/src/modular/div.rs similarity index 100% rename from rust/ibig-rs/src/modular/div.rs rename to rust/ibig/src/modular/div.rs diff --git a/rust/ibig-rs/src/modular/fmt.rs b/rust/ibig/src/modular/fmt.rs similarity index 100% rename from rust/ibig-rs/src/modular/fmt.rs rename to rust/ibig/src/modular/fmt.rs diff --git a/rust/ibig-rs/src/modular/mod.rs b/rust/ibig/src/modular/mod.rs similarity index 100% rename from rust/ibig-rs/src/modular/mod.rs rename to rust/ibig/src/modular/mod.rs diff --git a/rust/ibig-rs/src/modular/modulo.rs b/rust/ibig/src/modular/modulo.rs similarity index 100% rename from rust/ibig-rs/src/modular/modulo.rs rename to rust/ibig/src/modular/modulo.rs diff --git a/rust/ibig-rs/src/modular/modulo_ring.rs b/rust/ibig/src/modular/modulo_ring.rs similarity index 100% rename from rust/ibig-rs/src/modular/modulo_ring.rs rename to rust/ibig/src/modular/modulo_ring.rs diff --git a/rust/ibig-rs/src/modular/mul.rs b/rust/ibig/src/modular/mul.rs similarity index 100% rename from rust/ibig-rs/src/modular/mul.rs rename to rust/ibig/src/modular/mul.rs diff --git a/rust/ibig-rs/src/modular/pow.rs b/rust/ibig/src/modular/pow.rs similarity index 100% rename from rust/ibig-rs/src/modular/pow.rs rename to rust/ibig/src/modular/pow.rs diff --git a/rust/ibig-rs/src/mul/helpers.rs b/rust/ibig/src/mul/helpers.rs similarity index 100% rename from rust/ibig-rs/src/mul/helpers.rs rename to rust/ibig/src/mul/helpers.rs diff --git a/rust/ibig-rs/src/mul/karatsuba.rs b/rust/ibig/src/mul/karatsuba.rs similarity index 100% rename from rust/ibig-rs/src/mul/karatsuba.rs rename to rust/ibig/src/mul/karatsuba.rs diff --git a/rust/ibig-rs/src/mul/mod.rs b/rust/ibig/src/mul/mod.rs similarity index 100% rename from rust/ibig-rs/src/mul/mod.rs rename to rust/ibig/src/mul/mod.rs diff --git a/rust/ibig-rs/src/mul/ntt.rs b/rust/ibig/src/mul/ntt.rs similarity index 100% rename from rust/ibig-rs/src/mul/ntt.rs rename to rust/ibig/src/mul/ntt.rs diff --git a/rust/ibig-rs/src/mul/simple.rs b/rust/ibig/src/mul/simple.rs similarity index 100% rename from rust/ibig-rs/src/mul/simple.rs rename to rust/ibig/src/mul/simple.rs diff --git a/rust/ibig-rs/src/mul/toom_3.rs b/rust/ibig/src/mul/toom_3.rs similarity index 100% rename from rust/ibig-rs/src/mul/toom_3.rs rename to rust/ibig/src/mul/toom_3.rs diff --git a/rust/ibig-rs/src/mul_ops.rs b/rust/ibig/src/mul_ops.rs similarity index 100% rename from rust/ibig-rs/src/mul_ops.rs rename to rust/ibig/src/mul_ops.rs diff --git a/rust/ibig-rs/src/num_traits.rs b/rust/ibig/src/num_traits.rs similarity index 100% rename from rust/ibig-rs/src/num_traits.rs rename to rust/ibig/src/num_traits.rs diff --git a/rust/ibig-rs/src/ops.rs b/rust/ibig/src/ops.rs similarity index 100% rename from rust/ibig-rs/src/ops.rs rename to rust/ibig/src/ops.rs diff --git a/rust/ibig-rs/src/parse/mod.rs b/rust/ibig/src/parse/mod.rs similarity index 100% rename from rust/ibig-rs/src/parse/mod.rs rename to rust/ibig/src/parse/mod.rs diff --git a/rust/ibig-rs/src/parse/non_power_two.rs b/rust/ibig/src/parse/non_power_two.rs similarity index 100% rename from rust/ibig-rs/src/parse/non_power_two.rs rename to rust/ibig/src/parse/non_power_two.rs diff --git a/rust/ibig-rs/src/parse/power_two.rs b/rust/ibig/src/parse/power_two.rs similarity index 100% rename from rust/ibig-rs/src/parse/power_two.rs rename to rust/ibig/src/parse/power_two.rs diff --git a/rust/ibig-rs/src/pow.rs b/rust/ibig/src/pow.rs similarity index 100% rename from rust/ibig-rs/src/pow.rs rename to rust/ibig/src/pow.rs diff --git a/rust/ibig-rs/src/primitive.rs b/rust/ibig/src/primitive.rs similarity index 100% rename from rust/ibig-rs/src/primitive.rs rename to rust/ibig/src/primitive.rs diff --git a/rust/ibig-rs/src/radix.rs b/rust/ibig/src/radix.rs similarity index 100% rename from rust/ibig-rs/src/radix.rs rename to rust/ibig/src/radix.rs diff --git a/rust/ibig-rs/src/rand.rs b/rust/ibig/src/rand.rs similarity index 100% rename from rust/ibig-rs/src/rand.rs rename to rust/ibig/src/rand.rs diff --git a/rust/ibig-rs/src/serde.rs b/rust/ibig/src/serde.rs similarity index 100% rename from rust/ibig-rs/src/serde.rs rename to rust/ibig/src/serde.rs diff --git a/rust/ibig-rs/src/shift.rs b/rust/ibig/src/shift.rs similarity index 100% rename from rust/ibig-rs/src/shift.rs rename to rust/ibig/src/shift.rs diff --git a/rust/ibig-rs/src/shift_ops.rs b/rust/ibig/src/shift_ops.rs similarity index 100% rename from rust/ibig-rs/src/shift_ops.rs rename to rust/ibig/src/shift_ops.rs diff --git a/rust/ibig-rs/src/sign.rs b/rust/ibig/src/sign.rs similarity index 100% rename from rust/ibig-rs/src/sign.rs rename to rust/ibig/src/sign.rs diff --git a/rust/ibig-rs/src/ubig.rs b/rust/ibig/src/ubig.rs similarity index 100% rename from rust/ibig-rs/src/ubig.rs rename to rust/ibig/src/ubig.rs diff --git a/rust/ibig-rs/tests/add.rs b/rust/ibig/tests/add.rs similarity index 100% rename from rust/ibig-rs/tests/add.rs rename to rust/ibig/tests/add.rs diff --git a/rust/ibig-rs/tests/bits.rs b/rust/ibig/tests/bits.rs similarity index 100% rename from rust/ibig-rs/tests/bits.rs rename to rust/ibig/tests/bits.rs diff --git a/rust/ibig-rs/tests/cmp.rs b/rust/ibig/tests/cmp.rs similarity index 100% rename from rust/ibig-rs/tests/cmp.rs rename to rust/ibig/tests/cmp.rs diff --git a/rust/ibig-rs/tests/convert.rs b/rust/ibig/tests/convert.rs similarity index 100% rename from rust/ibig-rs/tests/convert.rs rename to rust/ibig/tests/convert.rs diff --git a/rust/ibig-rs/tests/div.rs b/rust/ibig/tests/div.rs similarity index 100% rename from rust/ibig-rs/tests/div.rs rename to rust/ibig/tests/div.rs diff --git a/rust/ibig-rs/tests/gcd.rs b/rust/ibig/tests/gcd.rs similarity index 100% rename from rust/ibig-rs/tests/gcd.rs rename to rust/ibig/tests/gcd.rs diff --git a/rust/ibig-rs/tests/hash.rs b/rust/ibig/tests/hash.rs similarity index 100% rename from rust/ibig-rs/tests/hash.rs rename to rust/ibig/tests/hash.rs diff --git a/rust/ibig-rs/tests/modular.rs b/rust/ibig/tests/modular.rs similarity index 100% rename from rust/ibig-rs/tests/modular.rs rename to rust/ibig/tests/modular.rs diff --git a/rust/ibig-rs/tests/mul.rs b/rust/ibig/tests/mul.rs similarity index 100% rename from rust/ibig-rs/tests/mul.rs rename to rust/ibig/tests/mul.rs diff --git a/rust/ibig-rs/tests/pow.rs b/rust/ibig/tests/pow.rs similarity index 100% rename from rust/ibig-rs/tests/pow.rs rename to rust/ibig/tests/pow.rs diff --git a/rust/ibig-rs/tests/radix.rs b/rust/ibig/tests/radix.rs similarity index 100% rename from rust/ibig-rs/tests/radix.rs rename to rust/ibig/tests/radix.rs diff --git a/rust/ibig-rs/tests/random.rs b/rust/ibig/tests/random.rs similarity index 100% rename from rust/ibig-rs/tests/random.rs rename to rust/ibig/tests/random.rs diff --git a/rust/ibig-rs/tests/serde.rs b/rust/ibig/tests/serde.rs similarity index 100% rename from rust/ibig-rs/tests/serde.rs rename to rust/ibig/tests/serde.rs diff --git a/rust/ibig-rs/tests/shift.rs b/rust/ibig/tests/shift.rs similarity index 100% rename from rust/ibig-rs/tests/shift.rs rename to rust/ibig/tests/shift.rs diff --git a/rust/ibig-rs/tests/sign.rs b/rust/ibig/tests/sign.rs similarity index 100% rename from rust/ibig-rs/tests/sign.rs rename to rust/ibig/tests/sign.rs diff --git a/rust/ares/Cargo.toml b/rust/sword/Cargo.toml similarity index 61% rename from rust/ares/Cargo.toml rename to rust/sword/Cargo.toml index 3156e0d..958bfba 100644 --- a/rust/ares/Cargo.toml +++ b/rust/sword/Cargo.toml @@ -1,29 +1,22 @@ [package] -name = "ares" +name = "sword" version = "0.1.0" authors = ["Edward Amsden "] edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -# [patch.crates-io] -# ibig = { path = "../ibig-rs" } - # Please keep these alphabetized [dependencies] -ares_guard = { path = "../ares_guard" } -ares_crypto = { path = "../ares_crypto" } -ares_macros = { path = "../ares_macros" } -# Use this when debugging requires the debug printfs in the PMA -# ares_pma = { path = "../ares_pma", features=["debug_prints"] } -ares_pma = { path = "../ares_pma" } -# use this when debugging requires allocation (e.g. eprintln) -# assert_no_alloc = { path = "../rust-assert-no-alloc", features=["warn_debug"] } -assert_no_alloc = { path = "../rust-assert-no-alloc" } +sword_guard = { path = "../sword_guard" } +sword_crypto = { path = "../sword_crypto" } +sword_macros = { path = "../sword_macros" } +sword_pma = { path = "../sword_pma" } +assert_no_alloc = { path = "../assert_no_alloc" } bitvec = "1.0.0" criterion = "0.4" either = "1.9.0" -ibig = { path = "../ibig-rs" } +ibig = { path = "../ibig" } intmap = "1.1.0" json = "0.12.4" lazy_static = "1.4.0" @@ -40,7 +33,7 @@ autotools = "0.2" cc = "1.0" [[bin]] -name = "ares" +name = "sword" path = "src/main.rs" [profile.dev] diff --git a/rust/ares/benches/cue_pill.rs b/rust/sword/benches/cue_pill.rs similarity index 94% rename from rust/ares/benches/cue_pill.rs rename to rust/sword/benches/cue_pill.rs index 70a13dc..0a02824 100644 --- a/rust/ares/benches/cue_pill.rs +++ b/rust/sword/benches/cue_pill.rs @@ -1,6 +1,6 @@ -use ares::mem::NockStack; -use ares::noun::{DirectAtom, IndirectAtom}; -use ares::serialization::{cue, jam}; +use sword::mem::NockStack; +use sword::noun::{DirectAtom, IndirectAtom}; +use sword::serialization::{cue, jam}; use std::env; use std::fs::{File, OpenOptions}; use std::io; diff --git a/rust/ares/src/flog.rs b/rust/sword/src/flog.rs similarity index 100% rename from rust/ares/src/flog.rs rename to rust/sword/src/flog.rs diff --git a/rust/ares/src/guard.rs b/rust/sword/src/guard.rs similarity index 99% rename from rust/ares/src/guard.rs rename to rust/sword/src/guard.rs index f83b8c5..5524f46 100644 --- a/rust/ares/src/guard.rs +++ b/rust/sword/src/guard.rs @@ -1,6 +1,6 @@ use crate::interpreter::{Error, Mote, Result}; use crate::noun::D; -use ares_guard::*; +use sword_guard::*; use assert_no_alloc::permit_alloc; use std::ffi::c_void; use std::marker::PhantomData; diff --git a/rust/ares/src/hamt.rs b/rust/sword/src/hamt.rs similarity index 100% rename from rust/ares/src/hamt.rs rename to rust/sword/src/hamt.rs diff --git a/rust/ares/src/interpreter.rs b/rust/sword/src/interpreter.rs similarity index 99% rename from rust/ares/src/interpreter.rs rename to rust/sword/src/interpreter.rs index ac2e7c9..daf7b80 100644 --- a/rust/ares/src/interpreter.rs +++ b/rust/sword/src/interpreter.rs @@ -16,7 +16,7 @@ use crate::noun::{Atom, Cell, IndirectAtom, Noun, Slots, D, T}; use crate::serf::TERMINATOR; use crate::trace::{write_nock_trace, TraceInfo, TraceStack}; use crate::unifying_equality::unifying_equality; -use ares_macros::tas; +use sword_macros::tas; use assert_no_alloc::{assert_no_alloc, ensure_alloc_counters}; use bitvec::prelude::{BitSlice, Lsb0}; use either::*; @@ -1387,7 +1387,7 @@ mod hint { use crate::jets::nock::util::{mook, LEAF}; use crate::noun::{tape, Atom, Cell, Noun, D, T}; use crate::unifying_equality::unifying_equality; - use ares_macros::tas; + use sword_macros::tas; pub fn is_tail(tag: Atom) -> bool { // XX: handle IndirectAtom tags diff --git a/rust/ares/src/jets.rs b/rust/sword/src/jets.rs similarity index 99% rename from rust/ares/src/jets.rs rename to rust/sword/src/jets.rs index 46c0234..2f68a0a 100644 --- a/rust/ares/src/jets.rs +++ b/rust/sword/src/jets.rs @@ -37,7 +37,7 @@ use crate::jets::tree::*; use crate::jets::warm::Warm; use crate::mem::{NockStack, Preserve}; use crate::noun::{self, Noun, Slots, D}; -use ares_macros::tas; +use sword_macros::tas; crate::gdb!(); diff --git a/rust/ares/src/jets/bits.rs b/rust/sword/src/jets/bits.rs similarity index 100% rename from rust/ares/src/jets/bits.rs rename to rust/sword/src/jets/bits.rs diff --git a/rust/ares/src/jets/cold.rs b/rust/sword/src/jets/cold.rs similarity index 100% rename from rust/ares/src/jets/cold.rs rename to rust/sword/src/jets/cold.rs diff --git a/rust/ares/src/jets/form.rs b/rust/sword/src/jets/form.rs similarity index 98% rename from rust/ares/src/jets/form.rs rename to rust/sword/src/jets/form.rs index 66db10b..e780103 100644 --- a/rust/ares/src/jets/form.rs +++ b/rust/sword/src/jets/form.rs @@ -18,7 +18,7 @@ pub mod util { use crate::jets::JetErr; use crate::mem::NockStack; use crate::noun::{Atom, Cell, DirectAtom, D, T}; - use ares_macros::tas; + use sword_macros::tas; use num_traits::identities::Zero; pub fn scow( @@ -82,7 +82,7 @@ mod tests { use crate::jets::util::test::{assert_jet, assert_jet_err, init_context, A}; use crate::jets::JetErr; use crate::noun::{Noun, D, T}; - use ares_macros::tas; + use sword_macros::tas; use ibig::ubig; // Rust can't handle implicit conversions from u8 to u64 diff --git a/rust/ares/src/jets/hash.rs b/rust/sword/src/jets/hash.rs similarity index 100% rename from rust/ares/src/jets/hash.rs rename to rust/sword/src/jets/hash.rs diff --git a/rust/ares/src/jets/hot.rs b/rust/sword/src/jets/hot.rs similarity index 99% rename from rust/ares/src/jets/hot.rs rename to rust/sword/src/jets/hot.rs index dacb843..4f2f838 100644 --- a/rust/ares/src/jets/hot.rs +++ b/rust/sword/src/jets/hot.rs @@ -1,6 +1,6 @@ use crate::jets::*; use crate::noun::{Atom, DirectAtom, IndirectAtom, Noun, D, T}; -use ares_macros::tas; +use sword_macros::tas; use either::Either::{self, Left, Right}; use std::ptr::{copy_nonoverlapping, null_mut}; @@ -60,7 +60,7 @@ pub const K_139: Either<&[u8], (u64, u64)> = Right((tas!(b"k"), 139)); /** * (path, axis in battery, jet function pointer) - * see the [Jet] typedef in ares::jets for the proper prototype + * see the [Jet] typedef in sword::jets for the proper prototype */ pub type HotEntry = (&'static [Either<&'static [u8], (u64, u64)>], u64, Jet); diff --git a/rust/ares/src/jets/list.rs b/rust/sword/src/jets/list.rs similarity index 100% rename from rust/ares/src/jets/list.rs rename to rust/sword/src/jets/list.rs diff --git a/rust/ares/src/jets/lock.rs b/rust/sword/src/jets/lock.rs similarity index 100% rename from rust/ares/src/jets/lock.rs rename to rust/sword/src/jets/lock.rs diff --git a/rust/ares/src/jets/lock/aes.rs b/rust/sword/src/jets/lock/aes.rs similarity index 99% rename from rust/ares/src/jets/lock/aes.rs rename to rust/sword/src/jets/lock/aes.rs index 26d166b..5ea7a92 100644 --- a/rust/ares/src/jets/lock/aes.rs +++ b/rust/sword/src/jets/lock/aes.rs @@ -7,7 +7,7 @@ use crate::noun::Noun; crate::gdb!(); // Note: The Hoon code for these functions doesn't explicitly check key -// sizes. However, the implementations of these functions in ares_crypto +// sizes. However, the implementations of these functions in sword_crypto // have fixed maximum key sizes, therefore we must punt if the key is // too large. @@ -120,7 +120,7 @@ mod util { use crate::jets::{JetErr, Result}; use crate::mem::NockStack; use crate::noun::{Atom, IndirectAtom, Noun, D, T}; - use ares_crypto::aes_siv::{ac_aes_siv_de, ac_aes_siv_en}; + use sword_crypto::aes_siv::{ac_aes_siv_de, ac_aes_siv_en}; use std::result; /// Associated data for AES-SIV functions. diff --git a/rust/ares/src/jets/lock/ed.rs b/rust/sword/src/jets/lock/ed.rs similarity index 99% rename from rust/ares/src/jets/lock/ed.rs rename to rust/sword/src/jets/lock/ed.rs index 0ff2d26..4d14384 100644 --- a/rust/ares/src/jets/lock/ed.rs +++ b/rust/sword/src/jets/lock/ed.rs @@ -4,7 +4,7 @@ use crate::jets::util::{slot, BAIL_EXIT}; use crate::jets::{JetErr, Result}; use crate::mem::NockStack; use crate::noun::{IndirectAtom, Noun, NO, YES}; -use ares_crypto::ed25519::{ac_ed_puck, ac_ed_shar, ac_ed_sign, ac_ed_veri}; +use sword_crypto::ed25519::{ac_ed_puck, ac_ed_shar, ac_ed_sign, ac_ed_veri}; crate::gdb!(); diff --git a/rust/ares/src/jets/lock/sha.rs b/rust/sword/src/jets/lock/sha.rs similarity index 99% rename from rust/ares/src/jets/lock/sha.rs rename to rust/sword/src/jets/lock/sha.rs index 63db027..d62a47e 100644 --- a/rust/ares/src/jets/lock/sha.rs +++ b/rust/sword/src/jets/lock/sha.rs @@ -3,7 +3,7 @@ use crate::jets::bits::util::met; use crate::jets::util::{slot, BAIL_FAIL}; use crate::jets::Result; use crate::noun::{IndirectAtom, Noun}; -use ares_crypto::sha::{ac_sha1, ac_shal, ac_shas, ac_shay}; +use sword_crypto::sha::{ac_sha1, ac_shal, ac_shas, ac_shay}; crate::gdb!(); diff --git a/rust/ares/src/jets/lute.rs b/rust/sword/src/jets/lute.rs similarity index 99% rename from rust/ares/src/jets/lute.rs rename to rust/sword/src/jets/lute.rs index 9610407..bcd74aa 100644 --- a/rust/ares/src/jets/lute.rs +++ b/rust/sword/src/jets/lute.rs @@ -4,7 +4,7 @@ use crate::interpreter::{interpret, Context}; use crate::jets::util::*; use crate::jets::Result; use crate::noun::{Noun, D, NO, NONE, T, YES}; -use ares_macros::tas; +use sword_macros::tas; crate::gdb!(); diff --git a/rust/ares/src/jets/math.rs b/rust/sword/src/jets/math.rs similarity index 100% rename from rust/ares/src/jets/math.rs rename to rust/sword/src/jets/math.rs diff --git a/rust/ares/src/jets/nock.rs b/rust/sword/src/jets/nock.rs similarity index 99% rename from rust/ares/src/jets/nock.rs rename to rust/sword/src/jets/nock.rs index 9c5964f..1aae3ac 100644 --- a/rust/ares/src/jets/nock.rs +++ b/rust/sword/src/jets/nock.rs @@ -77,7 +77,7 @@ pub mod util { use crate::jets::form::util::scow; use crate::mem::NockStack; use crate::noun::{tape, Cell, Noun, D, T}; - use ares_macros::tas; + use sword_macros::tas; use either::{Left, Right}; use std::result; @@ -181,7 +181,7 @@ pub mod util { // handler stack at the time of failure (i.e. the scry handler stack in the context // after a failed scry) with the scry handler stack at the time of the virtualization // call. Thus, whenever a virtualized interpret() call fails with a - // Error::ScryCrashed, jet_mink() compares the two scry handler stack Nouns> If they + // Error::ScryCrashed, jet_mink() compsword the two scry handler stack Nouns> If they // are identical, jet_mink() bails with Error::Deterministic. Otherwise, it forwards // the Error::ScryCrashed to the senior virtualization call. if unsafe { context.scry_stack.raw_equals(scry_snapshot) } { diff --git a/rust/ares/src/jets/parse.rs b/rust/sword/src/jets/parse.rs similarity index 100% rename from rust/ares/src/jets/parse.rs rename to rust/sword/src/jets/parse.rs diff --git a/rust/ares/src/jets/serial.rs b/rust/sword/src/jets/serial.rs similarity index 100% rename from rust/ares/src/jets/serial.rs rename to rust/sword/src/jets/serial.rs diff --git a/rust/ares/src/jets/sort.rs b/rust/sword/src/jets/sort.rs similarity index 100% rename from rust/ares/src/jets/sort.rs rename to rust/sword/src/jets/sort.rs diff --git a/rust/ares/src/jets/tree.rs b/rust/sword/src/jets/tree.rs similarity index 100% rename from rust/ares/src/jets/tree.rs rename to rust/sword/src/jets/tree.rs diff --git a/rust/ares/src/jets/warm.rs b/rust/sword/src/jets/warm.rs similarity index 100% rename from rust/ares/src/jets/warm.rs rename to rust/sword/src/jets/warm.rs diff --git a/rust/ares/src/lib.rs b/rust/sword/src/lib.rs similarity index 98% rename from rust/ares/src/lib.rs rename to rust/sword/src/lib.rs index e7c37ec..85c1513 100644 --- a/rust/ares/src/lib.rs +++ b/rust/sword/src/lib.rs @@ -64,7 +64,7 @@ mod tests { #[test] fn tas() { - use ares_macros::tas; + use sword_macros::tas; assert_eq!(tas!(b"cut"), 0x747563); assert_eq!(tas!(b"dec"), 0x636564); assert_eq!(tas!(b"prop"), 0x706f7270); diff --git a/rust/ares/src/main.rs b/rust/sword/src/main.rs similarity index 53% rename from rust/ares/src/main.rs rename to rust/sword/src/main.rs index 483f08f..3681fe1 100644 --- a/rust/ares/src/main.rs +++ b/rust/sword/src/main.rs @@ -1,5 +1,5 @@ -use ares::jets::hot::URBIT_HOT_STATE; -use ares::serf::serf; +use sword::jets::hot::URBIT_HOT_STATE; +use sword::serf::serf; use std::env; use std::io; @@ -16,19 +16,19 @@ fn main() -> io::Result<()> { let filename = env::args().nth(1).expect("Must provide input filename"); if filename == "see gdb! definition in lib.rs about this" { - ares::interpreter::use_gdb(); - ares::jets::use_gdb(); - ares::jets::bits::use_gdb(); - ares::jets::hash::use_gdb(); - ares::jets::math::use_gdb(); - ares::jets::nock::use_gdb(); - ares::jets::tree::use_gdb(); - ares::mem::use_gdb(); - ares::mug::use_gdb(); - ares::newt::use_gdb(); - ares::noun::use_gdb(); - ares::serf::use_gdb(); - ares::serialization::use_gdb(); + sword::interpreter::use_gdb(); + sword::jets::use_gdb(); + sword::jets::bits::use_gdb(); + sword::jets::hash::use_gdb(); + sword::jets::math::use_gdb(); + sword::jets::nock::use_gdb(); + sword::jets::tree::use_gdb(); + sword::mem::use_gdb(); + sword::mug::use_gdb(); + sword::newt::use_gdb(); + sword::noun::use_gdb(); + sword::serf::use_gdb(); + sword::serialization::use_gdb(); } if filename == "serf" { diff --git a/rust/ares/src/mem.rs b/rust/sword/src/mem.rs similarity index 100% rename from rust/ares/src/mem.rs rename to rust/sword/src/mem.rs diff --git a/rust/ares/src/mug.rs b/rust/sword/src/mug.rs similarity index 100% rename from rust/ares/src/mug.rs rename to rust/sword/src/mug.rs diff --git a/rust/ares/src/newt.rs b/rust/sword/src/newt.rs similarity index 99% rename from rust/ares/src/newt.rs rename to rust/sword/src/newt.rs index fcbff25..26224e4 100644 --- a/rust/ares/src/newt.rs +++ b/rust/sword/src/newt.rs @@ -54,7 +54,7 @@ use crate::interpreter::Slogger; use crate::mem::NockStack; use crate::noun::{IndirectAtom, Noun, D, T}; use crate::serialization::{cue, jam}; -use ares_macros::tas; +use sword_macros::tas; use either::Either; use std::io::{Read, Write}; use std::os::unix::prelude::FromRawFd; diff --git a/rust/ares/src/noun.rs b/rust/sword/src/noun.rs similarity index 99% rename from rust/ares/src/noun.rs rename to rust/sword/src/noun.rs index 1e2489f..4487a26 100644 --- a/rust/ares/src/noun.rs +++ b/rust/sword/src/noun.rs @@ -1,5 +1,5 @@ use crate::mem::{word_size_of, NockStack}; -use ares_macros::tas; +use sword_macros::tas; use bitvec::prelude::{BitSlice, Lsb0}; use either::{Either, Left, Right}; use ibig::{Stack, UBig}; diff --git a/rust/ares/src/persist.rs b/rust/sword/src/persist.rs similarity index 99% rename from rust/ares/src/persist.rs rename to rust/sword/src/persist.rs index f13abc5..f08b277 100644 --- a/rust/ares/src/persist.rs +++ b/rust/sword/src/persist.rs @@ -1,6 +1,6 @@ use crate::mem::NockStack; use crate::noun::{Allocated, Atom, Cell, CellMemory, IndirectAtom, Noun}; -use ares_pma::*; +use sword_pma::*; use either::Either::{Left, Right}; use std::convert::TryInto; use std::ffi::{c_void, CString}; diff --git a/rust/ares/src/serf.rs b/rust/sword/src/serf.rs similarity index 99% rename from rust/ares/src/serf.rs rename to rust/sword/src/serf.rs index c618f2e..9d07ed2 100644 --- a/rust/ares/src/serf.rs +++ b/rust/sword/src/serf.rs @@ -13,7 +13,7 @@ use crate::persist::pma_meta_set; use crate::persist::{pma_meta_get, pma_open, pma_sync, Persist}; use crate::trace::*; use crate::{flog, interpreter}; -use ares_macros::tas; +use sword_macros::tas; use signal_hook; use signal_hook::consts::SIGINT; use std::fs::create_dir_all; diff --git a/rust/ares/src/serialization.rs b/rust/sword/src/serialization.rs similarity index 100% rename from rust/ares/src/serialization.rs rename to rust/sword/src/serialization.rs diff --git a/rust/ares/src/trace.rs b/rust/sword/src/trace.rs similarity index 99% rename from rust/ares/src/trace.rs rename to rust/sword/src/trace.rs index 96c10e9..6becc25 100644 --- a/rust/ares/src/trace.rs +++ b/rust/sword/src/trace.rs @@ -5,7 +5,7 @@ use crate::jets::form::util::scow; use crate::mem::NockStack; use crate::mug::met3_usize; use crate::noun::{Atom, DirectAtom, IndirectAtom, Noun}; -use ares_macros::tas; +use sword_macros::tas; use either::Either::*; use json::object; use std::fs::{create_dir_all, File}; diff --git a/rust/ares/src/unifying_equality.rs b/rust/sword/src/unifying_equality.rs similarity index 100% rename from rust/ares/src/unifying_equality.rs rename to rust/sword/src/unifying_equality.rs diff --git a/rust/ares/updates/9-20-2023.md b/rust/sword/updates/9-20-2023.md similarity index 100% rename from rust/ares/updates/9-20-2023.md rename to rust/sword/updates/9-20-2023.md diff --git a/rust/ares_crypto/Cargo.toml b/rust/sword_crypto/Cargo.toml similarity index 83% rename from rust/ares_crypto/Cargo.toml rename to rust/sword_crypto/Cargo.toml index f90df52..599113e 100644 --- a/rust/ares_crypto/Cargo.toml +++ b/rust/sword_crypto/Cargo.toml @@ -1,15 +1,13 @@ [package] -name = "ares_crypto" +name = "sword_crypto" version = "0.1.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -# use this when debugging requires allocation (e.g. eprintln) -# assert_no_alloc = { path = "../rust-assert-no-alloc", features=["warn_debug"] } -assert_no_alloc = { path = "../rust-assert-no-alloc" } -ibig = "0.3.6" +assert_no_alloc = { path = "../assert_no_alloc" } +ibig = { path = "../ibig" } # ed25519 curve25519-dalek = {version = "4.1.1", default-features = false, optional = true } diff --git a/rust/ares_crypto/src/aes_siv.rs b/rust/sword_crypto/src/aes_siv.rs similarity index 98% rename from rust/ares_crypto/src/aes_siv.rs rename to rust/sword_crypto/src/aes_siv.rs index c540938..844f662 100644 --- a/rust/ares_crypto/src/aes_siv.rs +++ b/rust/sword_crypto/src/aes_siv.rs @@ -120,9 +120,9 @@ pub fn ac_aes_siv_de( #[cfg(test)] #[cfg(feature = "test_vs_urcrypt")] -/// Compare the results of the ares_crypto functions with the corresponding +/// Compare the results of the sword_crypto functions with the corresponding /// urcrypt functions. To run, use `cargo test --features test_vs_urcrypt` -/// from the `ares/rust/ares_crypto` directory. +/// from the `sword/rust/sword_crypto` directory. mod urcrypt_tests { use super::ac_aes_siv_en; use aes_siv::aead::rand_core::CryptoRngCore; diff --git a/rust/ares_crypto/src/ed25519.rs b/rust/sword_crypto/src/ed25519.rs similarity index 98% rename from rust/ares_crypto/src/ed25519.rs rename to rust/sword_crypto/src/ed25519.rs index 54b9083..235412f 100644 --- a/rust/ares_crypto/src/ed25519.rs +++ b/rust/sword_crypto/src/ed25519.rs @@ -107,9 +107,9 @@ mod tests { #[cfg(test)] #[cfg(feature = "test_vs_urcrypt")] -/// Compare the results of the ares_crypto functions with the corresponding +/// Compare the results of the sword_crypto functions with the corresponding /// urcrypt functions. To run, use `cargo test --features test_vs_urcrypt` -/// from the `ares/rust/ares_crypto` directory. +/// from the `sword/rust/sword_crypto` directory. mod urcrypt_tests { use super::{ac_ed_puck, ac_ed_shar, ac_ed_sign, ac_ed_veri}; use ibig::ubig; diff --git a/rust/ares_crypto/src/lib.rs b/rust/sword_crypto/src/lib.rs similarity index 100% rename from rust/ares_crypto/src/lib.rs rename to rust/sword_crypto/src/lib.rs diff --git a/rust/ares_crypto/src/sha.rs b/rust/sword_crypto/src/sha.rs similarity index 96% rename from rust/ares_crypto/src/sha.rs rename to rust/sword_crypto/src/sha.rs index 51eedde..afa54eb 100644 --- a/rust/ares_crypto/src/sha.rs +++ b/rust/sword_crypto/src/sha.rs @@ -47,9 +47,9 @@ pub fn ac_shas(message: &mut [u8], salt: &mut [u8], out: &mut [u8]) { #[cfg(test)] #[cfg(feature = "test_vs_urcrypt")] -/// Compare the results of the ares_crypto functions with the corresponding +/// Compare the results of the sword_crypto functions with the corresponding /// urcrypt functions. To run, use `cargo test --features test_vs_urcrypt` -/// from the `ares/rust/ares_crypto` directory. +/// from the `sword/rust/sword_crypto` directory. mod urcrypt_tests { use super::{ac_sha1, ac_shal, ac_shas, ac_shay}; use urcrypt_sys::{urcrypt_sha1, urcrypt_shal, urcrypt_shas, urcrypt_shay}; diff --git a/rust/ares_guard/Cargo.toml b/rust/sword_guard/Cargo.toml similarity index 91% rename from rust/ares_guard/Cargo.toml rename to rust/sword_guard/Cargo.toml index 66b6eab..56def3b 100644 --- a/rust/ares_guard/Cargo.toml +++ b/rust/sword_guard/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "ares_guard" +name = "sword_guard" version = "0.1.0" edition = "2021" diff --git a/rust/ares_guard/build.rs b/rust/sword_guard/build.rs similarity index 100% rename from rust/ares_guard/build.rs rename to rust/sword_guard/build.rs diff --git a/rust/ares_guard/c-src/guard.c b/rust/sword_guard/c-src/guard.c similarity index 100% rename from rust/ares_guard/c-src/guard.c rename to rust/sword_guard/c-src/guard.c diff --git a/rust/ares_guard/c-src/guard.h b/rust/sword_guard/c-src/guard.h similarity index 100% rename from rust/ares_guard/c-src/guard.h rename to rust/sword_guard/c-src/guard.h diff --git a/rust/ares_guard/c-src/wrapper.h b/rust/sword_guard/c-src/wrapper.h similarity index 100% rename from rust/ares_guard/c-src/wrapper.h rename to rust/sword_guard/c-src/wrapper.h diff --git a/rust/ares_guard/src/lib.rs b/rust/sword_guard/src/lib.rs similarity index 100% rename from rust/ares_guard/src/lib.rs rename to rust/sword_guard/src/lib.rs diff --git a/rust/ares_macros/Cargo.toml b/rust/sword_macros/Cargo.toml similarity index 83% rename from rust/ares_macros/Cargo.toml rename to rust/sword_macros/Cargo.toml index dd2bd71..1bfd53c 100644 --- a/rust/ares_macros/Cargo.toml +++ b/rust/sword_macros/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "ares_macros" +name = "sword_macros" version = "0.1.0" edition = "2021" diff --git a/rust/ares_macros/src/lib.rs b/rust/sword_macros/src/lib.rs similarity index 100% rename from rust/ares_macros/src/lib.rs rename to rust/sword_macros/src/lib.rs diff --git a/rust/ares_pma/Cargo.toml b/rust/sword_pma/Cargo.toml similarity index 92% rename from rust/ares_pma/Cargo.toml rename to rust/sword_pma/Cargo.toml index 94612e4..598e98f 100644 --- a/rust/ares_pma/Cargo.toml +++ b/rust/sword_pma/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "ares_pma" +name = "sword_pma" version = "0.1.0" edition = "2018" diff --git a/rust/ares_pma/build.rs b/rust/sword_pma/build.rs similarity index 100% rename from rust/ares_pma/build.rs rename to rust/sword_pma/build.rs diff --git a/rust/ares_pma/c-src/btest-overrides.h b/rust/sword_pma/c-src/btest-overrides.h similarity index 100% rename from rust/ares_pma/c-src/btest-overrides.h rename to rust/sword_pma/c-src/btest-overrides.h diff --git a/rust/ares_pma/c-src/btest.c b/rust/sword_pma/c-src/btest.c similarity index 100% rename from rust/ares_pma/c-src/btest.c rename to rust/sword_pma/c-src/btest.c diff --git a/rust/ares_pma/c-src/btree.c b/rust/sword_pma/c-src/btree.c similarity index 99% rename from rust/ares_pma/c-src/btree.c rename to rust/sword_pma/c-src/btree.c index a314e28..882a1fd 100644 --- a/rust/ares_pma/c-src/btree.c +++ b/rust/sword_pma/c-src/btree.c @@ -270,7 +270,7 @@ struct BT_meta { uint16_t _pad1; pgno_t root; /* 64bit alignment manually checked - 72 bytes total above */ - uint64_t roots[BT_NUMROOTS]; /* for usage by ares */ + uint64_t roots[BT_NUMROOTS]; /* for usage by sword */ uint32_t chk; /* checksum */ } __packed; static_assert(sizeof(BT_meta) <= BT_DAT_MAXBYTES); diff --git a/rust/ares_pma/c-src/btree.h b/rust/sword_pma/c-src/btree.h similarity index 100% rename from rust/ares_pma/c-src/btree.h rename to rust/sword_pma/c-src/btree.h diff --git a/rust/ares_pma/c-src/lib/checksum.c b/rust/sword_pma/c-src/lib/checksum.c similarity index 100% rename from rust/ares_pma/c-src/lib/checksum.c rename to rust/sword_pma/c-src/lib/checksum.c diff --git a/rust/ares_pma/c-src/lib/checksum.h b/rust/sword_pma/c-src/lib/checksum.h similarity index 100% rename from rust/ares_pma/c-src/lib/checksum.h rename to rust/sword_pma/c-src/lib/checksum.h diff --git a/rust/ares_pma/c-src/wrapper.h b/rust/sword_pma/c-src/wrapper.h similarity index 100% rename from rust/ares_pma/c-src/wrapper.h rename to rust/sword_pma/c-src/wrapper.h diff --git a/rust/ares_pma/src/lib.rs b/rust/sword_pma/src/lib.rs similarity index 100% rename from rust/ares_pma/src/lib.rs rename to rust/sword_pma/src/lib.rs