#haskell #traits #wrapper #memory-layout #ergonomics #behind #repr

no-std hs-bindgen-traits

Utility traits behind hs-bindgen ergonomics

11 releases (5 breaking)

0.9.0 Jul 4, 2023
0.8.0 Jan 27, 2023
0.7.2 Dec 16, 2022
0.7.0 Nov 15, 2022
0.4.1 Oct 21, 2022

#2031 in Rust patterns

Download history 23/week @ 2024-03-11 69/week @ 2024-04-01 24/week @ 2024-04-08 21/week @ 2024-04-15 15/week @ 2024-04-22 24/week @ 2024-04-29 31/week @ 2024-05-06 14/week @ 2024-05-13 29/week @ 2024-05-20 7/week @ 2024-05-27 33/week @ 2024-06-03 17/week @ 2024-06-10 18/week @ 2024-06-17 37/week @ 2024-06-24

105 downloads per month
Used in hs-bindgen

MIT/Apache

12KB
213 lines

hs-bingen-traits

Utility traits behind hs-bindgen ergonomics. It helps user to easily define wrapper function to derive a Rust type from and into a C-FFI safe target type (that match the memory layout of an Haskell type).

What's this library for?

Does repr(C) define a trait I can use to check structs were declared with #repr(C)? The answer is sadly no ... that's what this library trying to provide, like what safer_ffi does, but in a simpler and more minimal way, since the goal here is only to target Haskell FFI.

Acknowledgments

⚠️ This is still a working experiment, not yet production ready.

This project was part of a work assignment as an IOG contractor.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

No runtime deps

Features