Jacob Lifshay
Jacob Lifshay
tested...it works for me now! hopefully I can figure out how to get it to work *with* litedram though, since I want to try to boot linux at some point,...
Merged in latest changes from master (thanks, Tobias Platen!)
I think we should instead do something like the following: ```rust #[repr(C)] struct MyStruct { #[repr(bitfield(u32))] a: uint, #[repr(bitfield(u32))] b: uint, #[repr(bitfield(new, u32))] c: uint, #[repr(bitfield(u16, new))] d: u16, e:...
> * [Deku ](https://crates.io/crates/deku) which looks to me to be the nicest bitfield crate requires at least `alloc` - a potential non-starter for embedded. from looking at the cargo features...
imho `to_signed`/`to_unsigned` are still useful because they convert to the appropriate type regardless of type width, this is useful for macros where you want to be generic over type width...
https://play.rust-lang.org/?version=stable&mode=release&edition=2021&gist=44ac01c70f01f2f78863120f3bf31c01 ```rust pub struct BitVec(UnsignedIntTy); pub trait ShiftOps { fn shl(self, amount: u32) -> Self; fn shr(self, amount: u32) -> Self; fn ashr(self, amount: u32) -> Self; } macro_rules! impl_shift_ops...
sounds good as long as you have to opt-in, e.g. via `#[derive(Into, TryFrom)]`
any progress?
anything needed before both this and #76156 can be stabilized?
version 3.0 was released, since this fixes UB in LLVM, I think it's worth taking a closer look at