commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
d5a4190ea83a5bf3851f8cb434a39c8532bf0b4f
Steven Allen
2023-12-28T13:38:06
chore: release 1.2.0
diff --git a/Cargo.toml b/Cargo.toml index fc493428..29015726 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "xattr" edition = "2021" -version = "1.1.3" +version = "1.2.0" authors = ["Steven Allen <steven@stebalien.com>"] description = "unix extended filesystem attributes"
1
1
1
cbdb0f79b98e536f4d355b13aee2bd8b475273ad
Vitaly Shupak
2023-12-28T13:36:51
Add _deref variants for all the path functions (#55) These function variants follow symlinks. In some cases, such as for /proc fs, it's not possible to call the original functions on the symlink target manually. Resolves #39
diff --git a/src/lib.rs b/src/lib.rs index a5ffe063..d15f1a53 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,9 +8,9 @@ //! An extension trait [`FileExt`] is provided to directly work with //! standard `File` objects and file descriptors. //! -//! NOTE: In case of a symlink as path argument, all methods -//! in this ...
4
77
32
ed193c3ea47c438b67752063afcae60e2294263a
Steven Allen
2023-12-12T17:34:16
chore: release v1.1.3
diff --git a/Cargo.toml b/Cargo.toml index e9ddf32b..fc493428 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "xattr" edition = "2021" -version = "1.1.2" +version = "1.1.3" authors = ["Steven Allen <steven@stebalien.com>"] description = "unix extended filesystem attributes"
1
1
1
2352bdc50f5f2e5fafb3afee67c06f793d31eb85
Steven Allen
2023-12-12T17:33:56
fix: fix build on unsupported platforms (#53)
diff --git a/src/sys/bsd.rs b/src/sys/bsd.rs index 322329e7..a3f1c091 100644 --- a/src/sys/bsd.rs +++ b/src/sys/bsd.rs @@ -18,6 +18,8 @@ use libc::{ use crate::util::allocate_loop; +pub const ENOATTR: i32 = libc::ENOATTR; + const EXTATTR_NAMESPACE_USER_STRING: &str = "user"; const EXTATTR_NAMESPACE_SYSTEM_STRING...
4
12
8
7305b704a2427a864895a4f20cab593cab0b3f74
LongYinan
2023-12-12T17:16:40
fix: android build (#49)
diff --git a/src/util.rs b/src/util.rs index 347355ea..e8814156 100644 --- a/src/util.rs +++ b/src/util.rs @@ -1,7 +1,7 @@ use std::io; pub fn extract_noattr(result: io::Result<Vec<u8>>) -> io::Result<Option<Vec<u8>>> { - #[cfg(target_os = "linux")] + #[cfg(any(target_os = "linux", target_os = "android"))] ...
1
1
1
4282c59ce5687f3d54c41116ce12151743c7157c
Steven Allen
2023-12-10T02:00:33
chore: release v1.1.2 Re-adds rustix support.
diff --git a/Cargo.toml b/Cargo.toml index 6fc46bb4..e9ddf32b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "xattr" edition = "2021" -version = "1.1.1" +version = "1.1.2" authors = ["Steven Allen <steven@stebalien.com>"] description = "unix extended filesystem attributes"
1
1
1
a783b2481bf054e7a4bc493d5f9e45ed1e2d374e
John Nunley
2023-12-10T01:59:50
Re-add rustix support (#47) * Reapply "Replace libc in Linux with rustix (#41)" This reverts commit 2cf71bc2090beaad9402e8e0daddc73bfe8f7b67. * Bump rustix to 0.38.28 This also adds rustix's net feature to dev dependencies, which should hopefully prevent the miscompilation. --------- Signed-off-by: Joh...
diff --git a/Cargo.toml b/Cargo.toml index f7825ce7..6fc46bb4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,8 +20,20 @@ default = ["unsupported"] # platforms. This would make sense if you absolutely need xattr support. unsupported = [] -[dependencies] -libc = "0.2.147" +[dependencies.rustix] +version = "0.38.28" ...
11
285
374
755e2f31ae610569eb317902b73c180815d858e7
Steven Allen
2023-12-09T12:29:02
chore: release v1.1.1 This reverts rustix support until enabling the "std" feature no longer causes downstream breakage. See: - https://github.com/bytecodealliance/rustix/issues/945 - https://github.com/Stebalien/xattr/issues/44
diff --git a/Cargo.toml b/Cargo.toml index 327b3ebf..f7825ce7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "xattr" edition = "2021" -version = "1.1.0" +version = "1.1.1" authors = ["Steven Allen <steven@stebalien.com>"] description = "unix extended filesystem attributes"
1
1
1
2cf71bc2090beaad9402e8e0daddc73bfe8f7b67
Steven Allen
2023-12-09T12:27:43
Revert "Replace libc in Linux with rustix (#41)" This reverts commit fce3cc20dde9c811629dbc35d16c0137534e0ef9. Unfortunately, this turned out to be a breaking change #44.
diff --git a/Cargo.toml b/Cargo.toml index 66ff15d6..327b3ebf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,19 +20,8 @@ default = ["unsupported"] # platforms. This would make sense if you absolutely need xattr support. unsupported = [] -[dependencies.rustix] -version = "0.38.25" -default-features = false -feature...
11
374
284
c565e63c1bcd733e952ad594e2188c9ee57334e8
Steven Allen
2023-12-09T05:57:25
chore: release v1.1.0
diff --git a/Cargo.toml b/Cargo.toml index ff0a6cf5..66ff15d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "xattr" edition = "2021" -version = "1.0.1" +version = "1.1.0" authors = ["Steven Allen <steven@stebalien.com>"] description = "unix extended filesystem attributes"
1
1
1
fce3cc20dde9c811629dbc35d16c0137534e0ef9
John Nunley
2023-12-09T05:53:31
Replace libc in Linux with rustix (#41) rustix is a crate which provides I/O-safe wrappers around raw system calls on Linux and libc on other Unixes. This PR makes it so the functions in this crate call the rustix functions. This has a number of benefits. It removes a substantial amount of unsafe code from this ...
diff --git a/Cargo.toml b/Cargo.toml index 0c55ed19..ff0a6cf5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,8 +20,19 @@ default = ["unsupported"] # platforms. This would make sense if you absolutely need xattr support. unsupported = [] -[dependencies] -libc = "0.2.147" +[dependencies.rustix] +version = "0.38.25" ...
11
284
374
4d4b72ede927a22e7557ef2d181bf25215e58e2c
Steven Allen
2023-07-29T23:39:14
chore: release v1.0.1 to fix unsupported import (#38)
diff --git a/Cargo.toml b/Cargo.toml index f4c159c2..0c55ed19 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "xattr" edition = "2021" -version = "1.0.0" +version = "1.0.1" authors = ["Steven Allen <steven@stebalien.com>"] description = "unix extended filesystem attributes"
1
1
1
db512dd8a09bdeca415a22b25916c21f5ada4735
Eric Marsden
2023-05-28T14:31:08
Resolve import of UnsupportedPlatformError (#34) Co-authored-by: Eric Marsden <eric.marsden@foncsi.org>
diff --git a/src/sys/unsupported.rs b/src/sys/unsupported.rs index ced3a393..b0169360 100644 --- a/src/sys/unsupported.rs +++ b/src/sys/unsupported.rs @@ -3,7 +3,7 @@ use std::io; use std::os::unix::io::RawFd; use std::path::Path; -use UnsupportedPlatformError; +use crate::UnsupportedPlatformError; /// An iterat...
1
1
1
036cc12f99f38e601e3e603d8e2544d0aeca4868
Steven Allen
2022-11-29T04:12:07
chore: release 1.0.0 - Move to rust 2021 edition. - Use libc for most syscall definitions. BREAKING: Change the unsupported error kind from `io::ErrorKind::Other` to `io::ErrorKind::Unsupported`
diff --git a/Cargo.toml b/Cargo.toml index 507193a2..b3324c05 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "xattr" edition = "2021" -version = "0.2.3" +version = "1.0.0" authors = ["Steven Allen <steven@stebalien.com>"] description = "unix extended filesystem attributes"
1
1
1
a60ad02d2f6c940290c894ba5007104a5dea6148
Steven Allen
2022-11-29T03:57:53
fix: macos build
diff --git a/src/sys/linux_macos/macos.rs b/src/sys/linux_macos/macos.rs index 88c2a8b5..ab94e87a 100644 --- a/src/sys/linux_macos/macos.rs +++ b/src/sys/linux_macos/macos.rs @@ -1,4 +1,4 @@ -use libc::{c_char, c_int, c_void, size_t, ssize_t, uint32_t}; +use libc::{c_char, c_int, c_void, size_t, ssize_t}; const XATT...
1
2
2
453a7d549006feeee998469263d5ca545fa8e82f
Steven Allen
2022-11-29T03:44:41
chore: 2021 edition and friends
diff --git a/Cargo.toml b/Cargo.toml index ca66a7c6..507193a2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,6 @@ [package] name = "xattr" +edition = "2021" version = "0.2.3" authors = ["Steven Allen <steven@stebalien.com>"] description = "unix extended filesystem attributes" diff --git a/src/lib.rs b/src/lib...
7
18
16
33d021038a528c3bca99d3bf8fcc89b45dd0fda9
Alan Somers
2018-10-30T16:55:26
Use libc's definitions where possible This not only reduces total code size (since xattr already depends on libc anyway), but also leverages libc's CI to ensure that the FFI bindings are correct.
diff --git a/Cargo.toml b/Cargo.toml index c0529b21..ca66a7c6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ default = ["unsupported"] unsupported = [] [dependencies] -libc = "0.2" +libc = "0.2.44" [dev-dependencies] tempfile = "3" diff --git a/src/sys/bsd.rs b/src/sys/bsd.rs index 910fbbdf..4b8999d...
4
25
148
d7356594d535eb1bde46879d2c03412aa8d7afc5
Steven Allen
2022-10-15T22:23:18
fix: use ErrorKind::Unsupported where the platform is unsupported Consistent with stdlib.
diff --git a/src/error.rs b/src/error.rs index f17503e9..870d1c18 100644 --- a/src/error.rs +++ b/src/error.rs @@ -4,7 +4,7 @@ use std::fmt; /// The error type returned on unsupported platforms. /// /// On unsupported platforms, all operations will fail with an `io::Error` with -/// a kind `io::ErrorKind::Other` and...
2
9
9
e9d600557b3b958c3bb436acb3efe20b5445ce64
Justin Tracey
2022-04-15T00:13:49
add Android as supported platform
diff --git a/src/sys/linux_macos/mod.rs b/src/sys/linux_macos/mod.rs index 85f1b5d7..c0e86fe3 100644 --- a/src/sys/linux_macos/mod.rs +++ b/src/sys/linux_macos/mod.rs @@ -1,7 +1,7 @@ -#[cfg(target_os = "linux")] +#[cfg(any(target_os = "linux", target_os = "android"))] mod linux; -#[cfg(target_os = "linux")] +#[cfg(a...
2
3
3
d7daa2ec4b899f05b3560a7260932ed93fc105b3
Steven Allen
2018-12-08T00:58:22
don't compile everything when testing We're now going test FreeBSD on CI. alternative to #21
diff --git a/src/sys/mod.rs b/src/sys/mod.rs index 00ab45c4..c3257c71 100644 --- a/src/sys/mod.rs +++ b/src/sys/mod.rs @@ -1,7 +1,7 @@ macro_rules! platforms { ($($($platform:expr);* => $module:ident),*) => { $( - #[cfg(any(test, $(target_os = $platform),*))] + #[cfg(any($(target_os...
1
2
2
4c825ceaa7223fa40322025003a8ba02d8d4a785
Steven Allen
2018-07-06T04:20:57
release 0.2.2
diff --git a/Cargo.toml b/Cargo.toml index a1357b52..10310988 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xattr" -version = "0.2.1" +version = "0.2.2" authors = ["Steven Allen <steven@stebalien.com>"] description = "unix extended filesystem attributes"
1
1
1
5f18e8d20ddb0a16bd0d6ba58251609e2df12714
Steven Allen
2018-07-06T01:46:23
make sure tests can be run on unsupported platforms
diff --git a/src/sys/bsd.rs b/src/sys/bsd.rs index 7f489a57..910fbbdf 100644 --- a/src/sys/bsd.rs +++ b/src/sys/bsd.rs @@ -10,8 +10,6 @@ use std::path::Path; use libc::{c_char, c_int, c_void, size_t, ssize_t, EPERM}; use util::{allocate_loop, path_to_c}; -pub const ENOATTR: ::libc::c_int = ::libc::ENOATTR; - const...
4
6
7
b25f9f744ebd65e3d6c4bdd1f0f1f368a249ebde
Steven Allen
2018-07-06T01:27:08
build all platforms when testing (and macroify the platform code a bit) We may need to remove this if we ever add code that simply won't *compile* on other platforms but this makes hacking on this package easier.
diff --git a/src/sys/mod.rs b/src/sys/mod.rs index c8ac5cd4..2754e9c2 100644 --- a/src/sys/mod.rs +++ b/src/sys/mod.rs @@ -1,36 +1,34 @@ -#[cfg(any(target_os = "macos", target_os = "linux"))] -mod linux_macos; +macro_rules! platforms { + ($($($platform:expr);* => $module:ident),*) => { + $( + #[cfg...
1
29
31
716bc0e73444d38f5eddd677c2ef87f8bf0ad1d9
Steven Allen
2018-06-22T18:56:24
fix compiling on unsupported platforms fixes #18
diff --git a/src/sys/bsd.rs b/src/sys/bsd.rs index 910fbbdf..7f489a57 100644 --- a/src/sys/bsd.rs +++ b/src/sys/bsd.rs @@ -10,6 +10,8 @@ use std::path::Path; use libc::{c_char, c_int, c_void, size_t, ssize_t, EPERM}; use util::{allocate_loop, path_to_c}; +pub const ENOATTR: ::libc::c_int = ::libc::ENOATTR; + const...
4
13
1
623d26f26af57bb3c928b6285b58464efaa2bf09
Luca Bruno
2018-05-17T14:28:50
lib: add some more rustdocs This adds a few missing docstring on public entries, it expands the crate description and provides a very simple example too.
diff --git a/src/lib.rs b/src/lib.rs index 51eec0ff..bf00b37f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,30 @@ -//! Manage extended attributes. +//! A pure-Rust library to manage extended attributes. //! -//! Note: This library *does not* follow symlinks. +//! It provides support for manipulating extended att...
4
31
3
cf3d2d65ec09f54a564330d43614ba26081ffaab
Igor Gnatenko
2018-05-10T09:39:45
deps: update tempfile to 3
diff --git a/Cargo.toml b/Cargo.toml index 3130f1dd..a1357b52 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,4 +23,4 @@ unsupported = [] libc = "0.2" [dev-dependencies] -tempfile = "2" +tempfile = "3"
1
1
1
0f5eb268be591b1c82e559a86f87775ef6b4af7a
Steven Allen
2018-04-01T17:46:06
clippy lint
diff --git a/src/util.rs b/src/util.rs index 03f5b09a..076159c9 100644 --- a/src/util.rs +++ b/src/util.rs @@ -26,7 +26,7 @@ pub fn path_to_c(path: &Path) -> io::Result<CString> { } pub fn extract_noattr(result: io::Result<Vec<u8>>) -> io::Result<Option<Vec<u8>>> { - result.map(|v| Some(v)).or_else(|e| match e.r...
1
1
1
62a1153a65e8ed8132865dddf343cc7656c87749
Steven Allen
2018-04-01T00:21:54
move documentation to docs.rs
diff --git a/Cargo.toml b/Cargo.toml index 4a40d1e4..3130f1dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ version = "0.2.1" authors = ["Steven Allen <steven@stebalien.com>"] description = "unix extended filesystem attributes" -documentation = "https://stebalien.github.io/xattr/xattr/" +documentation = ...
1
1
1
3b78def24309826d9976e1732cb242ae1a2e8ef8
Steven Allen
2018-04-01T00:20:30
replace try with ?
diff --git a/src/sys/bsd.rs b/src/sys/bsd.rs index 82a939f6..eb535549 100644 --- a/src/sys/bsd.rs +++ b/src/sys/bsd.rs @@ -142,7 +142,7 @@ fn name_to_ns(name: &OsStr) -> io::Result<(c_int, CString)> { None => return Err(io::Error::new(io::ErrorKind::InvalidInput, "no matching namespace")), }; - Ok((n...
2
23
23
035b839e042a1cef4cf4e3d3fec89ffe100c7ac8
Steven Allen
2017-07-21T17:47:08
Release 0.2.1 * Fix detecting missing attributes on macos (thanks @griff).
diff --git a/Cargo.toml b/Cargo.toml index 049ffa4b..4a40d1e4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xattr" -version = "0.2.0" +version = "0.2.1" authors = ["Steven Allen <steven@stebalien.com>"] description = "unix extended filesystem attributes"
1
1
1
0d637ae981645ac6ae441b42d782aa95cd9b71cf
Brian Olsen
2017-07-16T14:51:39
Use ENOATTR to detect missing attribute On MacOS ENOATTR is returned as the error in get instead of ENODATA and on Linux ENOATTR is just an alias for ENODATA. So this commit simply uses ENOATTR instead of ENODATA.
diff --git a/src/util.rs b/src/util.rs index e21ef47a..76d2b55f 100644 --- a/src/util.rs +++ b/src/util.rs @@ -5,7 +5,8 @@ use std::ptr; use std::ffi::CString; use std::path::Path; -use libc::{ERANGE, ENODATA, ssize_t}; +use libc::{ERANGE, ENOATTR, ssize_t}; + #[allow(dead_code)] pub fn name_to_c(name: &OsStr) ...
1
3
2
20dd92b02da29327a4f18caa7c4f6dc9f79953cd
Brian Olsen
2017-07-16T14:51:14
Run tests on MacOS
diff --git a/tests/main.rs b/tests/main.rs index 1141b4fc..51479260 100644 --- a/tests/main.rs +++ b/tests/main.rs @@ -8,7 +8,7 @@ use xattr::FileExt; use tempfile::{tempfile_in, NamedTempFile}; #[test] -#[cfg(any(target_os = "linux", target_os = "freebsd"))] +#[cfg(any(target_os = "linux", target_os = "freebsd", t...
1
4
4
8d32e8784e6315003c724744113af4d75921bcf0
Steven Allen
2017-07-16T07:18:13
Release 0.2.0 * Return Result<Option<...>> instead of just results on get.
diff --git a/Cargo.toml b/Cargo.toml index 21217df0..049ffa4b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xattr" -version = "0.1.11" +version = "0.2.0" authors = ["Steven Allen <steven@stebalien.com>"] description = "unix extended filesystem attributes"
1
1
1
184869ca6c82db52828383594ac08e0bccecf885
Steven Allen
2017-06-25T19:19:31
Return Result<Option<...>> instead of just results on get. This way, it's easy to determine whether the lookup *failed* or if there was simply no attribute set. Fixes #10
diff --git a/src/lib.rs b/src/lib.rs index 0f6547d3..5ae63aa4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -17,11 +17,11 @@ pub use sys::{XAttrs, SUPPORTED_PLATFORM}; pub use error::UnsupportedPlatformError; /// Get an extended attribute for the specified file. -pub fn get<N, P>(path: P, name: N) -> io::Result<Vec<u...
3
25
11
bfc6fb769bdc295eea0cf4b97ea970bc3e2c9615
Steven Allen
2017-02-27T16:26:25
Release 0.1.11 * Fix the test suite on selinux.
diff --git a/Cargo.toml b/Cargo.toml index c61aabdc..21217df0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xattr" -version = "0.1.10" +version = "0.1.11" authors = ["Steven Allen <steven@stebalien.com>"] description = "unix extended filesystem attributes"
1
1
1
67589a06aeb45eca17d94c1ad4b75ee51a16e5f2
Steven Allen
2017-02-27T07:28:01
Really fix tests with selinux.
diff --git a/tests/main.rs b/tests/main.rs index f1dd7069..2019aa98 100644 --- a/tests/main.rs +++ b/tests/main.rs @@ -43,7 +43,7 @@ fn test_path() { assert!(xattr::get(tmp.path(), "user.test").is_err()); assert_eq!(xattr::list(tmp.path()) .unwrap() - .map(|x| x.as_bytes().starts...
1
1
1
bc889657d136489898fd2002c7eff887f5ea636d
Steven Allen
2017-02-27T00:01:34
Ignore non-user xattrs in tests. This should fix tests on systems with, e.g., selinux. Fixes #9
diff --git a/tests/main.rs b/tests/main.rs index eb8baba3..f1dd7069 100644 --- a/tests/main.rs +++ b/tests/main.rs @@ -10,40 +10,61 @@ use tempfile::{tempfile_in, NamedTempFile}; #[test] #[cfg(any(target_os = "linux", target_os = "freebsd"))] fn test_fd() { + use std::os::unix::ffi::OsStrExt; // Only works o...
1
29
7
2dd44d42cc8135285d50baf726f6ea6fc2169957
Steven Allen
2016-10-02T01:16:06
Fix clippy doc warning
diff --git a/src/sys/mod.rs b/src/sys/mod.rs index e0d942c6..05d1be88 100644 --- a/src/sys/mod.rs +++ b/src/sys/mod.rs @@ -19,7 +19,8 @@ pub use self::unsupported::*; /// A constant indicating whether or not the target platform is supported. /// /// To make programmer's lives easier, this library builds on all platf...
1
2
1
0afd489d9a0283103978ac8e59f9f2c8b85cd323
Steven Allen
2016-08-23T14:19:09
Bump version to 0.1.10
diff --git a/Cargo.toml b/Cargo.toml index adf70041..c61aabdc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xattr" -version = "0.1.9" +version = "0.1.10" authors = ["Steven Allen <steven@stebalien.com>"] description = "unix extended filesystem attributes"
1
1
1
f6802d775b5e7d0250eed22b27476e9235190182
Steven Allen
2016-08-23T01:45:30
Add feature to turn off support for unsupported platforms.
diff --git a/Cargo.toml b/Cargo.toml index 5fe37c24..adf70041 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,16 @@ repository = "https://github.com/Stebalien/xattr" keywords = ["xattr", "filesystem", "unix"] license = "MIT/Apache-2.0" +[features] +default = ["unsupported"] +# Adds a dummy implementation for un...
2
15
2
501dbb481c1c4b1c6932dc1ef3b3c88f158d46eb
Steven Allen
2016-08-23T01:37:27
Add dummy interface for unsupported platforms. This just makes it easier to write portable code (of coarse, the code will fail with runtime errors on unsupported platforms but that can always happen...).
diff --git a/src/error.rs b/src/error.rs new file mode 100644 index 00000000..04b3813e --- /dev/null +++ b/src/error.rs @@ -0,0 +1,25 @@ +use std::error::Error; +use std::fmt; + +/// The error type returned on unsupported platforms. +/// +/// On unsupported platforms, all operations will fail with an `io::Error` with +...
4
95
2
e8419f845619c85f9d9be42185bbed5d3a7cdec3
Steven Allen
2016-08-23T01:00:02
Bump version
diff --git a/Cargo.toml b/Cargo.toml index dd20e328..5fe37c24 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xattr" -version = "0.1.8" +version = "0.1.9" authors = ["Steven Allen <steven@stebalien.com>"] description = "unix extended filesystem attributes"
1
1
1
52c3c7855997b3ea5479f05b58f0a4a84d29ca90
Steven Allen
2016-08-01T16:14:08
Bump version
diff --git a/Cargo.toml b/Cargo.toml index 738f3052..dd20e328 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xattr" -version = "0.1.7" +version = "0.1.8" authors = ["Steven Allen <steven@stebalien.com>"] description = "unix extended filesystem attributes"
1
1
1
3cdd2f7e0d1fb21d10e9e8c2183cddded25e6957
Pete Hayes
2016-08-01T15:14:05
Fixed bug with freebsd module due to libc upgrade
diff --git a/src/sys/freebsd.rs b/src/sys/freebsd.rs index 9b4d1e39..6bbf9acc 100644 --- a/src/sys/freebsd.rs +++ b/src/sys/freebsd.rs @@ -5,8 +5,7 @@ use std::os::unix::ffi::{OsStrExt, OsStringExt}; use std::path::Path; use std::mem; -use libc::consts::os::posix88::EPERM; -use libc::{c_char, ssize_t, size_t, c_int...
1
1
2
03d42b129294879eb5f725d5cce1f45e728ab8d6
Steven Allen
2016-05-12T04:22:11
prefer unnamed tempfiles
diff --git a/tests/main.rs b/tests/main.rs index cf5d7a6d..eb8baba3 100644 --- a/tests/main.rs +++ b/tests/main.rs @@ -5,13 +5,13 @@ use std::collections::BTreeSet; use std::ffi::OsStr; use xattr::FileExt; -use tempfile::NamedTempFile; +use tempfile::{tempfile_in, NamedTempFile}; #[test] #[cfg(any(target_os = "...
1
5
5
bb15488efc7ab42304442b07404f4c3cbfaf3152
Steven Allen
2016-05-12T04:16:56
Release 0.1.7
diff --git a/Cargo.toml b/Cargo.toml index 6f3cfc74..738f3052 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xattr" -version = "0.1.6" +version = "0.1.7" authors = ["Steven Allen <steven@stebalien.com>"] description = "unix extended filesystem attributes" @@ -13,4 +13,4 @@ license = "M...
1
2
2
359f334835651fa3a6b75f17f73e0f837546d056
nanotech
2016-05-12T03:37:51
Remove debugging println from list_fd
diff --git a/src/sys/linux_macos/mod.rs b/src/sys/linux_macos/mod.rs index 0b482679..9e0b2fbd 100644 --- a/src/sys/linux_macos/mod.rs +++ b/src/sys/linux_macos/mod.rs @@ -104,7 +104,6 @@ pub fn list_fd(fd: RawFd) -> io::Result<XAttrs> { let vec = unsafe { try!(allocate_loop(|buf, len| flistxattr(fd, buf a...
1
0
1
a5c33431e9615e56f5ca3b04e9f1ad513dec0c29
Steven Allen
2016-01-03T15:47:22
Bump to 0.1.6 Bump libc
diff --git a/Cargo.toml b/Cargo.toml index b8de4e51..6f3cfc74 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xattr" -version = "0.1.5" +version = "0.1.6" authors = ["Steven Allen <steven@stebalien.com>"] description = "unix extended filesystem attributes" @@ -10,7 +10,7 @@ keywords = [...
1
2
2
76ff41620b81fe4a477e218a8f71050589c0b717
Steven Allen
2016-01-03T15:46:04
Bump to 0.1.5
diff --git a/Cargo.toml b/Cargo.toml index c877501c..b8de4e51 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xattr" -version = "0.1.4" +version = "0.1.5" authors = ["Steven Allen <steven@stebalien.com>"] description = "unix extended filesystem attributes"
1
1
1
343d7b63f899275ad3e20f1d551f08fef35b3825
William Orr
2015-11-09T03:29:38
Implement support for FreeBSD's extended attributes
diff --git a/src/sys/freebsd.rs b/src/sys/freebsd.rs index 70b786d1..a26bd0b2 100644 --- a/src/sys/freebsd.rs +++ b/src/sys/freebsd.rs @@ -1 +1,263 @@ -// TODO +use std::io; +use std::ffi::{CString, OsStr, OsString}; +use std::os::unix::io::RawFd; +use std::os::unix::ffi::{OsStrExt,OsStringExt}; +use std::path::Path; +...
4
272
4
9c8e1be820ceae461b8dc66e3d11adc400df396d
Steven Allen
2015-09-10T16:18:51
Bump version
diff --git a/Cargo.toml b/Cargo.toml index 867b4147..c877501c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xattr" -version = "0.1.3" +version = "0.1.4" authors = ["Steven Allen <steven@stebalien.com>"] description = "unix extended filesystem attributes"
1
1
1
9bfbb1a0e59a64b1cd15def2ee060779651b9511
Steven Allen
2015-09-10T16:18:46
note that this library does not follow links
diff --git a/src/lib.rs b/src/lib.rs index 5d445a6f..e2b8efee 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,6 @@ +//! Manage extended attributes. +//! +//! Note: This library *does not* follow symlinks. extern crate libc; mod sys;
1
3
0
4e48c39a21dd1955402b0940c84f894d02492cac
Steven Allen
2015-09-10T15:57:48
Fix test
diff --git a/tests/main.rs b/tests/main.rs index 8769a935..61e77053 100644 --- a/tests/main.rs +++ b/tests/main.rs @@ -1,6 +1,8 @@ extern crate xattr; extern crate tempfile; +use std::collections::BTreeSet; +use std::ffi::OsStr; use xattr::FileExt; use tempfile::NamedTempFile; @@ -44,13 +46,17 @@ fn test_path()...
1
15
9
ae608cdc447958f0d5698c7d9523f236eab3d93e
Steven Allen
2015-09-10T14:52:18
bump version
diff --git a/Cargo.toml b/Cargo.toml index 5a3fdd1f..867b4147 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xattr" -version = "0.1.2" +version = "0.1.3" authors = ["Steven Allen <steven@stebalien.com>"] description = "unix extended filesystem attributes" @@ -10,7 +10,7 @@ keywords = [...
1
2
2
110a91c0345f038081aab63b633512a20db2b469
Steven Allen
2015-09-10T14:48:14
Fix iterating over xattrs Fixes #2
diff --git a/src/sys/linux_macos/mod.rs b/src/sys/linux_macos/mod.rs index 46e50d50..4eb3473d 100644 --- a/src/sys/linux_macos/mod.rs +++ b/src/sys/linux_macos/mod.rs @@ -53,7 +53,7 @@ impl Iterator for XAttrs { None } else { let end = data.iter().position(|&b| b == 0u8).unwrap(); // ...
2
17
1
42d491b0330dc73063c9cd0bd2ec15b42af24fa1
Steven Allen
2015-07-10T16:35:45
Fix clone for stable.
diff --git a/src/sys/linux_macos/mod.rs b/src/sys/linux_macos/mod.rs index c7e2b61d..46e50d50 100644 --- a/src/sys/linux_macos/mod.rs +++ b/src/sys/linux_macos/mod.rs @@ -37,7 +37,7 @@ impl Clone for XAttrs { self.offset = other.offset; let mut data = mem::replace(&mut self.data, Box::new([])).into_...
1
1
1
f926319af08cc344c08f8ae1dcfbb458dbde8e44
Steven Allen
2015-07-10T16:32:10
Implement clone for XAttrs.
diff --git a/src/sys/linux_macos/mod.rs b/src/sys/linux_macos/mod.rs index 949db7cb..c7e2b61d 100644 --- a/src/sys/linux_macos/mod.rs +++ b/src/sys/linux_macos/mod.rs @@ -15,17 +15,33 @@ use std::ffi::{OsStr, OsString}; use std::os::unix::io::RawFd; use std::os::unix::ffi::{OsStrExt}; use std::path::Path; +use std::...
1
17
1
8e0a7f0c35555e3e7a43c9c77f02bc7435fc604b
Steven Allen
2015-07-10T16:21:31
Iterator can be cloned.
diff --git a/src/sys/linux_macos/mod.rs b/src/sys/linux_macos/mod.rs index d1f30e8c..949db7cb 100644 --- a/src/sys/linux_macos/mod.rs +++ b/src/sys/linux_macos/mod.rs @@ -20,6 +20,7 @@ use ::libc::{c_void, size_t, c_char}; use ::util::{path_to_c, name_to_c, allocate_loop}; +#[derive(Clone)] pub struct XAttrs { ...
1
1
0
850e96ca225163a54ed5138f004bf7c68f07e87a
Steven Allen
2015-07-10T16:09:22
test by path.
diff --git a/tests/main.rs b/tests/main.rs index edf161ae..4f9ba55d 100644 --- a/tests/main.rs +++ b/tests/main.rs @@ -7,7 +7,7 @@ use tempfile::NamedTempFile; #[test] #[cfg(target_os = "linux")] -fn test() { +fn test_fd() { // Only works on "real" filesystems. let tmp = NamedTempFile::new_in("/var/tmp")....
1
18
1
61e9a01b912d4fd1303450ae16afd817b9468ad1
Tony Arcieri
2026-04-14T14:46:50
Cargo.lock: bump dependencies (#1254)
diff --git a/Cargo.lock b/Cargo.lock index f974450..61b38b2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,15 +19,15 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstyle" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang...
1
81
75
bb80eb0264089bcd0bdd5da1b250fd16566d8b74
cong-or
2026-04-03T18:44:46
Add #[inline] to mul, sub, inversion and xgcd ops (#1246) Follow-up to #1229, continuing the inlining work from #981. This adds `#[inline]` to `mul`, `sub`, `inversion`, and `xgcd` where benchmarks showed clear wins. I also tried inlining `mul_mod_special`, but it ended up being significantly slower (~2×), so I le...
diff --git a/src/int/mul.rs b/src/int/mul.rs index d614bcc..25fd02e 100644 --- a/src/int/mul.rs +++ b/src/int/mul.rs @@ -49,6 +49,7 @@ impl<const LIMBS: usize> Int<LIMBS> { } /// Multiply `self` by `rhs`, returning a concatenated "wide" result. + #[inline] #[must_use] pub const fn concatenating...
4
6
0
c2292d9dac1fd1c1846382a6da6df915e3def1e5
Andrew Whitehead
2026-03-27T16:38:52
Extend LCM support to `BoxedUint` and add a supporting trait (#1240) - Add an `lcm_vartime` method to `Uint` - Add a new `Lcm` trait, implemented by both `Uint` and `BoxedUint` --------- Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
diff --git a/src/modular/safegcd/boxed.rs b/src/modular/safegcd/boxed.rs index 8a822cb..d8ace2e 100644 --- a/src/modular/safegcd/boxed.rs +++ b/src/modular/safegcd/boxed.rs @@ -132,21 +132,14 @@ pub fn gcd<const VARTIME: bool>(f: &BoxedUint, g: &BoxedUint) -> BoxedUint { if let Some(f_nz) = f.as_nz_vartime() {...
6
158
16
8319f4ce766b32d77153e1ed2181f5b18567f8c9
Tony Arcieri
2026-03-25T19:03:34
Explicitly seal `MontyForm` (#1237) Uses the non-`pub` `sealed::Sealed` trait introduced in #1227 to explicitly mark that `MontyForm` is not intended to be impl'd by downstream crates. Unlike #1227 this isn't technically a breaking change, because it relies on one of the sealed `Unsigned`/`Integer` types also impl'in...
diff --git a/src/modular/boxed_monty_form.rs b/src/modular/boxed_monty_form.rs index 2422aee..e07c70b 100644 --- a/src/modular/boxed_monty_form.rs +++ b/src/modular/boxed_monty_form.rs @@ -14,7 +14,7 @@ use super::{ BoxedMontyParams, Retrieve, div_by_2, monty_params::MontyParams, reduction::montgomery_retriev...
3
7
2
c59fe45dc2a643856b5e060e6dcb2ab7ba01d52c
Andrew Whitehead
2026-03-25T16:00:47
Use generic implementation of bit operations for `Wrapping` (#1235) This eliminates a bunch of untested trait implementations, and adds bit operation support for `Wrapping<Limb>` --------- Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
diff --git a/src/int/bit_and.rs b/src/int/bit_and.rs index a58ba24..57e3ca7 100644 --- a/src/int/bit_and.rs +++ b/src/int/bit_and.rs @@ -2,7 +2,7 @@ use core::ops::{BitAnd, BitAndAssign}; -use crate::{CtOption, Int, Limb, Uint, Wrapping}; +use crate::{CtOption, Int, Limb, Uint}; impl<const LIMBS: usize> Int<LIM...
13
234
460
522fc1a2f8de98bcf9781c05ac227aa58558778f
Andrew Whitehead
2026-03-25T15:13:08
Add `Limb` division tests (#1234) Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
diff --git a/src/limb/div.rs b/src/limb/div.rs index 5c91cab..d3bb822 100644 --- a/src/limb/div.rs +++ b/src/limb/div.rs @@ -57,6 +57,7 @@ impl DivRemLimb for Limb { self.div_rem(rhs) } + #[inline] fn div_rem_limb_with_reciprocal(&self, rhs: &Reciprocal) -> (Self, Limb) { self.div_rem_w...
2
119
1
b0887d7cb4d1d183bf948bc44cbfd70f1b7360c5
Andrew Whitehead
2026-03-24T21:26:35
Define `Uint` division traits generically (#1232) This should support all the old div/rem trait implementations but with better test coverage, as well as `Uint`/`BoxedUint` and `Uint`/`UintRef` operations. --------- Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
diff --git a/src/uint/div.rs b/src/uint/div.rs index 389f4bc..b31d280 100644 --- a/src/uint/div.rs +++ b/src/uint/div.rs @@ -3,7 +3,7 @@ use super::div_limb::Reciprocal; use crate::{ CheckedDiv, CtOption, Div, DivAssign, DivRemLimb, DivVartime, Limb, NonZero, Rem, RemAssign, - RemLimb, RemMixed, Uint, UintRef...
1
216
309
3c7a21f03801f4f19e71b562a8407de7fb21c45e
Andrew Whitehead
2026-03-24T19:25:08
Additional methods, tests for `MontyForm` (#1230) This adds `is_zero` and `is_one` convenience methods for `MontyForm`, as well as `from_montgomery` for returning the result of `into_montgomery` to this representation. Tests are added to cover the new and existing methods for `FixedMontyForm` and `BoxedMontyForm`. -...
diff --git a/src/modular/boxed_monty_form.rs b/src/modular/boxed_monty_form.rs index 8cbced6..2422aee 100644 --- a/src/modular/boxed_monty_form.rs +++ b/src/modular/boxed_monty_form.rs @@ -199,6 +199,10 @@ impl MontyForm for BoxedMontyForm { .copy_from_slice(&other.montgomery_form.limbs); } + fn ...
6
181
6
5d6c04f16c9276ec667befb9ee992763610fea5e
Andrew Whitehead
2026-03-24T16:24:46
Add `Gcd` supertrait to `Unsigned`, `Signed` traits (#1231) This also adds basic GCD support for `Limb`. --------- Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
diff --git a/src/limb.rs b/src/limb.rs index 146eb4e..ccca9fc 100644 --- a/src/limb.rs +++ b/src/limb.rs @@ -12,6 +12,7 @@ mod ct; mod div; mod encoding; mod from; +mod gcd; mod mul; mod neg; mod shl; diff --git a/src/limb/gcd.rs b/src/limb/gcd.rs new file mode 100644 index 0000000..f3646f2 --- /dev/null +++ b/sr...
4
102
1
2c9849f7f98951ff728cf6d455b2e4057f1c94ab
cong-or
2026-03-22T17:30:44
Add `#[inline]` to shift and wrapping arithmetic ops (#1229) Went through the shift and wrapping arithmetic paths and added `#[inline]` where it was missing — mostly thin wrappers and small loop bodies in `Uint`, `Int`, and `Limb`. Stuck with `#[inline]` over `#[inline(always)]` so LLVM still gets the final say. Ran...
diff --git a/src/int/add.rs b/src/int/add.rs index c5a3c8b..15158f0 100644 --- a/src/int/add.rs +++ b/src/int/add.rs @@ -11,6 +11,7 @@ impl<const LIMBS: usize> Int<LIMBS> { } /// Perform addition, raising the `overflow` flag on overflow. + #[inline] #[must_use] pub const fn overflowing_add(&sel...
10
21
0
4182ba0bfd83ed1722e9f499b114ffe17b52ffb9
Andrew Whitehead
2026-03-20T16:28:08
Add `Invert` to `MontyForm` supertraits (#1226) Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
diff --git a/src/modular/boxed_monty_form/invert.rs b/src/modular/boxed_monty_form/invert.rs index b002543..4a5ddbf 100644 --- a/src/modular/boxed_monty_form/invert.rs +++ b/src/modular/boxed_monty_form/invert.rs @@ -64,7 +64,7 @@ impl BoxedMontyParams { #[cfg(test)] mod tests { use crate::{ - BoxedUint, ...
4
14
4
e458a92cebba8c7d7f07508f2766c2815d174bc9
Tony Arcieri
2026-03-20T16:27:50
BREAKING: seal the `Integer` trait (#1227) Note: this is a breaking change in a stable release, and hopefully the last such change we make. As a result, the v0.7.1 release will be yanked. We suspect this will not have an impact on users as it's unlikely any downstream crates have impl'd the `Integer` trait. Sealing t...
diff --git a/src/int.rs b/src/int.rs index c2b9287..38892eb 100644 --- a/src/int.rs +++ b/src/int.rs @@ -1,16 +1,5 @@ //! Stack-allocated big signed integers. -use crate::{ - Bounded, Choice, ConstOne, ConstZero, Constants, CtEq, CtOption, FixedInteger, Integer, Limb, - NonZero, Odd, One, Signed, Uint, Word, Z...
5
29
14
41b0e4f594b8772c244f92b93f3839c64a8b2695
Andrew Whitehead
2026-03-09T20:45:31
Add concat and split methods for `Uint` without complicated type bounds (#1223) Related to #1095 Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
diff --git a/src/uint/concat.rs b/src/uint/concat.rs index 01904ab..b2f10e3 100644 --- a/src/uint/concat.rs +++ b/src/uint/concat.rs @@ -8,7 +8,7 @@ impl<const LIMBS: usize> Uint<LIMBS> { where Self: Concat<LIMBS, Output = Uint<WIDE_LIMBS>>, { - Uint::concat_mixed(self, hi) + self.conca...
2
131
9
ac719ef1d9e97c8e9d9fa4046aee83e0b9d17269
Andrew Whitehead
2026-03-09T18:42:57
Improve performance of Monty `pow`/`pow_vartime` (#1222) This is mostly a simple change to access the elements of `powers_and_exponents` by reference, which improves performance by 2-3% in my tests. The constant `WINDOW_COUNT` is added to resolve an error displayed by rust-analyzer due to (I assume) the equality of e...
diff --git a/src/modular/pow.rs b/src/modular/pow.rs index a08185e..93365ba 100644 --- a/src/modular/pow.rs +++ b/src/modular/pow.rs @@ -7,6 +7,7 @@ use core::{array, mem}; use alloc::vec::Vec; const WINDOW: u32 = 4; +const WINDOW_COUNT: usize = 1 << WINDOW; const WINDOW_MASK: Word = (1 << WINDOW) - 1; #[allow(cl...
1
13
12
eb050313a58eff22a11efbaf21fa43743036c984
Andrew Whitehead
2026-03-09T18:21:16
Update `PrimeParams` to require a multiplicative generator value (#1221) This also adjusts the `const_prime_monty_params!` macro to accept the new generator parameter. The `t` constant is added to `PrimeParams` for convenience. Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
diff --git a/benches/const_monty.rs b/benches/const_monty.rs index 7405896..700a79a 100644 --- a/benches/const_monty.rs +++ b/benches/const_monty.rs @@ -202,7 +202,8 @@ fn bench_montgomery_sqrt<M: Measurement>(group: &mut BenchmarkGroup<'_, M>) { const_prime_monty_params!( P256Field, ...
5
69
83
3c38f487abffd8567e60a7dc25a647eddf0699c1
Andrew Whitehead
2026-03-09T05:10:30
Fix square skipping in `find_primitive_root` (#1220) This fixes a logic error in #1219, the only practical impact should be a minor performance improvement. Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
diff --git a/src/modular/prime_params.rs b/src/modular/prime_params.rs index 695f7da..e33b39f 100644 --- a/src/modular/prime_params.rs +++ b/src/modular/prime_params.rs @@ -150,12 +150,12 @@ const fn find_primitive_root<const LIMBS: usize>(p: &Odd<Uint<LIMBS>>) -> Option let Some(g2) = g.checked_add(1)...
1
2
2
49d5ef25b65a5d550f17cae3e972d609a085581a
Andrew Whitehead
2026-03-06T19:07:11
Optimize Jacobi symbol calculation for mixed sizes (#1219) This loosens up the restrictions on `jacobi_symbol` and `jacobi_symbol_vartime` to allow mixed-size arguments, and optimizes the first step to operate on the smaller size when possible. `Uint::rem_vartime` is also modified to allow mixed-size arguments. ----...
diff --git a/benches/uint.rs b/benches/uint.rs index 2309e4c..532a59e 100644 --- a/benches/uint.rs +++ b/benches/uint.rs @@ -734,6 +734,40 @@ fn bench_mod_symbols(c: &mut Criterion) { mod_symbols_bench(&mut group, Uint::<4>::ZERO); mod_symbols_bench(&mut group, Uint::<64>::ZERO); + let mut rng = make_rng...
6
195
23
adb876a58a9e8a7459fca651adc84ba3a60bad54
Tony Arcieri
2026-02-26T17:44:46
v0.7.0-rc.28 (#1214)
diff --git a/Cargo.lock b/Cargo.lock index cdf6ee2..aaf2c5a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -236,7 +236,7 @@ checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "crypto-bigint" -version = "0.7.0-rc.27" +version = "0.7.0-rc.28" dependencies = [ "chacha20", ...
2
2
2
0d04dda999babf5b954896b9833b46cb224993f9
Andrew Whitehead
2026-02-26T17:03:27
Add `ConcatenatingSquare` trait and related cleanups (#1208) This also deprecates `BoxedUint::mul` and `BoxedUint::square` in favor of the `ConcatenatingMul`/`ConcatenatingSquare` traits. The `Mul` operator for `BoxedUint` is adjusted to perform a checked multiplication, in line with addition. Related to #537 -----...
diff --git a/benches/boxed_uint.rs b/benches/boxed_uint.rs index 69f5d90..8654f53 100644 --- a/benches/boxed_uint.rs +++ b/benches/boxed_uint.rs @@ -6,7 +6,9 @@ use chacha20::ChaCha8Rng; use core::hint::black_box; use criterion::{BatchSize, Criterion, criterion_group, criterion_main}; -use crypto_bigint::{BoxedUint,...
8
120
42
f247315fb6382018b38a1e4a916c8044b97c5a6e
Filipe Casal
2026-02-26T17:02:26
docs: fix docs in bitwise or functions (#1210)
diff --git a/src/int/bit_or.rs b/src/int/bit_or.rs index d893145..2484ba3 100644 --- a/src/int/bit_or.rs +++ b/src/int/bit_or.rs @@ -7,7 +7,7 @@ use crate::{CtOption, Uint, Wrapping}; use super::Int; impl<const LIMBS: usize> Int<LIMBS> { - /// Computes bitwise `a & b`. + /// Computes bitwise `a | b`. #[i...
3
3
3
dba38d0a78e23cba6cbae08197d62c7e6e00cfc7
Filipe Casal
2026-02-26T17:02:01
fix: use correct byte order in `NonZero::from_le_byte_array` (#1211) The "little-endian" function was incorrectly calling `T::from_be_byte_array` instead of `T::from_le_byte_array`.
diff --git a/src/non_zero.rs b/src/non_zero.rs index feb8299..8657d8b 100644 --- a/src/non_zero.rs +++ b/src/non_zero.rs @@ -387,9 +387,9 @@ where Self::new(T::from_be_byte_array(bytes)) } - /// Decode a non-zero integer from big endian bytes. + /// Decode a non-zero integer from little endian byt...
1
12
2
b13557286bfa26216b0d62e71f9589e2f8a50e25
Filipe Casal
2026-02-26T15:01:30
fix(int): resolve panic in unbounded_shr_vartime for zero shift (#1213) Fixes #1212 by using `unbounded_shl` instead of `shl`. Adds a few regression tests and a proptest.
diff --git a/src/int/shr.rs b/src/int/shr.rs index b1c1498..c90bb69 100644 --- a/src/int/shr.rs +++ b/src/int/shr.rs @@ -99,7 +99,7 @@ impl<const LIMBS: usize> Int<LIMBS> { pub const fn unbounded_shr_vartime(&self, shift: u32) -> Self { let sign_bits = Self::select(&Self::ZERO, &Self::MINUS_ONE, self.is_n...
2
45
1
236d679c0368819fc786e427689d9fc90f3fa7a5
Andrew Whitehead
2026-02-13T20:56:54
Add modular square root calculation for prime modulus `ConstMontyForm` (#1139) This implements a new macro, `const_prime_monty_params!` as an alternative to `const_monty_params!` for a prime modulus. The resulting `ConstMontyForm` values support a `sqrt` method, calculating the modular square root (if it exists). Supp...
diff --git a/benches/const_monty.rs b/benches/const_monty.rs index 136762c..7405896 100644 --- a/benches/const_monty.rs +++ b/benches/const_monty.rs @@ -193,10 +193,94 @@ fn bench_montgomery_ops<M: Measurement>(group: &mut BenchmarkGroup<'_, M>) { } } +fn bench_montgomery_sqrt<M: Measurement>(group: &mut Benchm...
7
747
3
e25ad2f72fe8a2ef8b503099d495a1012805a77b
Andrew Whitehead
2026-02-13T20:55:04
Align naming of squaring methods for `Uint` (#1207) This deprecates `Uint:square` and `Uint::square_wide`, adding `Uint::concatenating_square` and changing `widening_square` to return a split result. Related to #537 Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
diff --git a/benches/uint.rs b/benches/uint.rs index 0bf13e9..2309e4c 100644 --- a/benches/uint.rs +++ b/benches/uint.rs @@ -258,18 +258,18 @@ fn bench_mul(c: &mut Criterion) { ); }); - group.bench_function("square_wide, U256", |b| { + group.bench_function("widening_square, U256", |b| { b...
9
35
26
8de803087070c220acf92451f03d54231d223ef8
Andrew Whitehead
2026-02-13T20:23:10
More flexible division for `BoxedUint` (#1181) Follow-up to #1149 This PR also introduces a `ToUnsigned` trait which helps converting from a `&NonZero<T>` to an owned `Unsigned` instance. `RemMixed` is also implemented unconditionally for `Uint` rather than being implemented through a macro for specific sizes. ---...
diff --git a/src/non_zero.rs b/src/non_zero.rs index 34b51c6..feb8299 100644 --- a/src/non_zero.rs +++ b/src/non_zero.rs @@ -2,7 +2,7 @@ use crate::{ Bounded, Choice, ConstOne, Constants, CtAssign, CtEq, CtOption, CtSelect, Encoding, Int, Limb, - Mul, Odd, One, Uint, UintRef, Zero, + Mul, Odd, One, ToUnsi...
11
322
159
0af57a6e1aa90a17ab49bbebb56cafd42a4775bd
Andrew Whitehead
2026-02-12T15:19:43
Lighter-weight support for `Uint` concat, split operations (#1191) This also moves `EncodedUint` <-> `[u8; N]` conversion out of the macro rules for different Uint sizes. The `Concat`, `Split`, and `SplitMixed` traits are changed to define the output types only, while the `ConcatMixed` trait is removed as unnecessary....
diff --git a/src/int/gcd.rs b/src/int/gcd.rs index e67e849..934dd59 100644 --- a/src/int/gcd.rs +++ b/src/int/gcd.rs @@ -323,7 +323,7 @@ impl<const LIMBS: usize> Xgcd for OddInt<LIMBS> { #[cfg(all(test, not(miri)))] mod tests { use crate::int::gcd::{IntXgcdOutput, NonZeroIntXgcdOutput, OddIntXgcdOutput}; - us...
14
271
202
5b5f80b3eb46dab48b55152374248f14148db725
Tony Arcieri
2026-02-11T20:01:52
Remove `nlimbs!` macro (#1202) Since it has the same name as the `nlimbs` function, it becomes impossible to import the `nlimbs` function without triggering the deprecation warning. (Possibly we could move the deprecation to inside the macro somehow)
diff --git a/src/limb.rs b/src/limb.rs index 6ae411e..29dd2d3 100644 --- a/src/limb.rs +++ b/src/limb.rs @@ -43,15 +43,6 @@ pub const fn nlimbs(bits: u32) -> usize { } } -/// DEPRECATED: use `const fn nlimbs` instead. -#[deprecated(since = "0.7.0", note = "use `const fn nlimbs` instead")] -#[macro_export] -macr...
1
0
9
ef45040ad815fa18781d712445c80663fe722cb5
Tony Arcieri
2026-02-11T14:22:19
Rename `UnsignedMontyForm` => `UnsignedWithMontyForm` (#1189) Based on feedback it was a bit unclear what this trait actually did. This hopefully helps clarify that this type is an unsigned integer type which has an associated `*MontyForm` type which uses that integer type as its internal representation.
diff --git a/src/modular/pow.rs b/src/modular/pow.rs index 5c75e3e..a08185e 100644 --- a/src/modular/pow.rs +++ b/src/modular/pow.rs @@ -1,6 +1,6 @@ use super::FixedMontyParams; use super::mul::{almost_montgomery_reduce, mul_montgomery_form, square_repeat_montgomery_form}; -use crate::{AmmMultiplier, CtEq, Limb, Mont...
5
23
23
7d4d5457ceda1983d067717d48ee0c3769023481
Tony Arcieri
2026-02-11T01:01:18
v0.7.0-rc.26 (#1200)
diff --git a/Cargo.lock b/Cargo.lock index 34bb034..e17df8e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -236,7 +236,7 @@ checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "crypto-bigint" -version = "0.7.0-rc.25" +version = "0.7.0-rc.26" dependencies = [ "chacha20", ...
2
2
2
7c6e699fd1df16cff3c40a8863c67e2168360a13
Tony Arcieri
2026-02-10T00:06:19
Fix clippy (#1196)
diff --git a/src/uint/boxed/mul_mod.rs b/src/uint/boxed/mul_mod.rs index e1fbe9c..6d7acda 100644 --- a/src/uint/boxed/mul_mod.rs +++ b/src/uint/boxed/mul_mod.rs @@ -134,7 +134,7 @@ mod tests { let b = BoxedUint::random_mod_vartime(&mut rng, &p); let c = a.mul_mod_special(&b, ...
1
1
1
1db1c11e1f6eabe43338117a3f58305d598b9835
Andrew Whitehead
2026-02-09T17:22:12
Add `Uint::resize_checked` method (#1194) This looks useful for `crypto-primes` to remove usage of `split`, along with the associated type bounds. Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
diff --git a/src/uint/resize.rs b/src/uint/resize.rs index 400a9f1..0f1a3b7 100644 --- a/src/uint/resize.rs +++ b/src/uint/resize.rs @@ -1,4 +1,7 @@ +//! Support for converting between [`Uint`] instances with different sizes. + use super::Uint; +use crate::{Choice, CtOption}; impl<const LIMBS: usize> Uint<LIMBS> { ...
1
26
8
8b1808c2e93cb1f77bcf94698530d6979d399cf9
Andrew Whitehead
2026-02-09T17:21:28
Updates to `_mod_special` operations for `Uint`, `BoxedUint` (#1187) The tests for `BoxedUint` were not effectively testing different sizes, that is fixed now. `BoxedUint` also did not implement `add_mod_special`, which is added. The tests for `Uint` were making extensive use of macros, this is updated to use const g...
diff --git a/src/uint/add_mod.rs b/src/uint/add_mod.rs index 6dc6a45..2cb39aa 100644 --- a/src/uint/add_mod.rs +++ b/src/uint/add_mod.rs @@ -87,60 +87,53 @@ mod tests { assert_eq!(a.add_mod(&a, &n), a.double_mod(&n)); } - macro_rules! test_add_mod_special { - ($size:expr, $test_name:ident) => ...
6
370
363
fd3e72df5eb722cf49ec3f8f58f776b00c5598e8
Andrew Whitehead
2026-02-09T17:17:13
Support mixed-size comparisons for Integer types (#1184) This unifies the comparison methods between `Int`, `Uint`, and `BoxedUint`, and `UintRef`. --------- Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
diff --git a/src/int/cmp.rs b/src/int/cmp.rs index 461bd08..15b14bd 100644 --- a/src/int/cmp.rs +++ b/src/int/cmp.rs @@ -42,7 +42,7 @@ impl<const LIMBS: usize> Int<LIMBS> { /// 0 is Equal /// 1 is Greater #[inline] - pub(crate) const fn cmp(lhs: &Self, rhs: &Self) -> i8 { + pub(crate) const fn ...
10
235
153
96893846b46294048c8eaac10a91c725360f910a
Alex Abdugafarov
2026-02-04T23:51:42
Make fields inside `MontyParams` accessible via getters (#1188) Resolves #1186
diff --git a/src/modular/monty_params.rs b/src/modular/monty_params.rs index 8731cb8..8dc444f 100644 --- a/src/modular/monty_params.rs +++ b/src/modular/monty_params.rs @@ -28,7 +28,7 @@ pub struct MontyParams<U: Unsigned> { /// This value is used in Montgomery reduction and modular inversion. pub(super) mod_...
1
15
3
400b1ba3b85ba0d2f62484df48337cb11ef9afaa
Tony Arcieri
2026-02-03T03:46:17
Followup to #1149 (#1180) #1149
diff --git a/src/uint/boxed/add.rs b/src/uint/boxed/add.rs index c489b9c..cd373e0 100644 --- a/src/uint/boxed/add.rs +++ b/src/uint/boxed/add.rs @@ -119,39 +119,39 @@ impl BoxedUint { } } -impl<RHS: AsRef<UintRef>> Add<RHS> for BoxedUint { +impl<Rhs: AsRef<UintRef>> Add<Rhs> for BoxedUint { type Output = S...
1
10
10
0e2b646d6dc13a5d1e40a86b9bb3fa9207f1b1dc
Tony Arcieri
2026-02-02T17:52:48
v0.7.0-rc.25 (#1176) Includes `getrandom` v0.4 upgrade
diff --git a/Cargo.lock b/Cargo.lock index ff31d5c..b067bd2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -236,7 +236,7 @@ checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "crypto-bigint" -version = "0.7.0-rc.24" +version = "0.7.0-rc.25" dependencies = [ "chacha20", ...
2
2
2
67d0ee2f0d692b991350eb7cf96bfdd108a724ea
Tony Arcieri
2026-02-02T17:09:38
Bump `getrandom` to v0.4 (#1175) Release PR: rust-random/getrandom#798
diff --git a/Cargo.lock b/Cargo.lock index 62186a8..ff31d5c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -243,7 +243,7 @@ dependencies = [ "criterion", "ctutils", "der", - "getrandom 0.4.0-rc.1", + "getrandom 0.4.0", "hex-literal", "hybrid-array", "num-bigint", @@ -328,9 +328,9 @@ dependencies = [ [[packa...
2
26
32
38323cecd91ff1c0a7c14103f3646aaa1e9a46f2
Andrew Whitehead
2026-02-02T04:12:36
implement `Integer` and `Unsigned` for `Limb` (#1174) Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
diff --git a/src/limb.rs b/src/limb.rs index 6775bda..6ae411e 100644 --- a/src/limb.rs +++ b/src/limb.rs @@ -16,14 +16,15 @@ mod mul; mod neg; mod shl; mod shr; +mod sqrt; mod sub; #[cfg(feature = "rand_core")] mod rand; use crate::{ - Bounded, Choice, ConstOne, ConstZero, Constants, CtEq, CtOption, NonZe...
13
253
32
69680e3570c7b4b626d27cfd2c64dff22b59e508
Tony Arcieri
2026-02-02T03:30:06
v0.7.0-rc.24 (#1173)
diff --git a/Cargo.lock b/Cargo.lock index 3d40dfb..62186a8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -236,7 +236,7 @@ checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "crypto-bigint" -version = "0.7.0-rc.23" +version = "0.7.0-rc.24" dependencies = [ "chacha20", ...
2
2
2
b7ac210b140138d97a829107f7b260abb717e346
Tony Arcieri
2026-02-02T03:11:09
Add deprecated `nlimbs!` macro (#1172) The old macro was replaced with a `const fn` in #1169, however to aid migration this adds a temporary deprecated macro
diff --git a/src/limb.rs b/src/limb.rs index 59c8a31..6775bda 100644 --- a/src/limb.rs +++ b/src/limb.rs @@ -42,6 +42,15 @@ pub const fn nlimbs(bits: u32) -> usize { } } +/// DEPRECATED: use `const fn nlimbs` instead. +#[deprecated(since = "0.7.0", note = "use `const fn nlimbs` instead")] +#[macro_export] +macr...
2
11
2
8205acbce6a85587dbf81a9a62ddb1e072315f08
Tony Arcieri
2026-02-02T03:04:16
Expose `UintRef` multiplication methods (#1171) Exposes the following: - `overflowing_mul` - `overflowing_square` - `wrapping_mul` - `wrapping_square`
diff --git a/src/uint/ref_type/mul.rs b/src/uint/ref_type/mul.rs index 3df3fb0..18448fe 100644 --- a/src/uint/ref_type/mul.rs +++ b/src/uint/ref_type/mul.rs @@ -1,42 +1,35 @@ //! Multiplication support for [`UintRef`]. -use crate::{Choice, Limb, UintRef}; - -#[cfg(feature = "alloc")] -use crate::uint::mul::karatsuba...
1
5
12