bluetech / pcsc-rust

Rust bindings to PC/SC for smart card communication
https://docs.rs/pcsc
MIT License
108 stars 22 forks source link

Allow to get ffi types from the rust API #22

Open pbor opened 2 years ago

pbor commented 2 years ago

I would like to use the pcsc-rs crate to implement a rust module which in turn exposes a C api.

In my case I would need to

  1. Go from Context to SCARDCONTEXT
  2. Go from ReaderState to SCARD_READERSTATE`

It would be great if there were into_raw and from_raw methods.

bluetech commented 1 year ago

Now that we explicitly reexport pcsc-sys, this sounds fine to me. Will accept a PR for this.