Closed NumberFour8 closed 1 year ago
Thank you very much! I've left a few comments, but overall it looks good.
Thank you very much! I've left a few comments, but overall it looks good.
Thanks for the feedback :) I adapted the code according to your comments.
@dermesser Is this good to merge, then?
Yes apologies for the delay. I will shortly release a new major version
Building
rusty-leveldb
in constrained or non-POSIX environments (such as WASM) is currently not possible. This PR adds small changes to make it possible.Changes
Introduces
fs
feature which is enabled by default. The feature allows to toggle thePosixDiskEnv
type and therefore makes it possible to buildrusty-leveldb
on systems wherestd::io
is constrained. One major use case are WASM environments. Users can therefore setuse-default-features = false
onrusty-leveldb
dependency entries in theirCargo.toml
. The only availableEnv
will beMemEnv
iffs
feature is disabled.Updates
rand
crate to version0.8.5
which is also WASM compatible. When the users ofrusty-leveldb
addgetrandom
dependency to theirCargo.toml
, it will make the random number generation inrusty-leveldb
work on their platform.Adds
crate-type
to allow builds in different environmentsRe-exports
FileLock
,RandomAccessFile
andLogger
types so that users can add custom implementation of theEnv
trait.