Commit graph

64 commits

Author SHA1 Message Date
David Tolnay
033ce7edf7 Update serde from 1.0.167 to 1.0.176
Reviewed By: quark-zju

Differential Revision: D47811862

fbshipit-source-id: 03cefc52f3d024a2d0fb5580bed079ff2b4651e0
2023-07-26 21:23:58 -07:00
Daniel Mueller
f5831c73d5 Update num_cpus to 1.16.0
Summary:
Update num_cpus to version 1.16.0. We need this version as it is a requirement
of libbpf-sys v1.2.1+v1.2.0, which is to be imported subsequently.

Reviewed By: zertosh

Differential Revision: D47380958

fbshipit-source-id: d1fa12a1c8a974686d70d47876e990da4a73b839
2023-07-13 19:19:42 -07:00
Astrid Yu
460387b9c8 third-party/rust: bump tokio v1.25.0 -> v1.29.1
Summary: Needed for reqwest QUIC support (requirement of ^1.28)

Reviewed By: zertosh

Differential Revision: D47304356

fbshipit-source-id: d39999373ae51f79123927a073f3073e21a10078
2023-07-12 15:32:56 -07:00
David Tolnay
2124de21b0 Updates of dtolnay crate-o-matic universe
Reviewed By: zertosh

Differential Revision: D47316925

fbshipit-source-id: d6d374466693cff397a0358bb38c790575998a21
2023-07-08 14:36:37 -07:00
David Tolnay
3c7aee92ee Update serde and serde_json
Reviewed By: zertosh

Differential Revision: D47316922

fbshipit-source-id: bc9c0b407d27fee3d590e456d4ddba34e0228f34
2023-07-08 14:34:39 -07:00
Thomas Orozco
999c1698cf (reland) rust/third-party: update to futures 0.3.28
Summary:
Note: this is a re-land of D44623815, which was was reverted because of a land race with D44626072

In particular this fixes `FlattenUnordered` having a nasty deadlock, but also
some other  bugs:

```
# 0.3.28 - 2023-03-30

* Update to syn 2. This raises MSRV of utility crates to 1.56. (#2730, #2733)
* Fix bug in `FlattenUnordered` (#2726, #2728)

# 0.3.27 - 2023-03-11

* Add `TryFlattenUnordered` (#2577, #2590, #2606, #2607)
* Add `AbortHandle::is_aborted` (#2710)
* Add `AbortRegistration::handle` (#2712)
* Make `BiLock` strict-provenance compatible (#2716)

# 0.3.26 - 2023-01-30

* Add `Either::as_pin_mut` and `Either::as_pin_ref` (#2691)
* Add `Shared::ptr_eq` and `Shared::ptr_hash` (#2691)
* Implement `FusedStream` for `Buffered` (#2676)
* Implement `FusedStream` for all streams in `ReadyChunks` (#2693)
* Fix bug in `FuturesOrdered::push_front` (#2664)
* Remove `Fut::Output: Clone` bounds from some `Shared` methods (#2662)
* Remove `T: Debug` bounds from `Debug` implementations of `mpsc` and `oneshot` types (#2666, #2667)

# 0.3.25 - 2022-10-20

* Fix soundness issue in `join!` and `try_join!` macros (#2649)
* Implement `Clone` for `sink::Drain` (#2650)

# 0.3.24 - 2022-08-29

* Fix incorrect termination of `select_with_strategy` streams (#2635)

# 0.3.23 - 2022-08-14

* Work around MSRV increase due to a cargo bug.
```

Reviewed By: zertosh

Differential Revision: D44632588

fbshipit-source-id: bdd87cb02b3aef63a65b1f9b852579225adfedbd
2023-04-04 10:14:43 -07:00
Mark Isaacson
b2db0b2202 Revert D44623815: rust/third-party: update to futures 0.3.28
Differential Revision:
D44623815

Original commit changeset: 343ddb9277e1

