Skip to content

Commit

Permalink
bump to 0.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
vemonet committed Nov 21, 2023
1 parent a112208 commit a28a23d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "nanopub-cli"
version = "0.0.7"
version = "0.0.9"
description = """
A cross-platform CLI tool written in Rust to sign Nanopublications.
"""
Expand All @@ -14,6 +14,6 @@ homepage.workspace = true
categories.workspace = true

[dependencies]
nanopub = { version = "0.0.7", path = "../lib" }
nanopub = { version = "0.0.9", path = "../lib" }
clap = { version = "4.4", features = ["derive"] }
tokio = { version = "1.34", features = ["macros", "rt-multi-thread"] }
4 changes: 2 additions & 2 deletions js/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "nanopub-js"
version = "0.0.7"
version = "0.0.9"
description = "JavaScript bindings for the Nanopub rust toolkit"
repository = "https://github.com/vemonet/nanopub-rs/tree/main/js"
authors.workspace = true
Expand All @@ -15,7 +15,7 @@ categories.workspace = true
crate-type = ["cdylib"]

[dependencies]
nanopub = { version = "0.0.7", path = "../lib" }
nanopub = { version = "0.0.9", path = "../lib" }
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
js-sys = "0.3"
Expand Down
2 changes: 1 addition & 1 deletion lib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "nanopub"
version = "0.0.7"
version = "0.0.9"
description = """
A cross-platform Rust library to sign Nanopublications, with bindings to Python and JS (wasm)
"""
Expand Down
5 changes: 2 additions & 3 deletions lib/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,9 @@ pub fn get_np_server(random: bool) -> &'static str {
return LIST_SERVERS[0];
}
// Generate a random number
let mut buf = [0u8; 4]; // Buffer to store 4 bytes (u32)
let mut buf = [0u8; 4];
getrandom(&mut buf).expect("Failed to generate random number");
let num = u32::from_ne_bytes(buf); // Convert bytes to u32
// Use the random number to generate an index
let num = u32::from_ne_bytes(buf);
let index = num as usize % LIST_SERVERS.len();
LIST_SERVERS[index]
}
Expand Down
4 changes: 2 additions & 2 deletions python/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "nanopub-sign"
version = "0.0.7"
version = "0.0.9"
description = "Python bindings for the Nanopub rust toolkit"
repository = "https://github.com/vemonet/nanopub-rs/tree/main/python"
authors.workspace = true
Expand All @@ -16,7 +16,7 @@ name = "nanopub_sign"
crate-type = ["cdylib"]

[dependencies]
nanopub = { version = "0.0.7", path = "../lib" }
nanopub = { version = "0.0.9", path = "../lib" }
pyo3 = { version = "0.20", features = ["extension-module"] }
pyo3-asyncio = "0.20"
tokio = { version = "1.34", features = ["rt-multi-thread"] }

0 comments on commit a28a23d

Please sign in to comment.