Crates.io | xapian |
lib.rs | xapian |
version | 0.1.5 |
source | src |
created_at | 2023-06-04 15:01:00.9738 |
updated_at | 2023-06-11 19:18:39.361816 |
description | Rust bindings to Xapian |
homepage | https://github.com/ttys3/xapian-rs |
repository | https://github.com/ttys3/xapian-rs.git |
max_upload_size | |
id | 882232 |
size | 117,801 |
xapian bind for rust
ref file:///usr/share/doc/xapian-core-devel/apidoc/html/inherits.html
The remaining blockers for this are:
xapian github repo: https://github.com/xapian/xapian
User guide online: Getting Started with Xapian https://getting-started-with-xapian.readthedocs.io/
the Xapian developer guide https://xapian-developer-guide.readthedocs.io/
new version news: https://lists.xapian.org/pipermail/xapian-discuss/2023-March/009961.html
xapian api docs: https://xapian.org/docs/apidoc/
cxx tuts https://cxx.rs/tutorial.html
autocxx book https://google.github.io/autocxx/
c ffi https://doc.rust-lang.org/nomicon/ffi.html
with cmake crate example https://eshard.com/posts/Rust-Cxx-interop
Rust and C++ interoperability https://sites.google.com/a/chromium.org/dev/Home/chromium-security/memory-safety/rust-and-c-interoperability
32bit docid
doc count: 31944, index doc took: 6251ms
build with --enable-log
will result in performance drop, about 3x slower.
check log enabled or not: grep XAPIAN_DEBUG_LOG xapian-core/config.h
doc count: 31944, index doc took: 18154ms
terminate called without an active exception
Process finished with exit code 134 (interrupted by signal 6: SIGABRT)
solution:
do not use Error e
in rust::behavior::trycatch
C++ code, use const Xapian::Error& e
instead.
reason:
Error
is defined in generated target/cxxbridge/rust/cxx.h
file under rust
namespace.
use Xapian::Error
will fix the problem.
HACKING: XAPIAN_DEBUG_LOG=-
send output to stderr, not stdout.
XAPIAN_DEBUG_FLAGS
intellij-rust false positives with cxx
see https://github.com/intellij-rust/intellij-rust/issues/8369#issuecomment-1362698416
cxx::bridge
is attribute procedural macro. And since the plugin doesn't expand them by default at this moment, code is highlighted with error annotations in places where syntax is not allowed from the point of view of common Rust. For example, you cannot write type aliases inside extern blocks. But you can enable expansion of attributes macros withorg.rust.macros.proc.attr
experimental feature. After this, almost everything will work as expected (except annotation ofunsafe
before extern block).Don't forget to reload the project model after enabling the experimental feature.
See #6908 for details
why not use docs.rs to host docs?
we need external libs to build this crate: libxapian
and libclang
docs.rs currently is not so friendly to such kind of need.
ref https://docs.rs/about/builds#missing-dependencies
Docs.rs dependencies are managed through crates-build-env. See Forge for how to add a dependency.