Hacker Newsnew | past | comments | ask | show | jobs | submit | SimionBaws's commentslogin

Easy: each worktree starts services on new ports. https://termic.dev goves you ENV variables for this, oir you definee your own custom named variables, and termic assigns ports for each wotktree.

Or if the stack is too complex to start it in parallel, use spotlight to sync changes to main checkout from a single worktree at a time. You can only test one at a time, let's be serios. https://termic.dev/docs/spotlight/


Just have patience and wait for HTTP/2


Can you write python modules in rust?

I would like to write small parts of my project as separate high performance modules, and I don't want to do it in C, it makes me sad.


TL;DR Write it in Rust, export via FFI, bind from Python via cffi.

The long version is: go watch this video from PyCon that will answer this question and probably others https://www.youtube.com/watch?v=3CwJ0MH-4MA


That video and a similar talk I've given at Ruby conferences inspired me to make a chapter for the book: http://doc.rust-lang.org/stable/book/rust-inside-other-langu...


Yes, here's a python module written in Rust: https://github.com/dgrunwald/rust-cpython/blob/master/extens...

But anything more complicated than that (defining extension types etc.) isn't yet supported by the high-level bindings, and would need unsafe code using the python C API directly.


This looks like it is tied irreparably to the CPython interpreter. One probably doesn't want to do this. Export a clean C compatible API and call via CFFI. This has the being callable from other languages, CPython and PyPy.


^advantage of


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: