Skip to content

Commit af3908b

Browse files
authored
Merge pull request #205 from Clikengo/0.5
0.5 release
2 parents 7530fe5 + 0bd061e commit af3908b

File tree

3 files changed

+40
-31
lines changed

3 files changed

+40
-31
lines changed

CHANGELOG.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).
55

66
## 0.5.0
77

8-
- #179, #182: Fix possible runloop undefined behaviors
9-
(`fdb_stop_network` **MUST** be called before the program exits, see issues #170, #181).
8+
- #203: Defaults to foundationdb 6.2.x API version
9+
- #194: Add support for pack with versionstamp
10+
- #194: Fix a bug in the unpacking of signed integers
11+
- #194: Add support for BigInt on Element
12+
- #194: Element now implement Ord and matches the packed ordering
13+
- #194: Bindingtester output now matches official python output
14+
- #179, #182, #202, #204: Fix possible runloop undefined behaviors
15+
(`fdb_stop_network` **MUST** be called before the program exits, see issues #170, #181, #202).
1016
Fixing it required a breaking change with the `foundationdb::boot()` API
1117
- #177: Add support for NEGINTSTART, POSINTEND encoding (@garrensmith)
1218
- #178: Add support for `num-bigint`

foundationdb-sys/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ fdb-6_2 = []
3939
[dependencies]
4040

4141
[build-dependencies]
42-
bindgen = "0.54.0"
42+
bindgen = "0.55.1"

foundationdb/README.md

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,34 +13,34 @@ Install FoundationDB on your system, see [FoundationDB Local Development](https:
1313
- Ubuntu Linux (this may work on the Linux subsystem for Windows as well)
1414

1515
```console
16-
$> curl -O https://www.foundationdb.org/downloads/6.1.12/ubuntu/installers/foundationdb-clients_6.1.12-1_amd64.deb
17-
$> curl -O https://www.foundationdb.org/downloads/6.1.12/ubuntu/installers/foundationdb-server_6.1.12-1_amd64.deb
18-
$> sudo dpkg -i foundationdb-clients_6.1.12-1_amd64.deb
19-
$> sudo dpkg -i foundationdb-server_6.1.12-1_amd64.deb
16+
$> curl -O https://www.foundationdb.org/downloads/6.2.15/ubuntu/installers/foundationdb-clients_6.2.25-1_amd64.deb
17+
$> curl -O https://www.foundationdb.org/downloads/6.2.15/ubuntu/installers/foundationdb-server_6.2.25-1_amd64.deb
18+
$> sudo dpkg -i foundationdb-clients_6.2.25-1_amd64.deb
19+
$> sudo dpkg -i foundationdb-server_6.2.25-1_amd64.deb
2020
```
2121

2222
- macOS
2323

2424
```console
25-
$> curl -O https://www.foundationdb.org/downloads/6.1.12/macOS/installers/FoundationDB-6.1.12.pkg
26-
$> sudo installer -pkg FoundationDB-6.1.12.pkg -target /
25+
$> curl -O https://www.foundationdb.org/downloads/6.2.25/macOS/installers/FoundationDB-6.2.25.pkg
26+
$> sudo installer -pkg FoundationDB-6.2.25.pkg -target /
2727
```
2828

2929
- Windows
3030

31-
https://www.foundationdb.org/downloads/6.1.12/windows/installers/foundationdb-6.1.12-x64.msi
31+
https://www.foundationdb.org/downloads/6.2.25/windows/installers/foundationdb-6.2.25-x64.msi
3232

3333
## Add dependencies on foundationdb-rs
3434

3535
```toml
3636
[dependencies]
37-
foundationdb = "0.4.0"
37+
foundationdb = "0.5"
3838
futures = "0.3"
3939
```
4040

4141
## Initialization
4242

43-
Due to limitations in the C API, the Client and it's associated Network can only be initialized and run once per the life of a process. Generally the `foundationdb::boot` function will be enough to initialize the Client. See `foundationdb::default_api` and `foundationdb::builder` for more configuration options of the Fdb Client.
43+
Due to limitations in the C API, the Client and it's associated Network can only be initialized and run once per the life of a process. Generally the `foundationdb::run` function will be enough to initialize the Client. See `foundationdb::default_api` and `foundationdb::builder` for more configuration options of the Fdb Client.
4444

4545
## Example
4646

@@ -65,9 +65,23 @@ async fn async_main() -> foundationdb::FdbResult<()> {
6565
Ok(())
6666
}
6767

68-
foundationdb::run(|| {
69-
futures::executor::block_on(async_main()).expect("failed to run");
70-
});
68+
// Safe because drop is called before the program exits
69+
let network = unsafe { foundationdb::boot() };
70+
futures::executor::block_on(async_main()).expect("failed to run");
71+
drop(network);
72+
```
73+
74+
```rust
75+
#[tokio::main]
76+
async fn main() {
77+
// Safe because drop is called before the program exits
78+
let network = unsafe { foundationdb::boot() };
79+
80+
// Have fun with the FDB API
81+
82+
// shutdown the client
83+
drop(network);
84+
}
7185
```
7286

7387
## Migration from 0.4 to 0.5
@@ -87,24 +101,13 @@ drop(network);
87101
This can be converted to:
88102

89103
```rust
90-
foundationdb::boot(|| {
91-
futures::executor::block_on(async_main()).expect("failed to run");
92-
}).expect("failed to boot fdb");
93-
```
94-
95-
or
96-
97-
```rust
98-
#[tokio::main]
99-
async fn main() {
100-
// Safe because drop is called before the program exits
101-
let network = unsafe { foundationdb::boot() }.expect("failed to initialize Fdb");
104+
// Safe because drop is called before the program exits
105+
let network = unsafe { foundationdb::boot() };
102106

103-
// Have fun with the FDB API
107+
futures::executor::block_on(async_main()).expect("failed to run");
104108

105-
// shutdown the client
106-
drop(network);
107-
}
109+
// cleanly shutdown the client
110+
drop(network);
108111
```
109112

110113
## API stability

0 commit comments

Comments
 (0)