Yeah, I agree. I was surprised to see it was inlined. Probably we should make it just a library under the nREPL org. File a ticket about this.
Even today there are are some portable bencode libraries, but who knows how things were 7 years ago when the project started.
Generally we can’t risk adopting a new library at this point, so I’d rather just extract ours and keep refining it.
You need a version that works in JavaScript streams.
That is to say that I think host interop differences might make this harder.
Trying to combine clj and cljs will probably be hard because of host interop, but having a clj and a cljs library shouldn’t be too hard. That depends, of course, on stream support in abio.
node-bencode isn't terrible, and it probably wouldn't take too much work to get it compliant. It has very useful error messages.
there's likely a nodejs generative testing lib.