Skip to content

Releases: DuckLogic/rust-static-reflect

Add TypeInfo variants for tagged unions (enums)

06 Aug 21:55
ae80c75
Compare
Choose a tag to compare
  • Define API support for tagged unions (enums)
    • Right now, procedural derive doesn't support generating this: #3
  • Define an API to explicitly define C-style enums, instead of treating them as plain integers
    • Unfortunately, just like the tagged unions feature, procedural derive doesn't support this yet: #2
  • Support tuple-structs for #[derive(StaticReflect)]
  • Allow specifying an expected type for field_offset!
    • Allow using field_offset! with tuple-structs
  • Create a new 'IntType' structure, replacing the old TypeInfo::Integer

Fix field_offset! to avoid ptr->int casts

31 Jul 23:31
86ea82c
Compare
Choose a tag to compare
  • Fix field_offset! macro to avoid ptr -> int casts
    • These have been removed in recent nightlies,
      since pointers can't nessicarrily have a meaningful integer values.
    • I beleive this is because of issues with pointer 'provenance'.
      Here is a good blog post explaining the issue in depth: https://www.ralfj.de/blog/2020/12/14/provenance.html

Drop the 'const_fn' feature

30 May 23:36
06943b6
Compare
Choose a tag to compare
Pre-release
  • Remove the const_fn feature.
    • It has been removed in recent nightlies :)
  • Update zerogc to v0.2.0-alpha.3

Expose the SimpleNonZeroPointer

02 May 21:12
992d656
Compare
Choose a tag to compare
Pre-release

I need this in DuckLogic for rust-cpython's PyObject

Fix compilation on docs.rs

02 May 21:07
cfd84aa
Compare
Choose a tag to compare
Pre-release

They should really be using the latest nightly....

Fix unsafe impl in the define_extern_type macro

02 May 20:49
cfd84aa
Compare
Choose a tag to compare

I should really test my code, huh?

Add 'magic' types and extern types

02 May 20:26
cc364fa
Compare
Choose a tag to compare
Pre-release
  • 26e1204: Rexport type info from crate root
  • 0f4ae19: Add 'magic' types and extern types
    • This allows user extensions to the type system like DuckASM's VariableId
    • Will avoid excessive usage of the never type for things like 'enum PyTypeObject {}'
  • Add a define_extern_type! macro
  • Turn off feature(const_fn_trait_bound) on docs.rs
    • This should fix the build errors there

Fix definition of AsmOption::value_field_offset

02 May 08:28
9feffad
Compare
Choose a tag to compare
  • More lenient now and accepts any lifetime
    • Also uses pass by ref

Implement StaticReflect for more types

01 May 20:08
c9c12d8
Compare
Choose a tag to compare
Pre-release
  • Implement StaticReflect for AsmStr/AsmOption
  • Add a 'SimpleNonZeroPointer' trait
  • Implement Trace for AsmStr
  • Use fn() -> T instead of *mut T in PhantomData
    • Avoids ruining our Send/Sync impls for TypeId and FunctionDefinition
  • Update to zerogc v0.2.0-alpha.2
    • I made a special release just for this

Initial release

20 Apr 02:32
3000980
Compare
Choose a tag to compare
Initial release Pre-release
Pre-release
  • Basic static reflection taken from DuckASM
  • Analyse the fields of #[repr(C)] unions/structures
  • Access function information (and location) at compile time

This relies on a procedural derive for accuracy (and not going insane).