]>
git.proxmox.com Git - perlmod.git/log
Wolfgang Bumiller [Mon, 22 Feb 2021 13:11:31 +0000 (14:11 +0100)]
adjust path for DynaLoader
We usually have multiple packages but only a single library,
so rather than making package look in subdirectories named
after them, just look in the toplevel `auto/` directory.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 16 Feb 2021 11:38:16 +0000 (12:38 +0100)]
bump perlmod to 0.4.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 16 Feb 2021 11:37:24 +0000 (12:37 +0100)]
fix refcount issue in Hash::insert_by_value
The HV takes ownership of the value!
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 16 Feb 2021 09:44:53 +0000 (10:44 +0100)]
bump perlmod to 0.4.0-1
to bump the macro dependency by a major version
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 16 Feb 2021 09:42:10 +0000 (10:42 +0100)]
add test.pl file for a usage example of perlmod-test
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 16 Feb 2021 09:41:52 +0000 (10:41 +0100)]
bump perlmod-macro to 0.3.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 16 Feb 2021 09:39:36 +0000 (10:39 +0100)]
macro: support tuple return types in functions
These are now *list* return types in perl.
However, currently there is no support for 'wantarray' or
lists of dynamic length.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 16 Feb 2021 09:39:01 +0000 (10:39 +0100)]
use try_from_ref in the example
to show how it's used
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 15 Feb 2021 15:06:18 +0000 (16:06 +0100)]
bump perlmod to 0.3.0
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 15 Feb 2021 14:48:17 +0000 (15:48 +0100)]
"fix" the destructor macro
long story short: compiler restrictions
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 15 Feb 2021 13:56:17 +0000 (14:56 +0100)]
bump perlmod and perlmod-macro to 0.2.3
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 15 Feb 2021 13:53:57 +0000 (14:53 +0100)]
fix 'undef' deserialization
Since it has 0 flags it wasn't recognized as a scalar, but
an unsupported "magic" value.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 15 Feb 2021 13:05:02 +0000 (14:05 +0100)]
macro: make generated helpers #[doc(hidden)]
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 15 Feb 2021 09:36:52 +0000 (10:36 +0100)]
bump perlmod-macro to 0.2.2-1 as well
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 9 Dec 2020 08:51:44 +0000 (09:51 +0100)]
bump perlmod to 0.2.2-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 27 Nov 2020 14:30:07 +0000 (15:30 +0100)]
introduce try_from_ref argument attribute
and document attributes in the #[export] macro documentation
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 27 Nov 2020 13:35:48 +0000 (14:35 +0100)]
bump perlmod to 0.2.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 27 Nov 2020 12:38:49 +0000 (13:38 +0100)]
support deserializing borrowed strings
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 27 Nov 2020 12:07:03 +0000 (13:07 +0100)]
bump perlmod-macro to 0.2.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 27 Nov 2020 12:03:46 +0000 (13:03 +0100)]
guard '-L./target/debug' lib path by debug_assertions
A release build shouldn't add the local search path for
libraries to the perl modules.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 27 Nov 2020 11:06:01 +0000 (12:06 +0100)]
clippy lints
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 26 Nov 2020 12:57:39 +0000 (13:57 +0100)]
bump perlmod and perlmod-macro to 0.2.0
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 26 Nov 2020 12:50:06 +0000 (13:50 +0100)]
deserialize by reference
Allow deserializing things such as `&[u8]` to reference the
original data instead of requiring a `Vec<u8>` instead.
Introduces `perlmod::from_ref_value` next to
`perlmod::from_value` with a new signature.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 26 Nov 2020 12:29:34 +0000 (13:29 +0100)]
make Serializer and Deserializer private
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 26 Nov 2020 10:57:28 +0000 (11:57 +0100)]
allow constants for class names in destructor macro
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 26 Nov 2020 10:47:42 +0000 (11:47 +0100)]
destructor macro and helpers for blessed objects
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 26 Nov 2020 09:13:48 +0000 (10:13 +0100)]
make SvPVbyte safe
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 26 Nov 2020 08:30:47 +0000 (09:30 +0100)]
add 'pseudo_block' helper
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 25 Nov 2020 15:38:48 +0000 (16:38 +0100)]
yet another set of doc fixups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 25 Nov 2020 14:13:57 +0000 (15:13 +0100)]
more doc improvements
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 25 Nov 2020 14:00:34 +0000 (15:00 +0100)]
more doc updates
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 25 Nov 2020 13:57:10 +0000 (14:57 +0100)]
doc example for bless
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 25 Nov 2020 13:35:34 +0000 (14:35 +0100)]
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>
Wolfgang Bumiller [Wed, 25 Nov 2020 11:23:34 +0000 (12:23 +0100)]
nicer test for bless
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 25 Nov 2020 11:08:51 +0000 (12:08 +0100)]
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>
Wolfgang Bumiller [Wed, 25 Nov 2020 11:06:50 +0000 (12:06 +0100)]
Value: add bless_sv method for convenience
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 25 Nov 2020 11:02:32 +0000 (12:02 +0100)]
introduce raw pointer types
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 24 Nov 2020 10:18:36 +0000 (11:18 +0100)]
destructors work...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 24 Nov 2020 10:13:55 +0000 (11:13 +0100)]
perl namespacing, since we can bless now
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 24 Nov 2020 10:05:54 +0000 (11:05 +0100)]
support functions without return values
this makes for surprisingly ugly code
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 24 Nov 2020 09:36:03 +0000 (10:36 +0100)]
add support for raw parameters
#[export]
fn foo(#[raw] this: Value) -> Result<(), Error>;
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 24 Nov 2020 08:36:50 +0000 (09:36 +0100)]
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>
Wolfgang Bumiller [Tue, 24 Nov 2020 08:21:15 +0000 (09:21 +0100)]
fix export() attribute arg parsing
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 23 Nov 2020 14:51:50 +0000 (15:51 +0100)]
add methods to 'bless' values
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 20 Nov 2020 13:30:15 +0000 (14:30 +0100)]
remove .buildbot.yml again
we'll do this later
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 20 Nov 2020 13:24:19 +0000 (14:24 +0100)]
add 'make builddeps' and .buildbot.yml
we provide our own `make builddeps` now
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 20 Nov 2020 12:55:36 +0000 (13:55 +0100)]
bump version to 0.1.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 20 Nov 2020 12:44:52 +0000 (13:44 +0100)]
perlmod: build.rs: add dh-cargo lines
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 20 Nov 2020 08:46:24 +0000 (09:46 +0100)]
include version in perlmod-macro dependency
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 20 Nov 2020 08:43:04 +0000 (09:43 +0100)]
buildsys: Makefile and build.sh like in proxmox crate
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 20 Nov 2020 08:40:55 +0000 (09:40 +0100)]
perlmod & macro: debian/
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 20 Nov 2020 08:28:09 +0000 (09:28 +0100)]
add description to Cargo.toml files
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 20 Nov 2020 08:45:09 +0000 (09:45 +0100)]
remove use of anyhow in doctest
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 20 Nov 2020 08:18:00 +0000 (09:18 +0100)]
perlmod itself doesn't actually use anyhow
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 16 Oct 2020 09:08:50 +0000 (11:08 +0200)]
add some function name mangling to xs exports
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 16 Oct 2020 08:54:05 +0000 (10:54 +0200)]
sort
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 20 Apr 2020 10:38:49 +0000 (12:38 +0200)]
switch from failure to anyhow
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 28 Jan 2020 08:35:33 +0000 (09:35 +0100)]
fix badges
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 28 Jan 2020 08:34:17 +0000 (09:34 +0100)]
bump to current toml version
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 27 Jan 2020 09:53:15 +0000 (10:53 +0100)]
maintenance is a badge
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 13 Jan 2020 13:21:45 +0000 (14:21 +0100)]
macro: verify parameter count
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 13 Jan 2020 09:14:03 +0000 (10:14 +0100)]
remove debian/ files
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 10 Jan 2020 13:34:31 +0000 (14:34 +0100)]
metadata for Cargo.toml
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 10 Jan 2020 11:24:32 +0000 (12:24 +0100)]
macro: derive library name from Cargo.toml
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 10 Jan 2020 10:59:42 +0000 (11:59 +0100)]
doc: explicitly mention the current way to go
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 10 Jan 2020 10:55:48 +0000 (11:55 +0100)]
silence cippy and add some ffi documentation
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 10 Jan 2020 10:37:22 +0000 (11:37 +0100)]
crate level documentation
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 10 Jan 2020 10:28:05 +0000 (11:28 +0100)]
macro: pull in 'perlmod' dependency in for doctests
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 10 Jan 2020 10:22:38 +0000 (11:22 +0100)]
macro: document package
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 10 Jan 2020 10:17:53 +0000 (11:17 +0100)]
macro: document make_package
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 10 Jan 2020 10:03:17 +0000 (11:03 +0100)]
perlmod: documentation
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 10 Jan 2020 09:50:45 +0000 (10:50 +0100)]
perlmod: make proc macro documentation inline
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 10 Jan 2020 09:49:33 +0000 (10:49 +0100)]
test: add explaining comment
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 10 Jan 2020 09:47:42 +0000 (10:47 +0100)]
make_package macro implementation
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 10 Jan 2020 09:18:42 +0000 (10:18 +0100)]
macro: some refactoring
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 10 Jan 2020 09:10:46 +0000 (10:10 +0100)]
macro: factor out package writing
to reuse in the stable-rust make_package macro
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 10 Jan 2020 08:58:07 +0000 (09:58 +0100)]
macro: add export macro, support renaming xs functions
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 10 Jan 2020 08:29:03 +0000 (09:29 +0100)]
drop Send impl for Scalar
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 9 Jan 2020 09:37:44 +0000 (10:37 +0100)]
import
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>