build(deps): add rug for arbitrary precision math

This commit is contained in:
electria 2026-06-17 12:13:45 -07:00
commit 5683d41c53
Signed by: electria
SSH key fingerprint: SHA256:8LlB3ucPbBHqozqkhsNbaV5oG3SlzzqUj8FZDL6IPQs
3 changed files with 73 additions and 1 deletions

65
Cargo.lock generated Normal file
View file

@ -0,0 +1,65 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "az"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be5eb007b7cacc6c660343e96f650fedf4b5a77512399eb952ca6642cf8d13f7"
[[package]]
name = "gmp-mpfr-sys"
version = "1.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7db155b537cb791b133341f99f68371d86ee7fa4c79aacfbc376d72d23c70531"
dependencies = [
"libc",
"windows-sys",
]
[[package]]
name = "libc"
version = "0.2.186"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
[[package]]
name = "libm"
version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"
[[package]]
name = "rug"
version = "1.30.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07a8857882aec59d27254b02481c709327c13de6fad1da60bfc4f9783eaaa61e"
dependencies = [
"az",
"gmp-mpfr-sys",
"libc",
"libm",
]
[[package]]
name = "tylc"
version = "0.1.0"
dependencies = [
"rug",
]
[[package]]
name = "windows-link"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
[[package]]
name = "windows-sys"
version = "0.61.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
dependencies = [
"windows-link",
]

View file

@ -4,3 +4,4 @@ version = "0.1.0"
edition = "2024" edition = "2024"
[dependencies] [dependencies]
rug = "1.30.0"

View file

@ -14,16 +14,22 @@
cargoToml = fromTOML (builtins.readFile ./Cargo.toml); cargoToml = fromTOML (builtins.readFile ./Cargo.toml);
name = cargoToml.package.name; name = cargoToml.package.name;
buildInputs = with pkgs; [
m4
];
in in
{ {
packages.default = pkgs.rustPlatform.buildRustPackage { packages.default = pkgs.rustPlatform.buildRustPackage {
inherit name; inherit name buildInputs;
src = ./.; src = ./.;
cargoLock.lockFile = ./Cargo.lock; cargoLock.lockFile = ./Cargo.lock;
}; };
devShells.default = pkgs.mkShell { devShells.default = pkgs.mkShell {
inherit buildInputs;
packages = with pkgs; [ packages = with pkgs; [
rustc rustc
cargo cargo