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

use our own is_prime impl #1238

Merged
merged 1 commit into from
Jun 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ bench/results
cairo-rs-env/*
cairo-rs-pypy-env/*
cairo/

ensure-no_std/Cargo.lock
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@

* move the vm in it's own directory and crate, different from the workspace

* add a `ensure_no_std` crate that will be used by the CI to check that new changes are not reverting `no_std` support
* add a `ensure-no_std` crate that will be used by the CI to check that new changes are not reverting `no_std` support

* replace the use of `num-prime::is_prime` by a custom implementation, therefore restoring `no_std` compatibility

#### [0.5.1] - 2023-6-7

Expand Down
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]
members = ["cairo-vm-cli", "felt", "vm", "hint_accountant", "./deps/parse-hyperlinks"]
exclude = ["ensure_no_std"]
exclude = ["ensure-no_std"]

[workspace.dependencies]
mimalloc = { version = "0.1.29", default-features = false }
Expand All @@ -11,7 +11,6 @@ num-bigint = { version = "0.4", features = [
rand = { version = "0.8.3", features = ["small_rng"], default-features = false }
num-traits = { version = "0.2", default-features = false }
num-integer = { version = "0.1.45", default-features = false }
num-prime = { version = "0.4.3", features = ["big-int"], default-features = false }
serde = { version = "1.0", features = ["derive"], default-features = false }
serde_bytes = { version = "0.11.9", default-features = false, features = [
"alloc",
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion ensure_no_std/Cargo.toml → ensure-no_std/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[package]
name = "ensure_no_std"
name = "ensure-no_std"
version = "0.1.0"
edition = "2021"

[dependencies]
cairo-felt = { path = "../felt", default-features = false, features = ["alloc"] }
cairo-vm = { path = "../vm", default-features = false }

wee_alloc = "0.4.5"

Expand Down
2 changes: 1 addition & 1 deletion ensure_no_std/src/main.rs → ensure-no_std/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ pub extern "C" fn _start() -> ! {
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;

#[allow(unused_imports)]
use cairo_felt;
use {cairo_felt, cairo_vm};
181 changes: 0 additions & 181 deletions ensure_no_std/Cargo.lock

This file was deleted.

2 changes: 1 addition & 1 deletion vm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ num-bigint = {workspace = true}
rand = {workspace = true}
num-traits = {workspace = true}
num-integer = {workspace = true}
num-prime = {workspace = true}
serde = {workspace = true}
serde_bytes = {workspace = true}
serde_json = {workspace = true}
Expand Down Expand Up @@ -71,6 +70,7 @@ ark-std = {workspace = true, optional = true}
[dev-dependencies]
assert_matches = "1.5.0"
rstest = { version = "0.17.0", default-features = false }
num-prime = { version = "0.4.3", features = ["big-int"]}

[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen-test = "0.3.34"
Expand Down
Loading