Commit graph

3 commits

Author SHA1 Message Date
konstin 2fcac85003 Add version in Cargo.toml
Following https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-path-dependencies, we need a version for path dependencies
2018-05-01 20:25:20 +02:00
konstin cb6c287f1f 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-05-01 20:24:34 +02:00
konstin 29fdc05b60 Move the codegen into its own crate
This makes the code generatioin reusable from third party crates.
2018-05-01 20:24:32 +02:00