https://kotlinlang.org logo
e

eygraber

04/20/2022, 2:28 PM
I'm looking to make a multiplatform Uri parsing library. I see 3 options for doing so. I have a feeling any one of them are ok, but is one "better" than the rest? 1. Write an RFC compliant implementation from scratch (I started doing this but I realized I'd run out of time that I allocated for this project) 2. Use expect/actual and delegate to platform functionality; Android
Uri
, JS
URL
, iOS
swift-URI
, Native haven't found anything yet (all the implementations have slightly different behavior + I haven't found a simple solution for native) 3. Port an existing implementation to KMP I've started all 3 approaches, and I'm leaning towards #3, and porting Android
Uri
j

juliocbcotta

04/20/2022, 2:51 PM
I would go with 2) if it solves your problem as it seems the easiest and fastest solution to implement.
41 Views