Giter VIP home page Giter VIP logo

Comments (4)

frigus02 avatar frigus02 commented on June 28, 2024 1

Link for easy reference: https://github.com/emscripten-core/emscripten/blob/fb4bdc78cf3b99d634838418882f199e18309a5c/src/closure-externs/webgpu-externs.js

Thanks for the offer. On first glance I'd say they look nice. I'm going to check with the team if we want to include them as is.

from closure-compiler.

kainino0x avatar kainino0x commented on June 28, 2024 1

Sounds good! We're happy to use our own externs in Emscripten for now. Hopefully if anyone is searching they'll find this issue and be able to copy them.

We're currently maintaining TypeScript types for WebGPU outside of upstream TypeScript: https://github.com/gpuweb/types
We've considered pushing to get them upstream, but since we're currently maintaining extra features over what TypeScript's generated types would look like (documentation pulled from the WebGPU spec, and some extra strictness), there hasn't been much pressure. And I'm sure TypeScript will add them themselves once it reaches whatever their threshold is.

from closure-compiler.

kainino0x avatar kainino0x commented on June 28, 2024

If it helps, both Safari and Firefox have made strong signals about the API - Chrome shipped with positive signals from other browsers (the only caveat being that they hadn't/haven't finished implementing).
Firefox has had it on Nightly for a while (not yet shipping to stable): https://developer.mozilla.org/en-US/docs/Web/API/WebGPU_API#browser_compatibility
Safari recently enabled it behind a flag in Safari Technology Preview: https://www.webkit.org/blog/14885/release-notes-for-safari-technology-preview-185/

from closure-compiler.

frigus02 avatar frigus02 commented on June 28, 2024

We talked internally. We'd rather not include the externs with JSCompiler by default, yet, because the API is currently only live Chrome.

Related: We're also thinking about generating externs using tsickle from TypeScript typings. That way we'd get better about adding new browser APIs to externs. But at the same time we'd only get them once at least 2 browser engines implement them, since that seems to be TS' policy.

I hope that makes sense. I'd kinda like to keep the issue open, though. We do need to add WebGPU externs eventually.

from closure-compiler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.