Skip to content

Commit b36efa2

Browse files
committed
bump version of simplicity-sys to 0.6.0
1 parent 196a39d commit b36efa2

54 files changed

Lines changed: 2524 additions & 2524 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo-recent.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ dependencies = [
467467
"miniscript",
468468
"santiago",
469469
"serde",
470-
"simplicity-sys 0.5.0",
470+
"simplicity-sys 0.6.0",
471471
]
472472

473473
[[package]]
@@ -482,7 +482,7 @@ dependencies = [
482482

483483
[[package]]
484484
name = "simplicity-sys"
485-
version = "0.5.0"
485+
version = "0.6.0"
486486
dependencies = [
487487
"bitcoin_hashes",
488488
"cc",

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ ghost-cell = { version = "0.2.6", default-features = false }
3030
hashes = { package = "bitcoin_hashes", version = "0.14" }
3131
hex = { package = "hex-conservative", version = "0.2.1" }
3232
santiago = "1.3"
33-
simplicity-sys = { version = "0.5.0", path = "./simplicity-sys" }
33+
simplicity-sys = { version = "0.6.0", path = "./simplicity-sys" }
3434
serde = { version = "1.0.103", features = ["derive"], optional = true }
3535

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

3939
[dev-dependencies]
40-
simplicity-sys = { version = "0.5.0", path = "./simplicity-sys", features = [
40+
simplicity-sys = { version = "0.6.0", path = "./simplicity-sys", features = [
4141
"test-utils",
4242
] }
4343

simplicity-sys/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "simplicity-sys"
3-
version = "0.5.0"
3+
version = "0.6.0"
44
license = "CC0-1.0"
55
homepage = "https://github.com/BlockstreamResearch/rust-simplicity/"
66
repository = "https://github.com/BlockstreamResearch/rust-simplicity/"
@@ -9,7 +9,7 @@ description = "FFI bindings to libsimplicity"
99
edition = "2021"
1010
rust-version = "1.74.0"
1111
build = "build.rs"
12-
links = "rustsimplicity_0_5"
12+
links = "rustsimplicity_0_6"
1313

1414
[build-dependencies]
1515
cc = "1.0.83"

simplicity-sys/depend/env.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,23 @@ typedef rawElementsInput rawInput;
1111
typedef rawElementsTransaction rawTransaction;
1212
typedef rawElementsTapEnv rawTapEnv;
1313

14-
const size_t rustsimplicity_0_5_c_sizeof_rawElementsBuffer = sizeof(rawElementsBuffer);
15-
const size_t rustsimplicity_0_5_c_sizeof_rawElementsOutput = sizeof(rawElementsOutput);
16-
const size_t rustsimplicity_0_5_c_sizeof_rawElementsInput = sizeof(rawElementsInput);
17-
const size_t rustsimplicity_0_5_c_sizeof_rawElementsTransaction = sizeof(rawElementsTransaction);
18-
const size_t rustsimplicity_0_5_c_sizeof_rawElementsTapEnv = sizeof(rawElementsTapEnv);
19-
const size_t rustsimplicity_0_5_c_sizeof_txEnv = sizeof(txEnv);
14+
const size_t rustsimplicity_0_6_c_sizeof_rawElementsBuffer = sizeof(rawElementsBuffer);
15+
const size_t rustsimplicity_0_6_c_sizeof_rawElementsOutput = sizeof(rawElementsOutput);
16+
const size_t rustsimplicity_0_6_c_sizeof_rawElementsInput = sizeof(rawElementsInput);
17+
const size_t rustsimplicity_0_6_c_sizeof_rawElementsTransaction = sizeof(rawElementsTransaction);
18+
const size_t rustsimplicity_0_6_c_sizeof_rawElementsTapEnv = sizeof(rawElementsTapEnv);
19+
const size_t rustsimplicity_0_6_c_sizeof_txEnv = sizeof(txEnv);
2020

21-
const size_t rustsimplicity_0_5_c_alignof_rawElementsBuffer = alignof(rawElementsBuffer);
22-
const size_t rustsimplicity_0_5_c_alignof_rawElementsOutput = alignof(rawElementsOutput);
23-
const size_t rustsimplicity_0_5_c_alignof_rawElementsInput = alignof(rawElementsInput);
24-
const size_t rustsimplicity_0_5_c_alignof_rawElementsTransaction = alignof(rawElementsTransaction);
25-
const size_t rustsimplicity_0_5_c_alignof_rawElementsTapEnv = alignof(rawElementsTapEnv);
26-
const size_t rustsimplicity_0_5_c_alignof_txEnv = alignof(txEnv);
21+
const size_t rustsimplicity_0_6_c_alignof_rawElementsBuffer = alignof(rawElementsBuffer);
22+
const size_t rustsimplicity_0_6_c_alignof_rawElementsOutput = alignof(rawElementsOutput);
23+
const size_t rustsimplicity_0_6_c_alignof_rawElementsInput = alignof(rawElementsInput);
24+
const size_t rustsimplicity_0_6_c_alignof_rawElementsTransaction = alignof(rawElementsTransaction);
25+
const size_t rustsimplicity_0_6_c_alignof_rawElementsTapEnv = alignof(rawElementsTapEnv);
26+
const size_t rustsimplicity_0_6_c_alignof_txEnv = alignof(txEnv);
2727

28-
void rustsimplicity_0_5_c_set_txEnv(txEnv *result, const elementsTransaction *tx, const elementsTapEnv *taproot, const unsigned char *genesisHash, unsigned int ix)
28+
void rustsimplicity_0_6_c_set_txEnv(txEnv *result, const elementsTransaction *tx, const elementsTapEnv *taproot, const unsigned char *genesisHash, unsigned int ix)
2929
{
3030
sha256_midstate genesis;
3131
sha256_toMidstate(genesis.s, genesisHash);
32-
*result = rustsimplicity_0_5_elements_build_txEnv(tx, taproot, &genesis, ix);
32+
*result = rustsimplicity_0_6_elements_build_txEnv(tx, taproot, &genesis, ix);
3333
}

simplicity-sys/depend/simplicity/bitstream.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
* Precondition: NULL != stream
1212
*/
13-
simplicity_err rustsimplicity_0_5_closeBitstream(bitstream* stream) {
13+
simplicity_err rustsimplicity_0_6_closeBitstream(bitstream* stream) {
1414
if (1 < stream->len) return SIMPLICITY_ERR_BITSTREAM_TRAILING_BYTES; /* If there is more than one byte remaining. */
1515
if (1 == stream->len) {
1616
if (0 == stream->offset) return SIMPLICITY_ERR_BITSTREAM_TRAILING_BYTES; /* If there is one byte remaining */
@@ -30,8 +30,8 @@ simplicity_err rustsimplicity_0_5_closeBitstream(bitstream* stream) {
3030
* Precondition: 0 <= n < 32
3131
* NULL != stream
3232
*/
33-
int32_t rustsimplicity_0_5_readNBits(int n, bitstream* stream) {
34-
rustsimplicity_0_5_assert(0 <= n && n < 32);
33+
int32_t rustsimplicity_0_6_readNBits(int n, bitstream* stream) {
34+
rustsimplicity_0_6_assert(0 <= n && n < 32);
3535

3636
uint32_t result = 0;
3737
while (CHAR_BIT <= stream->offset + n) {
@@ -109,7 +109,7 @@ static int32_t decodeUpto3Bits(int32_t* result, bitstream* stream) {
109109
} else {
110110
int32_t n = decodeUpto3(stream);
111111
if (0 <= n) {
112-
*result = rustsimplicity_0_5_readNBits(n, stream);
112+
*result = rustsimplicity_0_6_readNBits(n, stream);
113113
if (*result < 0) return *result;
114114
}
115115
return n;
@@ -153,7 +153,7 @@ static int32_t decodeUpto15Bits(int32_t* result, bitstream* stream) {
153153
} else {
154154
int32_t n = decodeUpto15(stream);
155155
if (0 <= n) {
156-
*result = rustsimplicity_0_5_readNBits(n, stream);
156+
*result = rustsimplicity_0_6_readNBits(n, stream);
157157
if (*result < 0) return *result;
158158
}
159159
return n;
@@ -184,7 +184,7 @@ static int32_t decodeUpto65535(bitstream* stream) {
184184
*
185185
* Precondition: NULL != stream
186186
*/
187-
int32_t rustsimplicity_0_5_decodeUptoMaxInt(bitstream* stream) {
187+
int32_t rustsimplicity_0_6_decodeUptoMaxInt(bitstream* stream) {
188188
int32_t bit = read1Bit(stream);
189189
if (bit < 0) return bit;
190190
if (0 == bit) {
@@ -194,7 +194,7 @@ int32_t rustsimplicity_0_5_decodeUptoMaxInt(bitstream* stream) {
194194
if (n < 0) return n;
195195
if (30 < n) return SIMPLICITY_ERR_DATA_OUT_OF_RANGE;
196196
{
197-
int32_t result = rustsimplicity_0_5_readNBits(n, stream);
197+
int32_t result = rustsimplicity_0_6_readNBits(n, stream);
198198
if (result < 0) return result;
199199
return ((1 << n) | result);
200200
}
@@ -211,9 +211,9 @@ int32_t rustsimplicity_0_5_decodeUptoMaxInt(bitstream* stream) {
211211
* n <= 2^31
212212
* NULL != stream
213213
*/
214-
simplicity_err rustsimplicity_0_5_readBitstring(bitstring* result, size_t n, bitstream* stream) {
214+
simplicity_err rustsimplicity_0_6_readBitstring(bitstring* result, size_t n, bitstream* stream) {
215215
static_assert(0x80000000u + 2*(CHAR_BIT - 1) <= SIZE_MAX, "size_t needs to be at least 32-bits");
216-
rustsimplicity_0_5_assert(n <= 0x80000000u);
216+
rustsimplicity_0_6_assert(n <= 0x80000000u);
217217
size_t total_offset = n + stream->offset;
218218
/* |= stream->len * CHAR_BIT < total_offset iff stream->len < (total_offset + (CHAR_BIT - 1)) / CHAR_BIT */
219219
if (stream->len < (total_offset + (CHAR_BIT - 1)) / CHAR_BIT) return SIMPLICITY_ERR_BITSTREAM_EOF;

simplicity-sys/depend/simplicity/bitstream.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ static inline bitstream initializeBitstream(const unsigned char* arr, size_t len
3636
*
3737
* Precondition: NULL != stream
3838
*/
39-
simplicity_err rustsimplicity_0_5_closeBitstream(bitstream* stream);
39+
simplicity_err rustsimplicity_0_6_closeBitstream(bitstream* stream);
4040

4141
/* Fetches up to 31 bits from 'stream' as the 'n' least significant bits of return value.
4242
* The 'n' bits are set from the MSB to the LSB.
@@ -45,15 +45,15 @@ simplicity_err rustsimplicity_0_5_closeBitstream(bitstream* stream);
4545
* Precondition: 0 <= n < 32
4646
* NULL != stream
4747
*/
48-
int32_t rustsimplicity_0_5_readNBits(int n, bitstream* stream);
48+
int32_t rustsimplicity_0_6_readNBits(int n, bitstream* stream);
4949

5050
/* Returns one bit from 'stream', 0 or 1.
5151
* Returns 'SIMPLICITY_ERR_BITSTREAM_EOF' if no bits are available.
5252
*
5353
* Precondition: NULL != stream
5454
*/
5555
static inline int32_t read1Bit(bitstream* stream) {
56-
return rustsimplicity_0_5_readNBits(1, stream);
56+
return rustsimplicity_0_6_readNBits(1, stream);
5757
}
5858

5959
/* Decode an encoded number between 1 and 2^31 - 1 inclusive.
@@ -64,7 +64,7 @@ static inline int32_t read1Bit(bitstream* stream) {
6464
*
6565
* Precondition: NULL != stream
6666
*/
67-
int32_t rustsimplicity_0_5_decodeUptoMaxInt(bitstream* stream);
67+
int32_t rustsimplicity_0_6_decodeUptoMaxInt(bitstream* stream);
6868

6969
/* Fills a 'bitstring' containing 'n' bits from 'stream'.
7070
* Returns 'SIMPLICITY_ERR_BITSTREAM_EOF' if not enough bits are available.
@@ -76,5 +76,5 @@ int32_t rustsimplicity_0_5_decodeUptoMaxInt(bitstream* stream);
7676
* n <= 2^31
7777
* NULL != stream
7878
*/
79-
simplicity_err rustsimplicity_0_5_readBitstring(bitstring* result, size_t n, bitstream* stream);
79+
simplicity_err rustsimplicity_0_6_readBitstring(bitstring* result, size_t n, bitstream* stream);
8080
#endif

simplicity-sys/depend/simplicity/bitstring.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ typedef struct bitstring {
3030
*/
3131
static inline bool getBit(const bitstring *s, size_t n) {
3232
size_t total_offset = s->offset + n;
33-
rustsimplicity_0_5_assert(n < s->len);
33+
rustsimplicity_0_6_assert(n < s->len);
3434
return 1 & (s->arr[total_offset / CHAR_BIT] >> (CHAR_BIT - 1 - (total_offset % CHAR_BIT)));
3535
}
3636

@@ -40,8 +40,8 @@ static inline bool getBit(const bitstring *s, size_t n) {
4040
* n + 8 <= s->len;
4141
*/
4242
static inline uint_fast8_t getByte(const bitstring *s, size_t n) {
43-
rustsimplicity_0_5_assert(8 <= s->len);
44-
rustsimplicity_0_5_assert(n <= s->len - 8);
43+
rustsimplicity_0_6_assert(8 <= s->len);
44+
rustsimplicity_0_6_assert(n <= s->len - 8);
4545
size_t total_offset = s->offset + n;
4646
if (total_offset % CHAR_BIT <= CHAR_BIT - 8) {
4747
return (uint_fast8_t)(0xff & (s->arr[total_offset / CHAR_BIT] >> (CHAR_BIT - 8 - (total_offset % CHAR_BIT))));

0 commit comments

Comments
 (0)