Original Phabricator Diff: D44623815

fbshipit-source-id: 2d99e8d24fd9b13343dfeb082788b0a6258fbe8c
2023-04-03 09:25:13 -07:00
Thomas Orozco
ec3b8f6cc1 rust/third-party: update to futures 0.3.28
Summary:
In particular this fixes `FlattenUnordered` having a nasty deadlock, but also
some other  bugs:

```
# 0.3.28 - 2023-03-30

* Update to syn 2. This raises MSRV of utility crates to 1.56. (#2730, #2733)
* Fix bug in `FlattenUnordered` (#2726, #2728)

# 0.3.27 - 2023-03-11

* Add `TryFlattenUnordered` (#2577, #2590, #2606, #2607)
* Add `AbortHandle::is_aborted` (#2710)
* Add `AbortRegistration::handle` (#2712)
* Make `BiLock` strict-provenance compatible (#2716)

# 0.3.26 - 2023-01-30

* Add `Either::as_pin_mut` and `Either::as_pin_ref` (#2691)
* Add `Shared::ptr_eq` and `Shared::ptr_hash` (#2691)
* Implement `FusedStream` for `Buffered` (#2676)
* Implement `FusedStream` for all streams in `ReadyChunks` (#2693)
* Fix bug in `FuturesOrdered::push_front` (#2664)
* Remove `Fut::Output: Clone` bounds from some `Shared` methods (#2662)
* Remove `T: Debug` bounds from `Debug` implementations of `mpsc` and `oneshot` types (#2666, #2667)

# 0.3.25 - 2022-10-20

* Fix soundness issue in `join!` and `try_join!` macros (#2649)
* Implement `Clone` for `sink::Drain` (#2650)

# 0.3.24 - 2022-08-29

* Fix incorrect termination of `select_with_strategy` streams (#2635)

# 0.3.23 - 2022-08-14

* Work around MSRV increase due to a cargo bug.
```

Reviewed By: zertosh

Differential Revision: D44623815

fbshipit-source-id: 343ddb9277e1703104e516d07fe0610b5020930a
2023-04-03 08:30:49 -07:00
Andres Suarez
9e481229b3 Update tempfile from 3.4 to 3.5
Reviewed By: quark-zju

Differential Revision: D44524245

fbshipit-source-id: 167471d01b0afbbc34ced88574dbfb09799aadf6
2023-03-30 17:11:37 -07:00
Jeremy Fitzhardinge
f51250f09c third-party/rust: update tempfile to 3.4
Summary:
Removes need for patch.

It had already been updated to 3.4 but this just formalizes it.

Reviewed By: jasonwhite

Differential Revision: D44274378

fbshipit-source-id: d17ecbbee06c7df30f689eb859fb31fdf07d8d44
2023-03-21 15:25:59 -07:00
Arun Thulasi
d51b9e8a1c Update libc-0.2.137 to libc-0.2.139
Reviewed By: zertosh

Differential Revision: D43203556

fbshipit-source-id: 460f339f603fec97f367967a20a4c6e7a81ad027
2023-02-12 16:30:00 -08:00
Andres Suarez
4dd84a499d Update tokio-1.21.2 to tokio-1.25.0
Reviewed By: diliop

Differential Revision: D42837228

fbshipit-source-id: 5e891cf1ff8ab1beff6e3c845b913144655778ea
2023-01-30 14:49:36 -08:00
Jason White
9515dfe3c2 Only compile for Linux
Summary:
Everything in Reverie is super Linux-specific, so we should just skip compilation if we're not targetting Linux.

This is helpful for consumers of the library when it gets published to crates.io. With this, they don't need to have a special case for this in the `[dependencies]` section of `Cargo.toml`.

Reviewed By: VladimirMakaev

Differential Revision: D41824410

