Since the work would not exist at all without the contributions of either one of you, in my view, it would be entirely appropriate to share first authorship. This is done by placing an asterisk by each of your names pointing to a footnote indicating "these authors contributed equally".
This reflects positively on both of you and does not detract from the contributions of either one. You can both list the paper in the "first author publications" section of your CV, and it cost'scosts nothing to do. Also, in my experience, one cannot usually implement an entire solution of any complexity without contributing intellectually to it in a significant way.
In my field first authorship normally goes to whoever actually did the work. However, my opinion has always been that credit is a thing best distributed as widely as possible, within reason of course.