diff --git a/lib/Cargo.toml b/lib/Cargo.toml index 9bfe18785..49fa432d9 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -9,7 +9,7 @@ mopa = "0.2.2" regex = "1.5.4" log = "0.4.0" env_logger = "0.8.4" -ctor = "0.1.22" +ctor = "0.2.0" smallvec = "1.10.0" [lib] diff --git a/python/hyperonpy.cpp b/python/hyperonpy.cpp index cb5c7fdaf..d35697932 100644 --- a/python/hyperonpy.cpp +++ b/python/hyperonpy.cpp @@ -236,9 +236,6 @@ struct CAtomType {}; PYBIND11_MODULE(hyperonpy, m) { m.doc() = "Python API of the Hyperon library"; - // TODO: integrate Rust logs with Python logger - m.def("init_logger", &init_logger, "Initialize Hyperon library logger"); - py::enum_(m, "AtomKind") .value("SYMBOL", atom_type_t::SYMBOL) .value("VARIABLE", atom_type_t::VARIABLE) @@ -498,3 +495,9 @@ PYBIND11_MODULE(hyperonpy, m) { } +__attribute__((constructor)) +static void init_library() { + // TODO: integrate Rust logs with Python logger + init_logger(); +} +