taplo icon indicating copy to clipboard operation
taplo copied to clipboard

Refactor: migrate to `napi-rs`

Open JounQin opened this issue 8 months ago • 4 comments

I'm enjoying https://github.com/napi-rs/napi-rs very much recently at https://github.com/unrs/unrs-resolver, so I'm proposing to refactor the WASM part into napi-rs.

cc @tamasfe @panekj

JounQin avatar Apr 23 '25 09:04 JounQin

What for?

panekj avatar Apr 23 '25 09:04 panekj

Prefer native napi bindings over WASM when available.

JounQin avatar Apr 23 '25 09:04 JounQin

I don't see a reason to remove WASM just to make "native" bindings

panekj avatar Apr 24 '25 18:04 panekj

I don't see a reason to remove WASM just to make "native" bindings

@napi-rs also compiles WASM, for example https://www.npmjs.com/package/@unrs/resolver-binding-wasm32-wasi, it just "prefer" native bindings which always has better performance.

JounQin avatar Apr 24 '25 23:04 JounQin