fbshipit-source-id: be1e0a887e35ed151cfad27af8107246df30c2e5
2022-12-07 18:05:11 -08:00
Jason White
7b7c638449 Fix broken doc links
Summary: Fixes broken doc links so that `cargo doc` succeeds again.

Reviewed By: rrnewton

Differential Revision: D41588324

fbshipit-source-id: ed539bef5ea2a91562ec7d03a756ea4cc3f9000a
2022-11-29 13:53:16 -08:00
Jason White
8058dd4803 reverie-process: Fix remaining unnecessary usage of unsafe
Summary: Missed these in a previous diff.

Reviewed By: rrnewton

Differential Revision: D41567346

fbshipit-source-id: eba0b738a66da1823312803ed91fdc5eeaf90c57
2022-11-29 08:26:39 -08:00
Jason White
5ff7f23e25 Remove file descriptor niche optimization
Summary: This size optimization relies on a nightly feature that will likely never be stabilized. All it did was make `Option<Fd>` equal to 4 bytes instead of 8 bytes.

Reviewed By: rrnewton

Differential Revision: D41506685

fbshipit-source-id: 15aa75b01200ff7f179373b07e14f542590aa24d
2022-11-28 12:21:33 -08:00
Jason White
2a73bdeb1c Move set_output_capture behind the nightly feature flag
Summary: `std::io::set_output_capture()` is only available in nightly. In order to publish this crate, we can't use unstable features.

Reviewed By: rrnewton

Differential Revision: D41394375

fbshipit-source-id: d4b6e9310cd6d6925aa9d7b0cd5c4558d6ef7d4c
2022-11-21 11:07:23 -08:00
Jason White
3a0494e2bc Remove need for never_type unstable feature
Summary: Refactors `do_exec` a little bit so that it no longer needs the `never_type` feature. This doesn't affect correctness at all.

Reviewed By: rrnewton

Differential Revision: D41394377

fbshipit-source-id: 30e8793557d12d9aef1c5641eb782b170f86512b
2022-11-21 11:07:23 -08:00
Jason White
5ca441ea60 Make rustc_attrs unstable feature optional
Summary: The usage of `rustc_attrs` is completely optional and only serves as a size optimization for the `Fd` type.

Reviewed By: rrnewton

Differential Revision: D41394376

fbshipit-source-id: 2f4898b872dc32c517df99e0b5f4a82fad5bda77
2022-11-21 11:07:23 -08:00
Jason White
100dd3ec3a Add "nightly" crate feature
Summary:
This adds the "nightly" crate feature to `reverie-process` so that it can use nightly features if they are enabled.

This *should* let it still get uploaded to crates.io, but some fancy optional nightly features will be hidden behind this feature flag. Then, we can still use these features internally.

Reviewed By: rrnewton

Differential Revision: D41394572

fbshipit-source-id: 6f5eaccd070f85c839089d3d5e5994471948afd4
2022-11-21 11:07:23 -08:00
Ryan Newton
d7e9901f53 use RunOpts more uniformly
Summary: These previous launch_* functions can be simplified by using RunOpts to contain all the relevant information about a run, plus everything needed to print a reproducer command.

Reviewed By: VladimirMakaev

Differential Revision: D41329114

fbshipit-source-id: 5bab08dfbf28e1cee7fd244178e03ba2cdc1ba34
2022-11-16 07:01:14 -08:00
Jason White
76adc9174f Fix initial syscall injection
Summary: This fixes the initial syscall injection on aarch64. This also does slight simplification of the instructions that get plopped down at the current instruction pointer so that we can fit the instructions into a single word. That is, instead of injecting `INT3; SYSCALL; INT3`, we inject `SYSCALL; INT3`.

Reviewed By: VladimirMakaev

Differential Revision: D40867427

fbshipit-source-id: 2afa96f2270e16284523a17b09da00529893c20e
2022-11-01 10:11:35 -07:00
Jason White
2346c73d2c Fix tests on aarch64
Summary: Gets all tests in `reverie-process` successfully working on aarch64.

