From 2d8f9163cddc571189dfedae71d9e57f890c0b25 Mon Sep 17 00:00:00 2001 From: Balazs Komuves Date: Thu, 22 Jan 2026 21:18:41 +0100 Subject: [PATCH] renamed the package --- Cargo.toml | 4 ++-- README.md | 11 ++++++----- sanity.hs => sanity/sanity.hs | 2 ++ src/bin/testmain.rs | 11 +++++------ 4 files changed, 15 insertions(+), 13 deletions(-) rename sanity.hs => sanity/sanity.hs (98%) diff --git a/Cargo.toml b/Cargo.toml index c311632..b35baf2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] -name = "rust-poseidon1" -version = "0.0.0" +name = "rust-poseidon-bn254-pure" +version = "0.0.1" edition = "2021" license = "MIT OR Apache-2.0" authors = ["Balazs Komuves"] diff --git a/README.md b/README.md index 81abf05..51ba3a0 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,11 @@ -rust-poseidon-bn254-rv32im --------------------------- +rust-poseidon-bn254-pure +------------------------ -Self-contained, pure Rust implementation of Poseidon and Poseidon2 hash functions -over the BN254 curve's scalar field, using 32 bit limbs internally. +Self-contained (no external dependencies), pure Rust implementation of Poseidon +and Poseidon2 hash functions over the BN254 curve's scalar field, using 32 bit +limbs internally. -It's intended to be used on 32-bit platforms eg. 32-bit RISC-V +It's intended to be used on 32-bit platforms, eg. 32-bit RISC-V (rv32im) (though porting to 64 bits shouldn't be a big effort). The algebra implementation is based on [`zikkurat-algebra`](https://github.com/faulhornlabs/zikkurat-algebra/) diff --git a/sanity.hs b/sanity/sanity.hs similarity index 98% rename from sanity.hs rename to sanity/sanity.hs index 4a4a219..e831468 100644 --- a/sanity.hs +++ b/sanity/sanity.hs @@ -1,4 +1,6 @@ +-- some basic "sanity check"-type testing + {-# LANGUAGE PackageImports #-} import Data.List diff --git a/src/bin/testmain.rs b/src/bin/testmain.rs index 2c39be6..2a3719e 100644 --- a/src/bin/testmain.rs +++ b/src/bin/testmain.rs @@ -1,11 +1,10 @@ -use rust_poseidon1::bn254::bigint::*; -use rust_poseidon1::bn254::constant::*; -use rust_poseidon1::bn254::montgomery::*; -use rust_poseidon1::bn254::field::*; +use rust_poseidon_bn254_pure::bn254::bigint::*; +use rust_poseidon_bn254_pure::bn254::constant::*; +use rust_poseidon_bn254_pure::bn254::montgomery::*; +use rust_poseidon_bn254_pure::bn254::field::*; -//use rust_poseidon1::poseidon2::constants::*; -use rust_poseidon1::poseidon2::permutation::*; +use rust_poseidon_bn254_pure::poseidon2::permutation::*; //------------------------------------------------------------------------------