Wolfgang Bumiller
083e82368d
implement some crude magic helpers
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-27 12:57:05 +02:00
Wolfgang Bumiller
6f26c2da30
perlmod: add magic ffi and glue
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-27 12:57:05 +02:00
Wolfgang Bumiller
62f3c1eb74
add a comment noting an API cleanup todo
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-27 11:38:08 +02:00
Wolfgang Bumiller
fb26412b42
Value: add AsRef/AsMut<ScalarRef>
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-27 11:38:08 +02:00
Wolfgang Bumiller
041e791032
add Value::new_hash for convenience
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-27 11:38:08 +02:00
Wolfgang Bumiller
35762913de
bump perlmod to 0.7.2 and perlmod-macro to 0.4.1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-25 10:16:21 +02:00
Wolfgang Bumiller
83f19b9599
macro: implement bootstrap function in rust
...
with this, the generated .pm files don't contain any
exports anymore
when implementing a `perlmod-bindgen` utility to generate
.pm files, we can now also deprecate the `lib =` module
attribute on the `package` proc macro
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-21 11:28:29 +02:00
Wolfgang Bumiller
ebe0ba6487
bump perlmod version to 0.7.1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-19 10:33:36 +02:00
Wolfgang Bumiller
d1743af5d8
update docs and let the bless test use Value::bless_box
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-19 10:32:51 +02:00
Wolfgang Bumiller
81354c3960
perlmod: add Value::bless_box
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-19 10:32:51 +02:00
Wolfgang Bumiller
449d746871
perlmod-macro: improve error handling
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-15 09:52:58 +02:00
Wolfgang Bumiller
f888c202cc
perlmod-macro: drop anyhow dependency
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-15 09:45:57 +02:00
Wolfgang Bumiller
d253472380
perlmod: drop derive requirement on serde
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-15 09:37:24 +02:00
Wolfgang Bumiller
55f3db4827
drop thiserror
...
not worth it right now
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-15 09:34:31 +02:00
Wolfgang Bumiller
2e5e60c479
drop rust-toolchain file
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-15 09:31:11 +02:00
Wolfgang Bumiller
81da219db5
bump perlmod to 0.7.0-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-14 15:26:02 +02:00
Wolfgang Bumiller
f3f92edcd2
prevent creating ScalarRef values manually
...
it is dangerous as it should only exist as a valid reference
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-14 15:24:20 +02:00
Wolfgang Bumiller
b8ef338c1c
bump perlmod-macro to 0.4.0 and perlmod to 0.6.0
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-14 15:14:00 +02:00
Wolfgang Bumiller
b2ad024751
add README.md
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-14 15:14:00 +02:00
Wolfgang Bumiller
6ccbcbec1a
add reference deserialization test data
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-14 15:13:48 +02:00
Wolfgang Bumiller
245de6dd67
add RawValue and raw value serialization
...
perl Values are now generally serialized as *raw* values,
for *de*serialization this can be enforced via the RawValue
type
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-14 15:01:17 +02:00
Wolfgang Bumiller
4fe09940a7
make values Clone
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-14 13:43:38 +02:00
Wolfgang Bumiller
814014b874
macro: support env vars in package attributes
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-13 12:52:02 +02:00
Wolfgang Bumiller
9de065545b
macro: use CARGO_PKG_NAME instead of reading Cargo.toml
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-13 11:28:16 +02:00
Wolfgang Bumiller
c9d79aaea8
bump version to 0.5.3-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-07-19 10:33:35 +02:00
Wolfgang Bumiller
0864428bd6
test: set autoflush for consistency
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-07-19 09:37:09 +02:00
Wolfgang Bumiller
9acdb78242
add is_defined helper glue
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-07-19 09:34:32 +02:00
Fabian Ebner
93eaead22a
test for broken undef detection
...
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-07-19 09:02:59 +02:00
Wolfgang Bumiller
4c9f6c51d7
macro: different approach to clippy warning
...
currently this does in fact deduplicate code, so...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-07-02 11:54:33 +02:00
Wolfgang Bumiller
ab3923dc66
bump perlmod to 0.5.2-2
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-07-02 11:42:17 +02:00
Wolfgang Bumiller
3d5b075bdc
perlmod: clippy fixes
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-07-02 11:39:46 +02:00
Wolfgang Bumiller
a2a884c13d
macro: clippy fixes
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-07-02 11:37:51 +02:00
Wolfgang Bumiller
83ac604e08
test updates
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-07-02 11:33:05 +02:00
Wolfgang Bumiller
3f7917309b
set utf8 flag as needed when serializing strings
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-07-02 11:31:51 +02:00
Wolfgang Bumiller
726fa9b484
bump perlmod-macro to 0.3.2-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-06-30 09:48:00 +02:00
Wolfgang Bumiller
aa13c5c85b
macro: add newlines to errors
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-06-30 08:14:54 +02:00
Wolfgang Bumiller
36bbf1d1a1
bump verstion to 0.5.1-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-06-23 10:59:34 +02:00
Wolfgang Bumiller
fa780264ca
update test files
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-06-23 10:58:31 +02:00
Wolfgang Bumiller
fbf0c7a20b
fix newtype struct deserialization
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-06-23 10:58:21 +02:00
Wolfgang Bumiller
0daaa90cf6
bump version to 0.5.0-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-06-21 12:40:56 +02:00
Wolfgang Bumiller
b5c53f3d37
improve PVLV handling
...
For the cases we're most intested in (substr and vivifyable
hash indexing) we can use perform "GET" magic to figure out
whether it was undef or not, and then simply recurse.
We'll have to deal with other cases as we run into them.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-06-10 10:14:04 +02:00
Wolfgang Bumiller
61143f5d12
experimental PVLV support
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-06-08 11:28:01 +02:00
Wolfgang Bumiller
ec6f42c37e
bump perlmod to 0.4.3-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-03-09 15:36:52 +01:00
Fabian Ebner
f053fb84ef
array: avoid underflow when array is empty and more is zero
...
serializing an empty array triggered this.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
[rustfmt: Wolfgang Bumiller <w.bumiller@proxmox.com>]
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-03-09 15:32:40 +01:00
Wolfgang Bumiller
dc04b1694f
bump d/control
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-02-23 14:27:00 +01:00
Wolfgang Bumiller
4aee0cb571
bump perlmod to 0.4.2-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-02-23 14:26:31 +01:00
Wolfgang Bumiller
db22bf8db6
allow PVMG in deserialization
...
they are supposed to end up being regular scalars after all,
usually
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-02-23 13:59:48 +01:00
Wolfgang Bumiller
1bb53e8403
bump perlmod-macro to 0.3.1-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-02-22 14:18:26 +01:00
Wolfgang Bumiller
f2fb3f9604
check in control files
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-02-22 14:18:26 +01:00
Wolfgang Bumiller
740eda0643
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>
2021-02-22 14:12:25 +01:00