Reviewed By: VladimirMakaev

Differential Revision: D40867425

fbshipit-source-id: 4aa7b0be17a40f677baf5de312a0765f8c41c2a4
2022-11-01 10:11:35 -07:00
David Tolnay
a3ed18f93a Update libc to 0.2.137
Summary: Update from 0.2.135 to 0.2.137, the latest version on crates.io, in preparation for backporting a PR in the diff after this one.

Reviewed By: zertosh

Differential Revision: D40874274

fbshipit-source-id: debf9dae82ecc20201470e634f10904a2b308e51
2022-11-01 02:16:19 -07:00
Vladimir Makaev
03cbd6044d update hermetic_infra/** files with correct license header - 1/x
Summary:
Followed guide here https://www.internalfb.com/intern/wiki/Linting/License_Lint/ to add fbcode/hermetic_infra/** code to license linter. As we have parts of our code shipped as Open Source it's important to get this automated

This diff is updating existing file's licenses to not get conflict after lint rule enablement

Reviewed By: jasonwhite

Differential Revision: D40674080

fbshipit-source-id: da6ecac036f8964619cf7912058f3a911558e7b1
2022-10-26 12:18:14 -07:00
Andrey Buchinskiy
a24e92eea4 bump tokio version to 1.21.2
Reviewed By: zertosh

Differential Revision: D40199323

fbshipit-source-id: 32355e73ea669a180ac759ddb02760db10c8b02b
2022-10-14 15:24:20 -07:00
Sargun Dhillon
fa682caf9b Update Rust libc crate to 0.2.135
Summary: This updates the libc crate to 0.2.135, which includes the FICLONE constant needed to the given ioctl.

Reviewed By: justintrudell

Differential Revision: D40286796

fbshipit-source-id: acfa115479cd289f478d8d73937be34ced5c4bbb
2022-10-13 18:51:18 -07:00
Jason White
38a3818c48 third-party/rust: Update syscalls v0.6.6 -> v0.6.7
Reviewed By: rrnewton

Differential Revision: D40312880

fbshipit-source-id: b6386d3821507787e7d76c86c1f63c265be86319
2022-10-12 14:29:02 -07:00
Sophia Sun
aadb1865e7 Update nix crate from 0.23 to 0.25
Summary:
When I was trying to use `nix::unistd::gethostname` in D39783468, the version `0.23.0` will require users to pass in a `buf` as a parameter, however, in `0.25.0`, there is no need to pass in a `buf` as a parameter. Hence, I would love to update `nix` crate from `0.23` to `0.25` in order to not pass a redundant `buf` while calling `nix::unistd::gethostname`.

I fixed conflicts reflected from the signals manually so this diff is more than a few lines of code in `Cargo.toml`.

Here are the [changes](https://github.com/nix-rust/nix/compare/v0.23.0..v0.25.0) between `0.23` and `0.25`. See `CHANGELOG.md` for the most significant changes in this version.

Reviewed By: bgw

Differential Revision: D39919100

fbshipit-source-id: 7f62585ff72230bd2608aeb5a4780dc0128795f7
2022-10-03 15:31:17 -07:00
Andres Suarez
42214f8ec2 update to rust 1.64.0
Summary: https://blog.rust-lang.org/2022/09/22/Rust-1.64.0.html

Reviewed By: diliop, dtolnay

Differential Revision: D39825734

fbshipit-source-id: 4a789f2c24707fbc6a14b506448d405d5a60a53d
2022-09-27 15:18:58 -07:00
Paul Saab
90da155f18 Fix aarch64 build for fbcode//hermetic_infra/reverie:reverie-process
Summary: aarch64 is unsigned char so cast to libc::c_char

Reviewed By: dmm-fb

Differential Revision: D39802725

fbshipit-source-id: edaef4a14d88519abbd59bffa6ef6a74a0a96397
2022-09-25 10:32:37 -07:00
Andres Suarez
2364202dfc Update raw-cpuid-10.2.0 to raw-cpuid-10.6.0
Reviewed By: dtolnay

Differential Revision: D39622388

fbshipit-source-id: 10329e7037400986fd7c08a0d0dfbbd48332088a
2022-09-19 10:25:55 -07:00
Andres Suarez
0f60462d16 Update libc-0.2.125 to libc-0.2.132
Reviewed By: dtolnay

Differential Revision: D39578353

fbshipit-source-id: 800721931e82485678e8ecf997afcc6711f6d4cf
2022-09-16 20:06:28 -07:00
David Tolnay
3deaf0e0c0 third-party/rust: Revert D39418421 "unpin thiserror"
Summary: D39418421 (8fef664fab) prematurely upgraded `thiserror`. Various projects in fbcode use nightly features including std::backtrace but the current fbcode Rust toolchain is 1.63.0, in which the backtrace API is different from the API of the latest nightlies.

Reviewed By: quark-zju

Differential Revision: D39562441

fbshipit-source-id: d1f8a993ec776cf82b1736b242bd4466def21230
2022-09-15 17:20:40 -07:00
Edwin Smith
8fef664fab unpin thiserror
Reviewed By: bolinfest, zertosh

Differential Revision: D39418421

fbshipit-source-id: 2f0246f190403a6f481e8803834174f229c0849a
2022-09-13 07:15:29 -07:00
Michael Bolin
c013909676 pin libc crate to 0.2.125
Reviewed By: ImanolBarba

Differential Revision: D39433159

fbshipit-source-id: 4442651a0874ebc6724796206db02c20e455a1c0
2022-09-12 09:55:50 -07:00
Michael Bolin
3c618d400d use git-config@0.7.1 instead of patched version
Reviewed By: mzr

Differential Revision: D39331880

fbshipit-source-id: 5990d68d718297a6df72e5eea3c16fed5b84169e
2022-09-09 21:01:16 -07:00
Jan Mazur
0a18bdf95f futures 0.3.21 -> 0.3.24
Summary: We have some deprecated functions in GH builds.

Differential Revision: D38909563

fbshipit-source-id: 3e8b77b10c352bfdfcbfe344f0ea2e95d4a339ad
2022-09-05 13:49:07 -07:00
Jason White
357e7cac79 third-party/rust: Update syscalls crate v0.6.5 -> v0.6.6
Summary:
Updates the `syscalls` crate.

Changelog:
 - Added aarch64 support.

Reviewed By: psaab

Differential Revision: D38730424

fbshipit-source-id: fa7e0f65401a11c669058c5ffe280cce605ca017
2022-08-17 01:21:44 -07:00
Stiopa Koltsov
e53c5ef362 Apply rustfmt
Reviewed By: zertosh

Differential Revision: D38485027

fbshipit-source-id: 0f5e5b743e002045c95aca427b76e969d6bce347
2022-08-06 08:21:44 -07:00
Stiopa Koltsov
4192366432 Remove ::{self}
Summary: Cleanup after reformat one import per line.

Reviewed By: zertosh

Differential Revision: D38207167

fbshipit-source-id: e463575513a72583ea8d6359636e8eaeebb488e2
2022-07-27 09:53:37 -07:00
Jason White
f5c1175aa9 third-party/rust: Update syscalls 0.6.2 -> 0.6.5
Summary:
## v0.6.5

 - Renamed `with-serde` feature to just `serde`. The `with-serde` feature will
   be removed in the next major release.
 - Implemented `Serialize` and `Deserialize` for `SysnoSet`.

## v0.6.4

 - Implemented `Default`, `BitOr`, and `BitOrAssign` for `SysnoSet`.

## v0.6.3

 - Added features to expose the syscall tables of other architectures besides
   the target architecture. There is one feature per architecture and have the
   same name. For example, if the target architecture is `x86-64` and we also
   want the syscall table for `x86`, the `x86` feature can be enabled. Then,
   `syscalls::x86::Sysno` will be exposed.
 - Added the `all` feature, which enables the syscall tables for all
   architectures.
 - Added the `full` feature, which enables all current and future features for
   the crate.
 - Added man page links for all syscalls. Since these are generated, some links
   may be broken.

Reviewed By: johnhurt

Differential Revision: D37871066

fbshipit-source-id: 4aa4674d0dcf1168d989a34062befa3b07456d68
2022-07-15 12:52:06 -07:00
Jason White
6813d9a7b2 rustfmt with imports_granularity=Item
Summary: This makes merge conflicts much easier to handle.

Reviewed By: johnhurt

Differential Revision: D37564000

fbshipit-source-id: a7f1a2711ffbdbb23c93e2f479f47d0368a2dad9
2022-06-30 14:56:20 -07:00
Jason White
d34189fda6 third-party/rust: Update syscalls crate 0.6.1 -> 0.6.2
Summary:
From the changelog:
 - Added `SysnoSet` for constructing sets of syscalls. It uses a bitset under
   the hood and provides constant-time lookup and insertion of `Sysno`s.
 - Fixed `Sysno::len()` returning the wrong value for architectures with large
   syscall offsets.
 - Deprecated `Sysno::len()`. Use `Sysno::table_size()` instead. This will be
   removed in the next major version.

Differential Revision: D37556871

fbshipit-source-id: a287f2146a0776e6f0459a08b43a1d5a92bb6176
2022-06-30 11:59:56 -07:00
Jason White
674fbb2af5 third-party/rust: Update syscalls 0.6.0 -> 0.6.1
Reviewed By: johnhurt

Differential Revision: D37051530

fbshipit-source-id: e21fc86f98c5f55817ba6f412d7271b3da63d7bb
2022-06-09 18:12:21 -07:00
Jason White
20c7020868 Appease the copyright linter
Summary: The OSS license linter doesn't like the word "its".

Reviewed By: johnhurt

Differential Revision: D36856385

fbshipit-source-id: 909037d96de8976f08004497d28b77838f8c6870
2022-06-02 11:51:06 -07:00
Jason White
d16ca7d7c0 Change Facebook -> Meta Platforms in Cargo.toml files
Reviewed By: johnhurt

Differential Revision: D36727976

fbshipit-source-id: 0449545ee3fb2faf4febcdec0be1d5940af5e937
2022-05-27 10:20:35 -07:00
Jason White
1bbfa8a5a2 Update copyright headers
Reviewed By: johnhurt

Differential Revision: D36727878

fbshipit-source-id: 2529052f6a81fb5a177ccdba51b7e0051577c148
2022-05-27 09:51:26 -07:00
Jason White
011e521c08 third-party/rust: Update syscalls crate 0.5 -> 0.6
Summary:
Changelog:
 * Removed `build.rs` and switched to Rust's inline assembly syntax. This should enable better codegen, including the ability to have syscalls get inlined.
 * **Breaking**: Architectures besides `arm`, `x86`, and `x86-64` now require nightly.
 * **Breaking**: Removed top-level `SYS_` constants. Just use the `Sysno` enum instead.

Reviewed By: johnhurt

Differential Revision: D36606892

fbshipit-source-id: 9d20addfec65fa712b25d9449ec6e414187565ca
2022-05-24 09:29:52 -07:00
Jason White
f507b56319 third-party/rust: Update syscalls crate to v0.5.0
Summary:
See https://github.com/jasonwhite/syscalls/blob/master/CHANGELOG.md

The biggest change here is that the type of syscall registers and return values was changed from `u64` to `usize` (to support 32-bit architectures).

Reviewed By: zertosh

Differential Revision: D36157822

fbshipit-source-id: d8776b6809dd00df93b147ee34deb37df61a2675
2022-05-05 13:15:19 -07:00