BYVoid / OpenCC

Conversion between Traditional and Simplified Chinese
https://opencc.byvoid.com/
Apache License 2.0
8.47k stars 981 forks source link

Add wasm support #754

Closed eagleoflqj closed 3 months ago

eagleoflqj commented 1 year ago

做了个网站,纯前端wasm转换繁简https://my-opencc.vercel.app/ 支持全部14个json配置 代码:https://github.com/LibreService/my_opencc 想把wasm构建部分合并到上游

跟https://github.com/oyyd/wasm-opencc 的区别:

eagleoflqj commented 1 year ago

It seems when emscripten env is activated, make cannot execute cmake due to the same reason with https://github.com/emscripten-core/emsdk/issues/616, so I have to put these in a separate script inside wasm/.

septs commented 1 year ago

如果能吧 node.js bindings 切换到 wasm 实现,那就更好了

eagleoflqj commented 1 year ago

如果能吧 node.js bindings 切换到 wasm 实现,那就更好了

可行,就是wasm速度会比native慢一些,不一定划算 给web用肯定是wasm最快

septs commented 1 year ago

如果能吧 node.js bindings 切换到 wasm 实现,那就更好了

可行,就是wasm速度会比native慢一些,不一定划算 给web用肯定是wasm最快

等等作者( @BYVoid )的意见吧,我只是觉得 wasm 免除编译带来的优势更大(指开箱即用)

ayaka14732 commented 1 year ago

有沒有想過用 https://github.com/nk2028/opencc-js

eagleoflqj commented 1 year ago

有沒有想過用 https://github.com/nk2028/opencc-js

my opencc算是我做my rime的一个中间产物,所以用C++版opencc是个刚需

BYVoid commented 3 months ago

I am sorry but I am not familiar with wasm. You can create a separate repo for this purpose.