Commit Graph

6 Commits

Author SHA1 Message Date
Wolfgang Bumiller
2991a46a31 fix #[export(name=...)], drop deprecated make_package
The `make_package` macro is tedious to use. We now simply
depend on new-enough rustc for `package` to work.

The change to #[export] allows writing:

    #[export(name = "DESTROY")]
    fn destroy(#[raw] this: Value) { ... }

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-11-25 14:35:34 +01:00
Wolfgang Bumiller
29e61fa65e add 'raw_return' function attribute
A function declared with a raw_return attribute like this:

    #[export(raw_return)]
    fn foo() -> Result<Value, Error>;

will not perform serialization on the 'Value', but return
the "raw" value to perl. This allows returning blessed
values.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-11-24 09:37:59 +01:00
Wolfgang Bumiller
9525acd643 add some function name mangling to xs exports
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-10-16 11:08:50 +02:00
Wolfgang Bumiller
f0475cd5a1 silence cippy and add some ffi documentation
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-10 11:55:48 +01:00
Wolfgang Bumiller
06a18771dd make_package macro implementation
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-10 10:47:42 +01:00
Wolfgang Bumiller
abdf721d90 macro: add export macro, support renaming xs functions
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-10 09:58:07 +01:00