hundreds-father-404
07/22/2021, 6:37 PMhundreds-father-404
07/22/2021, 6:37 PMcore/
create w/ things like <http://session.rs|session.rs>
makes sense?witty-crayon-22786
07/22/2021, 7:16 PMI’m still a little hazy on if it’s valid for engine/ to depend on engine_pyo3 or vice versa, so wondering if maybe creating ait can’t, yea.create w/ things likecore/
makes sense?<http://session.rs|session.rs>
witty-crayon-22786
07/22/2021, 7:17 PMhundreds-father-404
07/22/2021, 7:18 PMwitty-crayon-22786
07/22/2021, 7:19 PMwitty-crayon-22786
07/22/2021, 7:19 PM<http://interface.rs|interface.rs>
file is huge, and almost encapsulates our API to the python codehundreds-father-404
07/22/2021, 7:20 PMwitty-crayon-22786
07/22/2021, 7:20 PMengine_pyo3
(just the interface) would be nice.hundreds-father-404
07/22/2021, 7:21 PMWould a prefactor make sense to make a core/ crate, without porting any of the code to PyO3 yet?That is, I'd like for session.rs et al to not know about FFI. Not sure if that's feasible
witty-crayon-22786
07/22/2021, 7:21 PM<http://interface.rs|interface.rs>
and anything else you can into an `engine_cpython`crate might make more sense than the other way around.hundreds-father-404
07/22/2021, 7:22 PMwitty-crayon-22786
07/22/2021, 7:22 PMengine
crate could depend on the engine_pyo3
crate: and it can’t, but in the factoring i’m suggesting, it wouldn’t need towitty-crayon-22786
07/22/2021, 7:23 PMengine_pyo3
crate is the public interface… if the engine
crate needs to depend on pyo3
types, it can just do thatwitty-crayon-22786
07/22/2021, 7:23 PMengine_cpython
crate.witty-crayon-22786
07/22/2021, 7:24 PMOn that note, what’s the motivation for a top level crate? I would naively want to organize this into crates ffi/ and core/, with no top levelnot sure what you mean. but a Cargo workspace must have a top level crate
hundreds-father-404
07/24/2021, 4:36 PMPyDigest
but have both a native_engine and native_engine_pyo3 implementation for now. And don't actually switch Python to use PyO3 yet
Instead, write some unit tests to assert the equivalence of the two types
Not great to violate DRY, but I think this allows some progress to reduce risk of a big migration