Commit Graph

302 Commits

Author SHA1 Message Date
konstin ced4eb532c Expect the pyo3 crate to be in scope for the codegen
This allows using generated code from crates that do not directly depend on pyo3.

E.g.:

```rust
extern crate my_pyo3_wrapper;

use my_pyo3_wrapper::pyo3;

#[py::modinit(rust2py)]
fn init_mod(py: Python, m: &PyModule) -> PyResult<()> {
    // ...
    Ok(())
}
2018-04-05 13:39:07 +02:00
konstin e570c6b9b9 Move the codegen into its own crate
This makes the code generatioin reusable from third party crates.
2018-04-05 13:39:07 +02:00