[{"data":1,"prerenderedAt":476},["ShallowReactive",2],{"project-33089131":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":35,"aspects":36,"strip":46,"post_text":48,"what":49,"said":86,"maker_in_thread":185,"shape":195,"grid":198,"attempts":439,"same_week":440,"maker_shows":33,"maker_hidden":468,"reader_version":469,"card":470},"33089131","Async UI","A Rust UI Library Where Everything is a Future","title","Show HN: Async UI: A Rust UI Library Where Everything is a Future","https:\u002F\u002Fwishawa.github.io\u002Fposts\u002Fasync-ui-intro\u002F","wishawa.github.io","wishawa",1664928876,2022,173,92,349,2570,14,"notable","dev_tools","ui library","library",[24,21,25,26,27],"rust","async","retained mode gui","reactive ui","mixed",0.071,{"positive":31,"neutral":32,"mixed":33,"critical":34},10,16,1,8,35,{"performance":37,"idea":40,"design":42,"docs":44,"execution":45},{"positive":38,"critical":39},0,3,{"positive":39,"critical":41},2,{"positive":43,"critical":39},5,{"positive":38,"critical":38},{"positive":33,"critical":38},[33,38,38,38,38,38,38,38,38,38,38,38,38,38,38,33,43,33,39,47,39,39,38,43,39,39,38,39,43,39,39,39,38,39,38,39,39,39,39,38],4,null,{"problem":50,"audience":48,"pricing":48,"motivation":60,"time_to_build":48,"stack":65,"openness":83,"stage":84,"team_size":85},{"value":51,"source":52,"evidence":53},"Writing UI code in Rust where components and control flow are expressed as async functions.","maker",[54,57],{"id":55,"by":11,"text":56},"33089233","Hi HN! I've been working on Async UI for half a year now, and I think it is time I share it with everyone. The project is not even really usable yet (due to lack of implemented…",{"id":58,"by":11,"text":59},"33091495","The async control flow is not directly inspired by anything. It is a cool side effect of using async for everything that I myself only discovered once I started writing examples.…",{"value":61,"source":52,"evidence":62},"Async is an effect system and UI is an effect system; a fit for Rust.",[63,64],{"id":58,"by":11,"text":59},{"id":55,"by":11,"text":56},[66,70,76],{"value":67,"source":52,"evidence":68},"Rust",[69],{"id":55,"by":11,"text":56},{"value":71,"source":52,"evidence":72},"async-std executor",[73],{"id":74,"by":11,"text":75},"33091705","This uses the executor used by async-std rather than the one used by Tokio. So if you're using something Tokio-specific, you would probably need async-compat[1]. But can you…",{"value":77,"source":78,"evidence":79},"web_sys (web example)","commenter",[80],{"id":81,"by":11,"text":82},"33099629","The Todo example is 2.5 MB non-gzipped. About 600KB gzipped. Still large, but it's because we're shipping a lot of code that we don't need. Mostly the APIs exposed by web_sys.…","open_source","prototype","unknown",{"praise":87,"objections":110,"requests":132,"questions":140,"alternatives":155},[88,103],{"value":89,"source":78,"evidence":90},"Interesting model, similar to SwiftUI and Compose",[91,95,99],{"id":92,"by":93,"text":94},"33095850","ohgodplsno","Today in \"HN never used a reactive framework that is not React and is offended when UI is not written with Dear ImGui\". This is literally the exact style of SwiftUI and Jetpack…",{"id":96,"by":97,"text":98},"33093623","your_challenger","This is very Compose (Android) and Swift UI (iOS) like. I love it!",{"id":100,"by":101,"text":102},"33093373","debdut","has a SwiftUI resemblance, nice :)",{"value":104,"source":78,"evidence":105},"Linear control flow like console apps",[106],{"id":107,"by":108,"text":109},"33095258","gwbas1c","Hopefully I can find some time in my busy schedule to try this. One thing I like is that the code appears to flow more like a console app than a GUI app. I've always found it's…",[111,118,125],{"value":112,"source":78,"evidence":113},"Async noise and verbosity in larger examples",[114],{"id":115,"by":116,"text":117},"33098087","tayistay","This is an interesting idea, but if you look at bigger examples, such as the todo-list example, the code is littered with `async` noise, calls to `borrow()`, and other fancy…",{"value":119,"source":78,"evidence":120},"Hard to debug and reason about",[121],{"id":122,"by":123,"text":124},"33091688","HippoBaro","(Context: I write async rust professionally) Fly you fools. This will be a nightmare to debug, introspect and reason about for a speed boost that you (and your users) won’t be…",{"value":126,"source":78,"evidence":127},"Large bundle size for web example",[128],{"id":129,"by":130,"text":131},"33095684","Existenceblinks","It's 2.56 MB gzip!",[133],{"value":134,"source":78,"evidence":135},"Compare with existing frameworks",[136],{"id":137,"by":138,"text":139},"33093037","fyvhbhn","Could you compare it with Sycamore with a few bullet points? I feel like it is pretty close even though you don't see the async exposed? L",[141,148],{"value":142,"source":78,"evidence":143},"Does it work with Tokio?",[144],{"id":145,"by":146,"text":147},"33091561","davidatbu","So, does this work with an application that uses tokio?",{"value":149,"source":78,"evidence":150},"How does login_form return values while rendering?",[151],{"id":152,"by":153,"text":154},"33090609","lucasyvas","This is wild to me... how does that login_form function work? If awaiting renders, then it can also return values?",[156,163,167,174],{"value":157,"source":78,"evidence":158},"RUI",[159],{"id":160,"by":161,"text":162},"33091558","adamnemecek","You might be interested in RUI https:\u002F\u002Fgithub.com\u002Faudulus\u002Frui",{"value":164,"source":78,"evidence":165},"Sycamore",[166],{"id":137,"by":138,"text":139},{"value":168,"source":78,"evidence":169},"Concur JS",[170],{"id":171,"by":172,"text":173},"33092151","pharmakom","Looks a bit like concur JS",{"value":175,"source":78,"evidence":176},"Dear ImGui \u002F immediate mode GUIs",[177,181],{"id":178,"by":179,"text":180},"33091700","mbStavola","I must admit, I was a bit skeptical when reading the title, but after reading I'm super interested. The login form example which returns values reminds me a lot of imgui and…",{"id":182,"by":183,"text":184},"33092415","cercatrova","Isn't this basically retained mode vs immediate mode GUIs?",{"comments":186,"answered":43,"key":187},12,[188,189,192],{"id":55,"text":56},{"id":190,"text":191},"33091090","You're right that components should intuitively pend forever. But with Async UI, the line between a component and a normal async function is blurry; our login_form eventually…",{"id":193,"text":194},"33091414","The full example code is here: https:\u002F\u002Fgithub.com\u002Fwishawa\u002Fasync_ui\u002Fblob\u002Fmain\u002Fexamples\u002Fgtk-login-form\u002Fsrc\u002Fmain.rs. (except for that invalid_login_popup is not a real popup because…",{"commenters":196,"max_depth":18,"maker_replies":186,"first_comment_mins":31,"lifespan_hours":197},54,41,[199,201,205,209,213,216,218,221,224,226,229,231,233,235,238,241,244,247,249,251,254,257,259,261,263,265,267,269,271,273,275,277,279,283,286,289,292,296,300,304,308,310,312,316,320,321,325,328,329,330,333,334,335,338,342,344,345,347,350,352,356,359,362,366,369,373,377,381,384,388,391,393,396,397,398,401,404,408,410,412,414,416,418,419,421,423,425,427,429,431,433,435],[122,38,33,200,123,38],"project\u002Fcritical\u002Fperformance",[202,38,38,203,204,38],"33092187","commenter\u002Fneutral\u002Fidea","TuringTest",[206,38,38,207,208,38],"33092274","commenter\u002Fneutral\u002Fnone","quietbritishjim",[210,38,38,211,212,38],"33092803","commenter\u002Fneutral\u002Fperformance","Huh1337",[214,38,38,207,215,38],"33096399","dboreham",[217,38,38,207,212,38],"33105092",[219,38,38,203,220,38],"33092880","bheadmaster",[222,38,38,203,223,38],"33093186","throw827474737",[225,38,38,211,220,38],"33093280",[227,38,38,211,228,38],"33095015","titzer",[230,38,38,207,220,38],"33095292",[232,38,38,207,223,38],"33105655",[234,38,38,207,220,38],"33106859",[236,38,38,207,237,38],"33093712","jen20",[239,38,38,211,240,38],"33093917","smnc",[242,38,38,203,243,38],"33094168","moonchrome",[245,38,38,203,246,38],"33093225","fnord123",[248,38,38,203,220,38],"33093322",[250,38,38,203,246,38],"33099819",[252,38,38,203,253,38],"33095240","gpderetta",[255,38,38,211,256,38],"33096666","naasking",[258,38,38,211,220,38],"33098011",[260,38,38,211,256,38],"33099121",[262,38,38,211,253,38],"33106713",[264,38,38,211,256,38],"33107179",[266,38,38,211,253,38],"33107516",[268,38,38,211,256,38],"33107633",[270,38,38,211,253,38],"33107770",[272,38,38,211,256,38],"33109563",[274,38,38,211,253,38],"33109648",[276,38,38,211,256,38],"33109754",[278,38,38,211,220,38],"33110546",[280,38,38,281,282,38],"33097689","other\u002Fneutral\u002Fidea","zackmorris",[284,38,38,207,285,38],"33092867","junon",[287,38,33,200,288,38],"33093003","fastball",[290,38,38,207,291,38],"33093154","rat9988",[293,38,43,294,295,38],"33093173","project\u002Fpositive\u002Fidea","akiselev",[297,38,39,298,299,38],"33093583","project\u002Fneutral\u002Fidea","mcherm",[301,38,43,302,303,38],"33096236","project\u002Fpositive\u002Fnone","lijogdfljk",[305,38,33,306,307,38],"33094813","project\u002Fcritical\u002Fidea","teknopurge",[309,38,38,207,215,38],"33096378",[55,33,38,311,11,33],"maker\u002Fneutral\u002Fidea",[313,33,39,314,315,38],"33090479","project\u002Fneutral\u002Fdesign","karmakaze",[317,33,43,318,319,38],"33096339","project\u002Fpositive\u002Fdesign","api",[178,41,43,294,179,38],[322,39,33,323,324,38],"33093019","project\u002Fcritical\u002Fdesign","wruza",[326,47,39,314,327,38],"33095423","meltedcapacitor",[152,43,39,314,153,38],[190,43,38,311,11,33],[331,43,39,332,153,38],"33091231","maker\u002Fneutral\u002Fdocs",[193,43,38,332,11,33],[58,43,38,311,11,33],[336,43,38,281,337,38],"33093684","kwkelly",[339,340,39,298,341,38],"33092084",6,"royjacobs",[92,343,43,318,93,38],7,[107,34,43,318,108,38],[115,346,33,323,116,38],9,[348,346,38,349,11,33],"33098859","maker\u002Fneutral\u002Fdesign",[351,346,39,349,116,38],"33100431",[353,31,38,354,355,38],"33091474","other\u002Fneutral\u002Fnone","cottsak",[357,31,38,203,358,38],"33093634","mananaysiempre",[360,31,38,361,11,33],"33099589","project\u002Fneutral\u002Fexecution",[363,364,39,298,365,38],"33092576",11,"cyber_kinetist",[367,186,39,298,368,38],"33091827","voorwerpjes",[370,186,38,371,372,38],"33092525","commenter\u002Fneutral\u002Fexecution","sakex",[374,375,43,294,376,38],"33094908",13,"qwerty456127",[378,375,39,379,380,38],"33095177","project\u002Fmixed\u002Fdesign","zarzavat",[382,375,38,383,376,38],"33106168","commenter\u002Fneutral\u002Fdesign",[385,18,39,386,387,38],"33095720","project\u002Fneutral\u002Fperformance","jcelerier",[160,389,39,390,161,38],15,"project\u002Fneutral\u002Fnone",[392,389,38,298,11,33],"33091753",[394,389,39,390,395,38],"33096246","skavi",[145,32,39,361,146,38],[74,32,38,361,11,33],[399,32,38,371,400,38],"33091839","Klonoar",[402,32,43,403,146,38],"33092554","maker\u002Fpositive\u002Fexecution",[405,406,33,306,407,38],"33091125",17,"avrionov",[171,409,39,298,172,38],18,[411,409,38,314,11,33],"33099699",[413,409,38,383,172,38],"33101638",[96,415,43,318,97,38],19,[129,417,33,200,130,38],20,[81,417,38,386,11,33],[420,417,38,354,130,38],"33102943",[182,422,39,314,183,38],21,[100,424,43,318,101,38],22,[426,424,33,323,116,38],"33098143",[137,428,39,390,138,38],23,[430,428,38,314,11,33],"33099892",[432,428,38,383,138,38],"33106207",[434,428,38,314,11,33],"33110716",[436,437,38,354,438,38],"33094796",24,"SeniorMars",[],[441,445,450,454,459,463],{"id":442,"name":443,"points":444,"category":20},"33049046","SigNoz",510,{"id":446,"name":447,"points":448,"category":449},"33068017","Javalin",377,"languages",{"id":451,"name":452,"points":453,"category":449},"33035580","uFuzzy.js",251,{"id":455,"name":456,"points":457,"category":458},"33038117","GhostlyStock",190,"ai",{"id":460,"name":461,"points":462,"category":20},"33094627","Sharing",189,{"id":464,"name":465,"points":466,"category":467},"33094720","kafka-worker",148,"infrastructure",false,"v2",{"id":471,"name":5,"line":6,"ai":468,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":472,"top":18,"kw":473,"maker":11,"domain":10,"tier":19,"attempts":38,"strip":474,"url":9,"mix":475,"praise":89,"objection":112,"sub":21},33089131,0.07,[24,21,25,26,27],"1000000000000001513433053303533303033330",[31,32,33,34],1794036625802]