DE version is available. Content is displayed in original English for accuracy.
Advertisement
Advertisement
⚡ Community Insights
Discussion Sentiment
100% Positive
Analyzed from 186 words in the discussion.
Trending Topics
#iroh#fan#javascript#api#typescript#docs#webassembly#example#comes#peer

Discussion (4 Comments)Read Original on HackerNews
There’s a lot that comes for free by adding all these libraries and crates and steps. But from what I can tell it comes down to:
let _ = if fan_on { fan.set_high() } else { fan.set_low() };
https://docs.iroh.computer/languages/javascript
Edit: actually, that's a Node.js-specific API. For browsers, it seems like they should have a platform-independent JavaScript/TypeScript API that includes a WebAssembly file (if needed) instead of expecting you to compile WebAssembly yourself.