Maven (famous)@lemmy.zip to Programmer Humor@programming.dev · 2 个月前Modern Programminglemmy.zipimagemessage-square77linkfedilinkarrow-up1595arrow-down18
arrow-up1587arrow-down1imageModern Programminglemmy.zipMaven (famous)@lemmy.zip to Programmer Humor@programming.dev · 2 个月前message-square77linkfedilink
minus-squareEphera@lemmy.mllinkfedilinkEnglisharrow-up127·2 个月前For optimal performance, you should rewrite it in Rust: inline_python::python! { print(js2py.eval_js("(number) => number % 2 ? 'odd' : 'even'")(number)) };
minus-squareATPA9@feddit.orglinkfedilinkarrow-up72·edit-22 个月前And now you can use wasm to run it in a browser!
minus-squareulterno@programming.devlinkfedilinkEnglisharrow-up12·2 个月前Make sure the browser is made using Rust and run on a VM running on Linux, compiled to WASM.
For optimal performance, you should rewrite it in Rust:
inline_python::python! { print(js2py.eval_js("(number) => number % 2 ? 'odd' : 'even'")(number)) };
And now you can use wasm to run it in a browser!
Full circle 😆
Make sure the browser is made using Rust and run on a VM running on Linux, compiled to WASM.