Commit Graph

333 Commits

Author SHA1 Message Date
Daniel McNab
043c18b4ba
Allow building on spir-v (#67)
* Allow building on spir-v

* Remove spurious `self`
2021-06-11 13:30:50 -06:00
Lokathor
c33343ddfb (cargo-release) start next development iteration 1.6.1-alpha.0 2021-06-10 14:10:58 -06:00
Lokathor
37b82b32c6 (cargo-release) version 1.6.0 2021-06-10 14:10:35 -06:00
Lokathor
65121b48eb changelog. 2021-06-10 14:09:58 -06:00
Lokathor
99ecb1f6cb rename "unwrap" to "peel". 2021-06-10 14:05:15 -06:00
Connor Horman
cd8dbd64e9
Attach min_const_generics to a crate feature (#63)
* Attach min_const_generics to a crate feature

* Remove `min_const_generics` detection logic
2021-06-05 08:25:57 -06:00
Zakarum
f3e16c7051
Implement Pod and Zeroable for arrays of any size (#59)
* Implement Pod and Zeroable for arrays of any size

Only when rustc version is 1.51 or newer

* Rename cfg flag after feature name
2021-04-01 19:56:49 -06:00
Luis Wirth
30a96066fa
[Feature] extend TransparentWrapper conversion functions (#58)
* update rustfmt.toml

replace `merge_imports = true` (deprecated) with `imports_granularity = "Crate"`

* run `cargo +nightly fmt`

* rewrite docs and rename `Wrapped` to `Inner`

rewriting some docs for conciseness

rename `Wrapped` to `Inner`, because it's hard to visually differentiate between
`Wrapper` and `Wrapped`

* impl missing `TransparentWrapper::wrap_{}` fns

Implement 3 new wrapping functions on `TransparentWrapper` providing new
conversions.

- `TransparentWrapper::wrap(s: Inner) -> Self`
- `TransparentWrapper::wrap_slice(s: &[Inner]) -> &[Self]`
- `TransparentWrapper::wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]`

* impl `TransparentWrapper::unwrap_{}` fns

Implement counterparts to `TransparentWrapper::wrap_{}` functions
providing reverse conversions.

- `TransparentWrapper::unwrap(self) -> Inner`
- `TransparentWrapper::unwrap_ref(&self) -> &Inner`
- `TransparentWrapper::unwrap_mut(&mut self) -> &mut Inner`
- `TransparentWrapper::unwrap_slice(s: &[Self]) -> &[Inner]`
- `TransparentWrapper::unwrap_slice_mut(s: &mut [Self]) -> &mut [Inner]`

* add `TransparentWrapper` UB test

This test is only for MIRI to check all trait functions on
`TransparentWrapper` if they cause any UB.
The output of the functions is not checked.

* small `TransparentWrapper` doc adjustments

* change fn signature on `TransparentWrapper`

Methods on `TransparentWrapper` trait are now associated functions.
They now take `Self` instead of `self` as argument)

- `TransparentWrapper::unwrap(s: Self)`
- `TransparentWrapper::unwrap_ref(s: &Self)`
- `TransparentWrapper::unwrap_mut(s: &mut Self)`
2021-03-28 23:11:13 -06:00
Lokathor
08a4b8fbc2 (cargo-release) start next development iteration 1.5.2-alpha.0 2021-02-17 21:46:55 -07:00
Lokathor
6f1c78e824 (cargo-release) version 1.5.1 2021-02-17 21:46:34 -07:00
Lokathor
72d90839e5 changelog. 2021-02-17 21:46:31 -07:00
Lokathor
e5d5061854
adjust the code to match the claims of the docs. (#53) 2021-02-17 21:43:32 -07:00
Lokathor
b05354dc01 (cargo-release) start next development iteration 1.5.1-alpha.0 2021-01-13 16:53:04 -07:00
Lokathor
e1e5ebda61 (cargo-release) version 1.5.0 2021-01-13 16:52:46 -07:00
Lokathor
91777cc1aa changelog. 2021-01-13 16:52:23 -07:00
Lokathor
7e76723b3d
pod_collect_to_vec (#50)
* add the requested feature.

* maybe we need to be more aggressive than cargo clean is?
2021-01-13 16:49:11 -07:00
Lokathor
df53958735 (cargo-release) start next development iteration 1.0.2-alpha.0 2020-11-27 09:33:20 -07:00
Lokathor
1cf639571b (cargo-release) version 1.0.1 2020-11-27 09:32:36 -07:00
Fabio Valentini
51d68a4220
Include LICENSE files in published bytemuck_derive crates (#47) 2020-11-27 08:31:40 -07:00
Lokathor
8b0710cd96
Update rust.yml 2020-10-21 15:06:52 -06:00
Lokathor
094f76ad73
Closes https://github.com/Lokathor/bytemuck/issues/39
On older compilers, you need to say `extern crate proc_macro;` even in 2018 edition. Since it doesn't hurt in newer compilers, we'll just do that.
2020-10-21 14:21:43 -06:00
Lokathor
00cbef6b83
Create changelog.md 2020-10-21 14:19:13 -06:00
Lokathor
93d8e53509
Update changelog.md 2020-10-21 14:18:21 -06:00
Lokathor
45bafba41c
Update changelog.md 2020-10-21 14:17:20 -06:00
Lokathor
65b64fd8aa
Update rust.yml 2020-10-21 14:12:13 -06:00
Yanchi Toth
b264926ac0
Emit padding-asserting code that doesn't trigger clippy::identity_op (#45) 2020-10-21 14:11:30 -06:00
Marvin Löbel
92ce415317
Prevent try_zeroed_box<T>() from reserving size_of<T>() space on the stack. (#43)
* Add test

* Change try_zeroed_box implementation to not allocate space for T on the stack

* Add second test
2020-10-21 14:11:09 -06:00
Lokathor
78b36f2be5 (cargo-release) start next development iteration 1.4.2-alpha.0 2020-09-08 15:15:00 -06:00
Lokathor
68ed5fe6f2 (cargo-release) version 1.4.1 2020-09-08 15:14:52 -06:00
Thom Chiovoloni
64cc5973c4
Add more tests, overhaul CI, and fix plug soundness hole in bytemuck::offset_of! (#38)
* Ensure functions that take generic <A, B> don't call them <T, U>

* Plug soundness hole in offset_of with safe_packed_borrows lint

* Add some more tests I noticed were missing (still many missing)

* Make CI way more thorough

* Fix running MSRV tests with unsupported `--feature`s

* Disable derive tests in sanitizers, and fix miri ci
2020-09-06 18:56:41 -06:00
Thom Chiovoloni
343c618fea
Mark playground as all-features (#37) 2020-09-05 12:33:29 -06:00
Mikko Perttunen
e013e747e7
Add/rename LICENSE files (#36)
Add LICENSE files for the MIT and Apache 2.0 licenses, and rename
LICENSE-ZLIB.md to just LICENSE-ZLIB. This allows the cargo-lichking
tool to automatically detect these files and create bundled 3rdparty
license files for crates using bytemuck.
2020-08-31 11:55:43 -06:00
Lokathor
b816a1b585 (cargo-release) start next development iteration 1.4.1-alpha.0 2020-08-27 21:43:33 -06:00
Lokathor
426df7c9c0 (cargo-release) version 1.4.0 2020-08-27 21:43:25 -06:00
Lokathor
6632bcef2c Update Cargo.toml 2020-08-27 21:39:14 -06:00
Lokathor
09ab956bea update the optional derives to the released version 2020-08-27 21:37:08 -06:00
Lokathor
c171ac4f5b (cargo-release) start next development iteration 1.0.1-alpha.0 2020-08-27 21:34:05 -06:00
Lokathor
9aedc156a8 (cargo-release) version 1.0.0 2020-08-27 21:33:46 -06:00
Lokathor
a6418a963d clarify versions. 2020-08-27 21:27:48 -06:00
Lucien Greathouse
19e61623d7
Blame struct name, better error for padding (#35) 2020-08-23 20:12:47 -06:00
Lokathor
e053f8b456 Merge branch 'main' of https://github.com/Lokathor/bytemuck into main 2020-08-22 06:48:30 -06:00
Lokathor
d445228bd8
Update rust.yml 2020-08-21 16:54:06 -06:00
Lokathor
ef6d1ea1c4
Update rust.yml 2020-08-21 16:44:15 -06:00
Robin Appelman
24b71e078f
add derive macro for Contiguous (#31) 2020-08-21 16:08:34 -06:00
Lokathor
e202fa2756 (cargo-release) version 1.0.0-alpha.3 2020-08-21 15:27:04 -06:00
Lucien Greathouse
550dc3396c
Fix Pod derive to use explicit absolute path to 'core' (#32) 2020-08-21 15:13:55 -06:00
Lokathor
ef32c088a2 docs typo 2020-08-20 20:28:54 -06:00
Lokathor
5d7c6cacfe use pre-release in CI for now. 2020-08-20 19:49:23 -06:00
Lokathor
14fa8650f0 (cargo-release) version 1.0.0-alpha.2 2020-08-20 19:46:44 -06:00
Lokathor
d88235518f bytemuck_derive: readme 2020-08-20 19:46:22 -06:00