gpuweb
Preact
Our great sponsors
gpuweb | Preact | |
---|---|---|
56 | 108 | |
4,534 | 35,944 | |
2.1% | 0.7% | |
9.0 | 9.3 | |
about 11 hours ago | 2 days ago | |
Bikeshed | JavaScript | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
gpuweb
-
WebGPU now available for testing in Safari Technology Preview
People keep spreading this incredibly misleading statement, and yours is even more misleading (suggesting Apple opposed a 'GPU WASM')
By all accounts, Apple's /only/ stance was that if WebGPU used SPIR-V it would be a non-starter for them, due to ongoing legal issues between Apple and Khronos.
Apple actually proposed WebHLSL in collaboration with Microsoft, to have HLSL be the standard.
Mozilla employee's stance[0] was that SPIRV was too low level, did not fit with the goals of WebGPU portability and security, and expressed concern that Khronos may add functionality to SPIRV they cannot support in WebGPU like raytracing instructions .. 'So we'd always be on the verge of forking SPIR-V in some way.'
It was also noted by many people that even if a bytecode format was used, it would still have to be translated to the target (HLSL/DXIL, MSL, etc.) in almost the same way a text format would.
Nobody proposed a 'GPU WASM equivalent' or an alternative bytecode format.
The hard truth is that shader compilation is a fucking nightmare, people do not realize how bad it is across the different native APIs. SPIR-V is good, but it doesn't solve that - and presents other challenges if you are a web browser API. Vulkan and SPIRV are not the golden goose many make them out to be.
[0] https://github.com/gpuweb/gpuweb/issues/847#issuecomment-642...
-
Show HN: WebGPU Particles Simulation
Yes it is still a bit new. WebGPU is not finished and is still being worked on: https://webgpu.io/
-
Capturing the WebGPU Ecosystem
There's a proposal for a "WebGPU compatibility mode" which also works on older devices:
WebGPU currently doesn't support the "bindless" resource access model (see: https://github.com/gpuweb/gpuweb/issues/380).
The "max number of sampled texture per shader stage" is a runtime device limit, and the minimal value for that seems to be 16. So texture atlasses are still a thing in WebGPU.
-
Why aren't we using highly efficient int8 calcualtions in quants? (maybe eli14?)
There's even an implementation under discussion to have the dp4a instruction added to WebGPU (https://github.com/gpuweb/gpuweb/issues/2677)
- WebGPU – All of the cores, none of the canvas
- [Rust_Gamedev] WGSL est-il un bon choix?
-
I want to talk about WebGPU
Shared memory, yes, with the goodies: atomics and barriers. We rely on that heavily in Vello, so we've pushed very hard on it. For example, WebGPU introduces the "workgroupUniformLoad" built-in, which lets you broadcast a value to all threads in the workgroup while not introducing potential unsafety.
Tensor cores: I can't say there are plans to add it, but it's certainly something I would like to see. You need subgroups in place first, and there's been quite a bit of discussion[1] on that as a likely extension post-1.0.
- Chrome ships WebGPU (available by default in Chrome 113)
Preact
-
How I built a cross-framework frontend library
At the very bottom of the image, there are 3 blocks that I chose to call application components. If you are building a cross-framework library, these can be built with whatever tools you want! Only catch is, all the tools you use to build it, will be needed by everyone consuming it. So choose wisely, and be mindful of how many kilobytes of third party code you will need in order to ship. In Schedule-X, I chose to use Preact. You will probably be fine with most lightweight virtual DOM libraries, and just like with frameworks there are a few to pick from.
-
React Jam just started, making a game in 13 days with React
>> React is not traditionally used for making games, but that's part of the fun and the challenge. R
> MS Flight Simulator cockpits are built with MSFS Avionics Framework which is React-like and MIT licensed:
https://github.com/microsoft/msfs-avionics-mirror/tree/main/...
preactjs may or may not be faster: https://preactjs.com/
Million.js is faster than preact, and lists a number of references under Acknowledgements: https://github.com/aidenybai/million#acknowledgments
> We use a novel approach to the virtual DOM called the block virtual DOM. You can read more on what the block virtual DOM is with Virtual DOM: Back in Block and how we make it happen in React with Behind the block().*
React API reference > Components > Profiler:
- Quando um framework é melhor que a manipulação nativa do DOM
-
HTML Data Attributes: One of the Original State Management Libraries
DEV is a Rails monolith, which uses Preact in the front-end using islands architecture. The reason why I mention all this is that it's not a full-stack JavaScript application, and there is no state management library like Redux or Zustand in use. The data store, for the most part on the front end, is all data attributes.
- Show HN: Cami.js – A No Build, Web Component Based Reactive Framework
-
Hacktoberfest 2023 Recap
Along the way, I not only got the oppurtunity to revise old concepts that had blurred in my memory, but also learnt about new technologies like Fresh.js, a framework from Deno (a js runtime engine) that uses Preact, a React Routing library and used Chakra UI for the first time.
-
Framework Interoperable Component Libraries Using Lit Web Components.
I've thought about this a lot while using other frameworks like Deno Fresh which uses Preact under the hood, mainly for JSX templating, but also for islands functionality. Within that framework you can't really use React component libraries. You start to think more about generating static HTML like this example from the Deno blog [A Whole Website in a Single JavaScript File, cont'd](https://deno.com/blog/a-whole-website-in-a-single-js-file-continued, which shows building a simple webpage with routes all in one typescript file, a site that serves no Javascript to the browser.
-
Nue: A React/Vue/Vite/Astro Alternative
A truly reactive Preact [1] is merely 3 kb of JS.
OTOH the need for really simple bits of interactivity does occur in real life. If the htmx [2] approach does not cu it, a micro-library like this could.
[2]: https://htmx.org/
- Astro: All-in-one web framework designed for speed
-
How are folks feeling about the React team's push toward server components?
Is Preact in that general vein? I've never used it, I only know it's "lightweight React."
What are some alternatives?
react-18 - Workgroup for React 18 release.
Alpine.js - A rugged, minimal framework for composing JavaScript behavior in your markup.
solid - A declarative, efficient, and flexible JavaScript library for building user interfaces.
lit - Lit is a simple library for building fast, lightweight web components.
Svelte - Cybernetically enhanced web apps
Vue.js - This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
lit-element - LEGACY REPO. This repository is for maintenance of the legacy LitElement library. The LitElement base class is now part of the Lit library, which is developed in the lit monorepo.
Mithril.js - A JavaScript Framework for Building Brilliant Applications
preact-bundle-test
react-native - A framework for building native applications using React
inferno - :fire: An extremely fast, React-like JavaScript library for building modern user interfaces
riot - Simple and elegant component-based UI library