Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand api #4

Merged
merged 100 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
6aaa082
Set lambdaworks felt as Felt
fmoletta Jun 27, 2023
1bfd360
Temporarily remove `Copy` derive trait + implement `Eq` & `PartialEq`…
fmoletta Jun 27, 2023
e1cbb86
Temporarily remove const + implement some fns
fmoletta Jun 27, 2023
0e2413b
Impelemnt more methods
fmoletta Jun 27, 2023
94571bf
Derive Copy
fmoletta Jun 27, 2023
6ae2304
Implement methods + add questions in comment
fmoletta Jun 27, 2023
8a7a08b
Add questions in comment
fmoletta Jun 27, 2023
e635d88
Implement basic traits
fmoletta Jun 27, 2023
7cf2ac7
Implement addition
fmoletta Jun 27, 2023
6b719ce
Implement sub + mul
fmoletta Jun 27, 2023
2d38c76
Implement some traits
fmoletta Jun 27, 2023
d8aaff3
Add to_be_bytes impl
fmoletta Jun 27, 2023
0bed61f
Move implementation of PartialEq & Eq to lambdaworks
fmoletta Jun 27, 2023
304fe56
Implement `Display` for errors
fmoletta Jun 27, 2023
8aa11b4
Implement constants
fmoletta Jun 27, 2023
8915253
Remove Todo
fmoletta Jun 29, 2023
2fb2bfa
Implement to_bits_le
fmoletta Jun 29, 2023
91261e5
Implement to_bits_be
fmoletta Jun 29, 2023
d441085
Clippy
fmoletta Jun 29, 2023
34c11c7
Simplify sqrt
fmoletta Jun 29, 2023
5020bb8
Remove comment
fmoletta Jun 29, 2023
25a35df
Simplify is_zero
fmoletta Jun 29, 2023
3419d8b
Add split for not(target_pointer_width = "64")
fmoletta Jun 29, 2023
74fbbb6
Fix array handling
fmoletta Jun 29, 2023
b669c3a
Remove comment & wrong impl
fmoletta Jun 29, 2023
a1a7c62
Fix wrong impl
fmoletta Jun 29, 2023
6149f12
Remove wrong impls
fmoletta Jun 29, 2023
cd961ad
Add deserialization from hex string
fmoletta Jun 29, 2023
f6c116b
Implement UpperHex fmt
fmoletta Jun 29, 2023
537f483
Remove comments
fmoletta Jun 30, 2023
d48cbb1
Implement `mul_mod` & `inverse_mod`
fmoletta Jul 3, 2023
2695f68
Implement floor_div
fmoletta Jul 3, 2023
63a6347
Fix constants
fmoletta Jul 3, 2023
0a3a0b7
Add proptests
fmoletta Jul 3, 2023
2a2a653
Add proptest
fmoletta Jul 3, 2023
7f2bd3a
Remove wrong usage of from_raw
fmoletta Jul 3, 2023
ec76d87
Add proptest
fmoletta Jul 3, 2023
59c1837
Add proptest
fmoletta Jul 3, 2023
7c0a77a
Fix deserialization
fmoletta Jul 4, 2023
d9c51f5
Add tests for basic constants
fmoletta Jul 4, 2023
d81c0ae
Add test for max constant
fmoletta Jul 4, 2023
8188168
Add test for zero constant
fmoletta Jul 4, 2023
d192fff
Test is_zero
fmoletta Jul 4, 2023
c4f4790
Add more proptests
fmoletta Jul 4, 2023
02242f4
Fix serialization & deserialization
fmoletta Jul 4, 2023
9ee8b6f
Test hexadecimal display
fmoletta Jul 4, 2023
a863f4e
Improve tests
fmoletta Jul 4, 2023
2f47fe3
Implement Display
fmoletta Jul 4, 2023
63acbf5
Fix Display + add tests
fmoletta Jul 4, 2023
2eb99bd
fmt
fmoletta Jul 4, 2023
6ee5950
Simplify methods
fmoletta Jul 4, 2023
1bf28f7
Remove doc comments from tests
fmoletta Jul 4, 2023
9523238
Add proptest for floor_div
fmoletta Jul 4, 2023
51b0fd5
Add tests for basic operations
fmoletta Jul 4, 2023
b8b91e5
Add pow operations test
fmoletta Jul 4, 2023
834a952
Update toml
fmoletta Jul 4, 2023
39be089
Add arbitrary.rs
fmoletta Jul 4, 2023
f5e0cc8
Remove std import
fmoletta Jul 4, 2023
7c09e6d
Clippy
fmoletta Jul 4, 2023
1b6aaaa
Bump version
fmoletta Jul 4, 2023
7290d2c
Add methods `to_usize` & `to_u64`
fmoletta Jul 5, 2023
0b47215
Derive `Hash` for Felt
fmoletta Jul 5, 2023
6f350da
Implement From<u64> + From<u128> for Felt
fmoletta Jul 5, 2023
92acbfb
Implement more ops
fmoletta Jul 5, 2023
2341874
Implement more ops
fmoletta Jul 5, 2023
0ecdba4
Implement more ops
fmoletta Jul 5, 2023
63b5142
Add bitwise operations
fmoletta Jul 5, 2023
142e946
Add more methods
fmoletta Jul 10, 2023
e53ccbb
Use `bits_le` in bits method
fmoletta Jul 11, 2023
8e1051a
Handle negative numbers in `Felt::from_dec_string`
fmoletta Jul 15, 2023
f035214
Fix
fmoletta Jul 15, 2023
a603e78
Merge branch 'main' into expand-api
pefontana Aug 10, 2023
ff2a141
Add pow_felt
pefontana Aug 23, 2023
c570741
Update lambdaworks commit
pefontana Aug 25, 2023
cf61a68
impl Add<&Felt> for u64 && to_be_digits
pefontana Aug 25, 2023
8d5ad21
Update lambdaworks commit
pefontana Sep 1, 2023
105250c
Add arbitrary feature
Sep 1, 2023
2ffab31
cargo clippy
pefontana Sep 1, 2023
2eddb3a
Merge with main
Sep 1, 2023
192551b
Fix imports; run linter
Sep 1, 2023
9fd1992
Pin lambdaworks version
Oppen Sep 20, 2023
a8cfbad
Fixes to new APIs
Oppen Sep 21, 2023
77132a3
whitespace
Oppen Sep 22, 2023
54e3ba5
Bump lambdaworks version
Oppen Sep 28, 2023
4fb89b3
Implement `FromPrimitive` and `From<T>` with primitive T
Oppen Sep 28, 2023
f1c17d1
Add docs
Oppen Sep 29, 2023
c2945cf
Implement ToPrimitive
Oppen Sep 29, 2023
82e7b48
Merge branch 'main' into expand-api
Oppen Oct 2, 2023
1840022
cargo fmt
Oppen Oct 2, 2023
b32c7da
From first, FromPrimitive later
Oppen Oct 3, 2023
13fab09
Remove bitwise operators
Oppen Oct 4, 2023
0befb53
Remove operations with usize, expect fixed width operands
Oppen Oct 4, 2023
2db8cfd
Return Option<u64> for u64 - Felt
Oppen Oct 4, 2023
00673e9
Simplify and explain arbitrary
Oppen Oct 4, 2023
8d70387
Fix arbitrary (and test with the feature enabled!)
Oppen Oct 4, 2023
af3320c
Impl Zero
Oppen Oct 5, 2023
95b90ca
bits -> usize
Oppen Oct 5, 2023
b154e7e
Define pow of Into<u128>
Oppen Oct 6, 2023
e503792
Fix alloc
Oppen Oct 10, 2023
cc95ba2
cargo fmt
Oppen Oct 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion crates/stark-felt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ readme = "README.md"
[dependencies]
bitvec = { version = "1.0.1", default-features = false }
serde = { version = "1.0.163", optional = true, default-features = false }
lambdaworks-math = { version = "0.1.3", default-features = false }
lambdaworks-math = { version = "0.2.0", default_features = false }
arbitrary = { version = "1.3.0", optional = true, default-features = false }
num-traits = { version = "0.2.16", default-features = false }

[features]
default = ["std", "serde"]
std = []
alloc = ["serde?/alloc"]
arbitrary = ["std", "dep:arbitrary"]

[dev-dependencies]
proptest = "1.1.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use lambdaworks_math::{field::element::FieldElement, unsigned_integer::element::UnsignedInteger};
use num_traits::Zero;
use proptest::prelude::*;

use crate::Felt;
Expand Down
Loading