Skip to content
Closed
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
10 changes: 5 additions & 5 deletions Cargo-recent.lock
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
name = "simpcli"
version = "0.3.0"
dependencies = [
"simplicity-lang 0.7.0",
"simplicity-lang 0.7.1",
]

[[package]]
Expand All @@ -471,7 +471,7 @@ dependencies = [
"base64 0.22.1",
"libfuzzer-sys",
"simplicity-lang 0.3.1",
"simplicity-lang 0.7.0",
"simplicity-lang 0.7.1",
]

[[package]]
Expand All @@ -491,7 +491,7 @@ dependencies = [

[[package]]
name = "simplicity-lang"
version = "0.7.0"
version = "0.7.1"
dependencies = [
"bitcoin",
"bitcoin_hashes",
Expand All @@ -503,7 +503,7 @@ dependencies = [
"miniscript",
"santiago",
"serde",
"simplicity-sys 0.6.0",
"simplicity-sys 0.6.1",
]

[[package]]
Expand All @@ -518,7 +518,7 @@ dependencies = [

[[package]]
name = "simplicity-sys"
version = "0.6.0"
version = "0.6.1"
dependencies = [
"bitcoin_hashes",
"cc",
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "simplicity-lang"
version = "0.7.0"
version = "0.7.1"
authors = ["Andrew Poelstra <[email protected]>"]
license = "CC0-1.0"
homepage = "https://github.com/BlockstreamResearch/rust-simplicity/"
Expand Down Expand Up @@ -30,14 +30,14 @@ ghost-cell = { version = "0.2.6", default-features = false }
hashes = { package = "bitcoin_hashes", version = "0.14" }
hex = { package = "hex-conservative", version = "0.2.1" }
santiago = "1.3"
simplicity-sys = { version = "0.6.0", path = "./simplicity-sys" }
simplicity-sys = { version = "0.6.1", path = "./simplicity-sys" }
serde = { version = "1.0.103", features = ["derive"], optional = true }

[target.wasm32-unknown-unknown.dependencies]
getrandom = { version = "0.2", features = ["js"] }

[dev-dependencies]
simplicity-sys = { version = "0.6.0", path = "./simplicity-sys", features = [
simplicity-sys = { version = "0.6.1", path = "./simplicity-sys", features = [
"test-utils",
] }

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ To use rust-simplicity, this to your Cargo.toml:

```toml
[dependencies]
simplicity-lang = "0.6"
simplicity-lang = "0.7"
```

## Quick Start
Expand Down
2 changes: 1 addition & 1 deletion fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ path = "fuzz_lib/lib.rs"
libfuzzer-sys = "0.4"
# We shouldn't need an explicit version on the next line, but Andrew's tools
# choke on it otherwise. See https://github.com/nix-community/crate2nix/issues/373
simplicity-lang = { path = "..", features = ["test-utils"], version = "0.7.0" }
simplicity-lang = { path = "..", features = ["test-utils"], version = "0.7.1" }
old_simplicity = { package = "simplicity-lang", version = "0.3.1", default-features = false }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion fuzz/generate-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ path = "fuzz_lib/lib.rs"
libfuzzer-sys = "0.4"
# We shouldn't need an explicit version on the next line, but Andrew's tools
# choke on it otherwise. See https://github.com/nix-community/crate2nix/issues/373
simplicity-lang = { path = "..", features = ["test-utils"], version = "0.6.0" }
simplicity-lang = { path = "..", features = ["test-utils"], version = "0.7.1" }
old_simplicity = { package = "simplicity-lang", version = "0.3.1", default-features = false }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion simpcli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2018"

[dependencies]
# todo add lexopt for command line parsing
simplicity-lang = { version = "0.7.0", path = "..", features = [ "base64", "serde", "elements" ] }
simplicity-lang = { version = "0.7.1", path = "..", features = [ "base64", "serde", "elements" ] }

[[bin]]
name = "simpcli"
Expand Down
2 changes: 1 addition & 1 deletion simplicity-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "simplicity-sys"
version = "0.6.0"
version = "0.6.1"
license = "CC0-1.0"
homepage = "https://github.com/BlockstreamResearch/rust-simplicity/"
repository = "https://github.com/BlockstreamResearch/rust-simplicity/"
Expand Down
34 changes: 26 additions & 8 deletions simplicity-sys/src/ffi.rs
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I am not sure about the

#[cfg(not(target_arch = "wasm32"))]
pub type c_uint_fast64_t = usize;

Because of: https://en.cppreference.com/w/c/types/integer.html

image

As far as I understand on 32-bit platforms like armv7 because we are using the usize this thing could fail

Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,36 @@ pub type c_int = i32;
pub type c_uint = u32;
pub type c_size_t = usize;
pub type c_uint_fast8_t = u8;
#[cfg(all(
any(target_arch = "wasm32", target_arch = "aarch64"),
not(target_os = "windows")
))]
#[cfg(any(target_os = "macos", target_os = "ios"))]
pub type c_uint_fast16_t = u16;
#[cfg(target_os = "windows")]
#[cfg(any(target_os = "windows", target_os = "android"))]
pub type c_uint_fast16_t = u32;
#[cfg(not(any(target_arch = "wasm32", target_arch = "aarch64", target_os = "windows")))]
#[cfg(target_arch = "wasm32")]
pub type c_uint_fast16_t = u16;
#[cfg(not(any(
target_os = "macos",
target_os = "ios",
target_os = "windows",
target_os = "android",
target_arch = "wasm32"
)))]
pub type c_uint_fast16_t = usize;
#[cfg(any(target_arch = "wasm32", target_arch = "aarch64", target_os = "windows"))]

#[cfg(any(
target_os = "macos",
target_os = "ios",
target_os = "windows",
target_os = "android",
target_arch = "wasm32"
))]
pub type c_uint_fast32_t = u32;
#[cfg(not(any(target_arch = "wasm32", target_arch = "aarch64", target_os = "windows")))]
#[cfg(not(any(
target_os = "macos",
target_os = "ios",
target_os = "windows",
target_os = "android",
target_arch = "wasm32"
)))]
pub type c_uint_fast32_t = usize;
#[cfg(target_arch = "wasm32")]
pub type c_uint_fast64_t = u64;
Expand Down