[{"data":1,"prerenderedAt":452},["ShallowReactive",2],{"project-46696283":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":9,"maker":10,"posted_at":11,"year":12,"points":13,"comments":14,"rank_in_year":15,"shown_in_year":16,"top":17,"tier":18,"category":19,"subcategory":20,"format":21,"keywords":22,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":34,"aspects":35,"strip":43,"post_text":45,"what":46,"said":77,"maker_in_thread":210,"shape":223,"grid":227,"attempts":413,"same_week":414,"maker_shows":37,"maker_hidden":443,"reader_version":444,"card":445},"46696283","Coi","A language that compiles to WASM, beats React\u002FVue","title","Show HN: Coi – A language that compiles to WASM, beats React\u002FVue",null,"io_eric",1768935713,2026,225,69,234,4366,6,"notable","languages","compiled ui language","library",[23,24,25,26,27],"wasm","ui framework","compile to wasm","reactive components","c++ wasm","curious",0.111,{"positive":31,"neutral":32,"mixed":33,"critical":17},10,21,0,37,{"design":36,"execution":39,"idea":41,"performance":42},{"positive":37,"critical":38},1,4,{"positive":40,"critical":37},3,{"positive":38,"critical":33},{"positive":33,"critical":37},[40,33,33,44,40,44,33,40,33,33,37,37,44,44,37,44,37,40,40,40,33,40,33,33,33,40,37,44,40,40,44,37,40,33,44,40,33,44,33,44],5,"I usually build web games in C++, but using Emscripten always felt like overkill for what I was doing. I don't need full POSIX emulation or a massive standard library just to render some stuff to a canvas and handle basic UI.\n\nThe main thing I wanted to solve was the JS\u002FWASM interop bottleneck. Instead of using the standard glue code for every call, I moved everything to a Shared Memory architecture using Command and Event buffers.\n\nThe way it works is that I batch all the instructions in WASM and then just send a single \"flush\" signal to JS. The JS side then reads everything directly out of S",{"problem":47,"audience":9,"pricing":9,"motivation":56,"time_to_build":9,"stack":61,"openness":74,"stage":75,"team_size":76},{"value":48,"source":49,"evidence":50},"Writing web UI in C++ is tedious and Emscripten is heavy for browser-only work","maker",[51,53],{"id":52},"post",{"id":54,"by":10,"text":55},"46743270","I started with WebCC to get the best possible performance and small binaries, which works well for things like games. However, writing UI code that way is very tedious. I built…",{"value":57,"source":49,"evidence":58},"Wanted a lighter alternative to Emscripten and nicer syntax than raw C++ DOM code",[59,60],{"id":52},{"id":54,"by":10,"text":55},[62,66,70],{"value":63,"source":49,"evidence":64},"C++",[65],{"id":52},{"value":67,"source":49,"evidence":68},"WebAssembly",[69],{"id":52},{"value":71,"source":49,"evidence":72},"WebCC",[73],{"id":52},"open_source","beta","solo",{"praise":78,"objections":112,"requests":142,"questions":159,"alternatives":182},[79,91,102],{"value":80,"source":81,"evidence":82},"Shared-memory command buffer design is clever","commenter",[83,87],{"id":84,"by":85,"text":86},"46742897","frankhsu","Gotta say the Shared Memory approach is genius. Finally someone's cutting down the clunky back-and-forth.",{"id":88,"by":89,"text":90},"46743488","trzeci","I love the idea and execution. I did some reading of the code webcc and it's just brilliantly simple, and delivers to the promise. From the product perspective, it occupies a…",{"value":92,"source":81,"evidence":93},"Compile-time reactivity without virtual DOM",[94,98],{"id":95,"by":96,"text":97},"46742927","kccqzy","> It’s a component-based language that statically analyzes changes at compile-time to enable O(1) reactivity. Unlike traditional frameworks, there is no Virtual DOM overhead This…",{"id":99,"by":100,"text":101},"46742922","written-beyond","I think this genuinely might be the first time I'm seeing a language rework for UI's that actually makes sense and incorporates all that we've learned in the modern age about UI…",{"value":103,"source":81,"evidence":104},"Small binary size and fast builds",[105,108],{"id":106,"by":10,"text":107},"46743237","Pretty fast. It doesn't drag in the C++ standard library, so builds stay lean. My demo page takes about ~1s to compile for me (after the first time)",{"id":109,"by":110,"text":111},"46696416","hans2002","Binary size alone got me interested. What's missing before 1.0?",[113,120,131],{"value":114,"source":81,"evidence":115},"Benchmark claims seemed suspicious versus Emscripten",[116],{"id":117,"by":118,"text":119},"46747049","flohofwoe","First: very nice project, kudos! But: > It’s way more efficient, I ran a benchmark rendering 10k rectangles on a canvas and the difference was huge: Emscripten hit around 40 FPS,…",{"value":121,"source":81,"evidence":122},"HTML-like syntax with control tags feels unnatural to JS developers",[123,127],{"id":124,"by":125,"text":126},"46742953","progx","I don't like this html-syntax, cause you use a separate syntax-methods for existing js-functions wrapped as html-tags: ``` \u003Cif text.isEmpty()> \u003Cdiv class=\"preview-text…",{"id":128,"by":129,"text":130},"46754054","gloosx","sounds cool, want to explore this a bit, however, why XML if condition? > \u003Cif score >= 10> this looks kinda cursed, makes me wonder how it's even parsed",{"value":132,"source":81,"evidence":133},"Adds yet another language with no clear need for new syntax",[134,138],{"id":135,"by":136,"text":137},"46743561","LudwigNagasena","What are the exact features that require it to be a new language with new syntax?",{"id":139,"by":140,"text":141},"46742663","rthrfrd","Sounds interesting! But do you think it would be possible to achieve similar results without a new language, but with a declarative API in one of your existing languages (say,…",[143,151,155],{"value":144,"source":81,"evidence":145},"Interop with npm\u002FJS libraries",[146,147],{"id":99,"by":100,"text":101},{"id":148,"by":149,"text":150},"46751093","syabro","Sounds really cool. A few things I think should be considered: 1. Global state management? Props drilling really sucks... 2. How to deal with network? API is a must... 3.…",{"value":152,"source":81,"evidence":153},"Global state management and networking support",[154],{"id":148,"by":149,"text":150},{"value":156,"source":81,"evidence":157},"DWARF debug builds and compile flag control",[158],{"id":88,"by":89,"text":90},[160,171,178],{"value":161,"source":81,"evidence":162},"How does it compare to Svelte performance?",[163,167],{"id":164,"by":165,"text":166},"46742430","orphea","Did you compare with Svelte?",{"id":168,"by":169,"text":170},"46742573","k__","Came to ask this. React and Vue aren't exactly known for their performance and Svelte does compile time optimizations.",{"value":172,"source":81,"evidence":173},"How to integrate into existing JS framework projects?",[174],{"id":175,"by":176,"text":177},"46742883","iamsaitam","This looks very interesting! Do you have any tips\u002Fpointers on how one could use Coi to generate a component and then integrate it into an existing project which uses a…",{"value":179,"source":81,"evidence":180},"What is missing before 1.0?",[181],{"id":109,"by":110,"text":111},[183,191,195,203],{"value":184,"source":81,"evidence":185},"Emscripten",[186,190],{"id":187,"by":188,"text":189},"46743045","publicdebates","> It’s way more efficient, I ran a benchmark rendering 10k rectangles on a canvas and the difference was huge: Emscripten hit around 40 FPS, while my setup hit 100 FPS. Just…",{"id":88,"by":89,"text":90},{"value":192,"source":81,"evidence":193},"React",[194],{"id":168,"by":169,"text":170},{"value":196,"source":81,"evidence":197},"Svelte",[198,199],{"id":164,"by":165,"text":166},{"id":200,"by":201,"text":202},"46745404","Leftium","Svelte used to have compile-time reactivity, but switched to runtime reactivity via signals: https:\u002F\u002Fsvelte.dev\u002Fblog\u002Frunes I'm curious if Coi will also suffer from the drawbacks…",{"value":204,"source":81,"evidence":205},"Leptos",[206],{"id":207,"by":208,"text":209},"46742398","merqurio","Nice work ! Thanks for shating It reminds me of https:\u002F\u002Fleptos.dev\u002F in Rust, although the implementation might be very different",{"comments":211,"answered":212,"key":213},11,8,[214,217,220],{"id":215,"text":216},"46743672","You're right about the market positioning - WebCC isn't trying to be Emscripten. It's for when you want to build for the web, not just on the web. I'm actually using it myself to…",{"id":218,"text":219},"46742852","A C++ library could wrap DOM APIs (WebCC already does this), but achieving a fine-grained reactive model purely in library code involves major trade-offs A dedicated compiler…",{"id":221,"text":222},"46746542","Hard disagree. Canvas 2D is fully GPU-accelerated in modern browsers and can easily handle thousands of draw calls at 60fps,more than enough for most practical applications. For…",{"commenters":224,"max_depth":44,"maker_replies":211,"first_comment_mins":225,"lifespan_hours":226},47,9,131,[228,232,235,238,240,244,246,248,251,253,256,259,261,265,268,270,272,274,276,279,282,283,284,287,290,293,295,296,299,300,302,303,306,310,313,317,319,320,323,325,327,330,332,335,337,342,345,348,350,352,354,356,360,361,365,369,373,375,380,382,385,389,390,393,398,402,405,409],[229,33,40,230,231,33],"46742816","project\u002Fneutral\u002Fdesign","gdotdesign",[233,33,33,234,100,33],"46743010","commenter\u002Fneutral\u002Fnone",[236,33,33,234,237,33],"46743517","Malp",[239,33,33,234,231,33],"46743704",[241,33,33,242,243,33],"46762460","other\u002Fneutral\u002Fnone","pkphilip",[88,37,44,245,89,33],"project\u002Fpositive\u002Fexecution",[215,37,33,247,10,37],"maker\u002Fneutral\u002Fnone",[139,249,40,250,140,33],2,"project\u002Fneutral\u002Fidea",[218,249,33,252,10,37],"maker\u002Fneutral\u002Fidea",[254,249,44,255,140,33],"46743349","project\u002Fpositive\u002Fidea",[257,249,33,242,258,33],"46743612","bobajeff",[187,40,40,260,188,33],"project\u002Fneutral\u002Fperformance",[262,40,33,263,264,33],"46743129","other\u002Fneutral\u002Fperformance","Lalabadie",[266,40,33,263,267,33],"46745408","dceddia",[269,40,33,263,188,33],"46746277",[221,40,33,271,10,37],"commenter\u002Fneutral\u002Fperformance",[273,40,33,260,10,37],"46743138",[124,38,37,275,125,33],"project\u002Fcritical\u002Fdesign",[277,38,33,278,231,33],"46743007","other\u002Fneutral\u002Fdesign",[280,38,37,275,281,33],"46743108","zareith",[95,44,44,255,96,33],[54,44,33,252,10,37],[285,17,44,255,286,33],"46744194","vanderZwan",[117,288,37,289,118,33],7,"project\u002Fcritical\u002Fperformance",[291,288,33,292,10,37],"46747537","maker\u002Fneutral\u002Fperformance",[294,288,40,260,118,33],"46752915",[84,212,44,255,85,33],[297,225,37,275,298,33],"46742725","arendtio",[200,31,40,250,201,33],[301,31,33,252,10,37],"46745615",[99,211,40,250,100,33],[304,211,33,242,305,33],"46743242","anonymous908213",[307,308,40,250,309,33],"46742904",12,"zigzag312",[148,311,40,312,149,33],13,"project\u002Fneutral\u002Fnone",[314,315,33,242,316,33],"46743842",14,"elzbardico",[164,318,40,260,165,33],15,[168,318,33,271,169,33],[321,318,33,242,322,33],"46742598","embedding-shape",[324,318,33,242,169,33],"46742761",[326,318,33,242,322,33],"46742970",[328,318,33,263,329,33],"46743361","timeon",[331,318,33,263,322,33],"46743586",[333,318,40,260,334,33],"46742945","mirekrusin",[336,318,40,312,165,33],"46743786",[338,339,37,340,341,33],"46743838",16,"project\u002Fcritical\u002Fexecution","doublerabbit",[343,339,33,344,10,37],"46744064","maker\u002Fneutral\u002Fexecution",[346,339,44,347,341,33],"46744799","maker\u002Fpositive\u002Fexecution",[135,349,40,250,136,33],17,[351,349,33,252,10,37],"46743864",[175,353,40,250,176,33],18,[207,355,40,250,208,33],19,[357,358,44,245,359,33],"46748833",20,"hnhn34",[128,32,37,275,129,33],[362,363,40,312,364,33],"46745884",22,"NetOpWibby",[366,367,40,250,368,33],"46744156",23,"radicalethics",[370,371,40,250,372,33],"46743357",24,"nkmnz",[374,371,33,252,10,37],"46744815",[376,377,44,378,379,33],"46743061",25,"project\u002Fpositive\u002Fdesign","amelius",[109,381,40,312,110,33],26,[383,381,40,312,384,33],"46751958","cholindo",[386,387,40,260,388,33],"46742947",27,"skybrian",[106,387,33,260,10,37],[391,387,33,271,392,33],"46757728","pjmlp",[394,395,44,396,397,33],"46744250",28,"project\u002Fpositive\u002Fnone","monster2control",[399,400,33,242,401,33],"46742739",29,"cap11235",[403,400,33,234,404,33],"46743222","Hasnep",[406,407,44,396,408,33],"46742427",30,"zedai00",[410,411,40,312,412,33],"46749610",31,"arikrahman",[],[415,420,425,430,435,440],{"id":416,"name":417,"points":418,"category":419},"46706528","ChartGPU",670,"data",{"id":421,"name":422,"points":423,"category":424},"46713106","Sweep Next-Edit 1.5B",534,"ai",{"id":426,"name":427,"points":428,"category":429},"46673809","Calquio",314,"finance_crypto",{"id":431,"name":432,"points":433,"category":434},"46709543","Rails UI",208,"dev_tools",{"id":436,"name":437,"points":438,"category":439},"46671952","Dock",177,"productivity",{"id":441,"name":442,"points":438,"category":439},"46675231","Pdfwithlove",false,"v2",{"id":446,"name":5,"line":6,"ai":443,"cat":19,"year":12,"points":13,"comments":14,"rec":28,"s":447,"top":17,"kw":448,"maker":10,"domain":449,"tier":18,"attempts":33,"strip":450,"url":-1,"mix":451,"praise":80,"objection":114,"sub":20},46696283,0.11,[23,24,25,26,27],"","3005350300115515133303000315335130530505",[31,32,33,17],1794036690802]