rustdv-gpi 0.2.0

Safe wrapper over the simulator interface: handles, values, callbacks, sim time. All unsafe code in the rustdv workspace lives here (design-doc §3.3).
Documentation
  • Coverage
  • 50.68%
    37 out of 73 items documented0 out of 52 items with examples
  • Size
  • Source code size: 33.35 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 851.74 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • rustdv/rustdv
    9 2 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • raysalemi

rustdv-gpi

Safe wrapper over the simulator programming interface (design-doc §3.3). Invariants upheld here so everything above is safe Rust:

  1. Handles are opaque and non-null; fallible acquisition is Result.
  2. Object-handle lifetime = simulation lifetime (freely Copyable IDs). Callback registrations are modeled by RAII ([CallbackHandle]): dropping a live handle removes it, and fired one-shots remove themselves from inside the trampoline while both supported simulators still accept the registration handle.
  3. Strings are copied at the boundary, every call.
  4. No unwinding across FFI: every trampoline wraps the closure in catch_unwind; panics are routed to the panic sink.
  5. Callback user-data ownership: an Rc whose C-side reference is reclaimed exactly once (on fire for one-shots, on removal otherwise).

Thread affinity (§3.4): all types here hold raw pointers and are therefore !Send/!Sync — the compiler rejects moving them off the simulator thread.