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
ca00cfcc9a
nicer test for bless
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-11-25 12:23:34 +01:00
Wolfgang Bumiller
c837c7cc3b
add pv_ref, drop unsafe from pv_raw
...
pv_raw itself doesn't actually dereference the pointer and
performs the necessary checks to not be considered unsafe
per se, the `pv_ref()` and `pv_mut_ref()` method now returns
a mutable reference.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-11-25 12:12:31 +01:00
Wolfgang Bumiller
0eebb7e1d9
Value: add bless_sv method for convenience
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-11-25 12:06:50 +01:00
Wolfgang Bumiller
e62be4a750
introduce raw pointer types
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-11-25 12:02:32 +01:00
Wolfgang Bumiller
f3127578ad
destructors work...
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-11-24 11:18:36 +01:00
Wolfgang Bumiller
3348e1b840
perl namespacing, since we can bless now
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-11-24 11:13:55 +01:00
Wolfgang Bumiller
913a8a72ce
support functions without return values
...
this makes for surprisingly ugly code
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-11-24 11:05:55 +01:00
Wolfgang Bumiller
0cdb12e277
add support for raw parameters
...
#[export]
fn foo(#[raw] this: Value) -> Result<(), Error>;
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-11-24 10:36:03 +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
568aba2b75
fix export() attribute arg parsing
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-11-24 09:23:12 +01:00
Wolfgang Bumiller
87c102370e
add methods to 'bless' values
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-11-23 15:51:50 +01:00
Wolfgang Bumiller
5d716926a8
remove .buildbot.yml again
...
we'll do this later
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-11-20 14:30:16 +01:00
Wolfgang Bumiller
906b95b1de
add 'make builddeps' and .buildbot.yml
...
we provide our own `make builddeps` now
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-11-20 14:24:20 +01:00
Wolfgang Bumiller
245289bd28
bump version to 0.1.0-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-11-20 13:55:36 +01:00
Wolfgang Bumiller
7929a4b22e
perlmod: build.rs: add dh-cargo lines
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-11-20 13:54:59 +01:00
Wolfgang Bumiller
a777421e5e
include version in perlmod-macro dependency
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-11-20 13:54:59 +01:00
Wolfgang Bumiller
54fd53e1f7
buildsys: Makefile and build.sh like in proxmox crate
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-11-20 13:54:59 +01:00
Wolfgang Bumiller
46d6d8fa6e
perlmod & macro: debian/
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-11-20 13:54:59 +01:00
Wolfgang Bumiller
2a28e41e86
add description to Cargo.toml files
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-11-20 09:45:25 +01:00
Wolfgang Bumiller
893f7299f0
remove use of anyhow in doctest
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-11-20 09:45:25 +01:00
Wolfgang Bumiller
38d6ba9a55
perlmod itself doesn't actually use anyhow
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-11-20 09:18:00 +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
2290f60a05
sort
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-10-16 10:55:54 +02:00
Wolfgang Bumiller
fb6b493d63
switch from failure to anyhow
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-04-20 12:38:49 +02:00
Wolfgang Bumiller
40e6b9d999
fix badges
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-28 09:35:33 +01:00
Wolfgang Bumiller
d1c18fbdcf
bump to current toml version
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-28 09:34:19 +01:00
Wolfgang Bumiller
4fe421d40d
maintenance is a badge
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-27 10:53:17 +01:00
Wolfgang Bumiller
e199764961
macro: verify parameter count
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-13 14:21:45 +01:00
Wolfgang Bumiller
b9e50338b8
remove debian/ files
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-13 10:14:19 +01:00
Wolfgang Bumiller
e23248525f
metadata for Cargo.toml
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-10 14:34:31 +01:00
Wolfgang Bumiller
b813397be8
macro: derive library name from Cargo.toml
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-10 12:24:32 +01:00
Wolfgang Bumiller
f3d18a7492
doc: explicitly mention the current way to go
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-10 11:59:42 +01: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
ac1ed61147
crate level documentation
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-10 11:37:22 +01:00
Wolfgang Bumiller
96b50cd846
macro: pull in 'perlmod' dependency in for doctests
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-10 11:28:05 +01:00
Wolfgang Bumiller
1b2a3cc024
macro: document package
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-10 11:22:49 +01:00
Wolfgang Bumiller
0272d6cd05
macro: document make_package
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-10 11:17:53 +01:00
Wolfgang Bumiller
7a433bb6c3
perlmod: documentation
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-10 11:03:17 +01:00
Wolfgang Bumiller
42f7a45b8d
perlmod: make proc macro documentation inline
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-10 10:50:45 +01:00
Wolfgang Bumiller
8b8dd4a9c6
test: add explaining comment
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-10 10:49:33 +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
b03c149435
macro: some refactoring
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-10 10:18:42 +01:00
Wolfgang Bumiller
f7d912bd07
macro: factor out package writing
...
to reuse in the stable-rust make_package macro
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-10 10:10:47 +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
Wolfgang Bumiller
52f7cd49f1
drop Send impl for Scalar
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-10 09:29:03 +01:00
Wolfgang Bumiller
f7cc8c37fc
import
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-09 15:01:14 +01:00