Generate FFI-compatible extern fn
from harmless fn
s using the power of proc
macros. If you are wondering which ABI this is, remember: You can't spell
Cthulhu without C!
It's a mystery.
Let's get this show on the road.
- Introduce marshalers and their
ToForeign
andFromForeign
traits - Add procedural macros for invoking marshalers
- Generate safe runtime checking of unsafe boundaries
- Generate "exception handling" callbacks
- Handle all basic scalar primitives (including the bool special case)
- Introduce
ReturnType
trait for reflecting return values for complex types - Encapsulate all information needed to generate functions into a single
Function
type - Provide a micro-framework for demonstrating Cthulhu error handling
Let's get more show out of this road.
- Implement a good resource cleanup story
- Implement a good
Vec<T>
story - Implement a good ref/owned/ohno story
- Get strings in all their forms working safely and ergonomically
- Allow generating extern functions by
invoke
ing onimpl
andmod
levels- Auto-prefixing of functions with a "C namespace" of the user's choice
- Experiment with other syntaxes for declaring marshalers on longer type signatures
- Improve error handling and reporting (some spans are still garbage or wrong)
- Supply default marshalers for:
- Path types per operating system
- UTF-16 owned/borrowed strings
- UTF-8 owned/borrowed strings
-
Arc<T>
- Make
invoke
syntax consistent withmarshal
- Add debug logging to inform the user when a value has been consumed and should not be reused
- Clean up the tests and make them pass
- Support types whose representation in C would be multiple parameters or a struct
Let's get this stable.
- Ability to generate APIs for Kotlin, Swift and C#
- Fuzzed so hard that the code is no longer fazed by aggressive abuse and invalid files
We enforce the usage of stdint.h
types on the C side to simplify the implementation on the Rust side.
Interesting reads:
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.