Hacker News new | ask | show | jobs
by jamil7 623 days ago
Awesome work. Yes, I’ve been interested in Rust for a while and have been hacking on a side project. It’s an API service in Rust, but for the CRUD management part I used Elixir/Phoenix and Phoenix gen auth to have something up quickly that’s not dependent on some third-party service.
1 comments

Thanks. Interesting. What are some best practices for integrating Rust with Elixir/Phoenix in a project, especially when managing CRUD operations and maintaining system efficiency you learned along your side project?
Right now I run them as two separate services. Phoenix does all the user signup and management, landing page, docs and vends API keys while I use Rust for the API product itself, which does some cpu bound work where Elixir would have been weaker. They both share a Postgres database where the Rust API is restricted to the api keys table.

There is also Rustler which helps facilitate calling Rust binaries from Elixir directly but I opted to deploy them separately.