winglang / wing

A programming language for the cloud ☁️ A unified programming model, combining infrastructure and runtime code into one language ⚡
https://winglang.io
Other
5.07k stars 198 forks source link

feat: `bytes` type #7122

Closed Chriscbr closed 2 months ago

Chriscbr commented 2 months ago

Closes #7118

This implements the immutable variant of bytes. The mutable version is left for future work.

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Wing Cloud Contribution License.

github-actions[bot] commented 2 months ago

Thanks for opening this pull request! :tada: Please consult the contributing guidelines for details on how to contribute to this project. If you need any assistance, don't hesitate to ping the relevant owner over Discord.

Topic Owner
Wing SDK and standard library @chriscbr
Wing Console @skyrpex
Wing compiler and language design @chriscbr
VSCode extension and language server @chriscbr
Wing CLI @chriscbr
Documentation @boyney123
Examples @boyney123
Wing Playground @skyrpex
monadabot commented 2 months ago

Console preview environment is available at https://wing-console-pr-7122.fly.dev :rocket:

Last Updated (UTC) 2024-09-16 16:34
skyrpex commented 2 months ago

Any plans on adding streaming APIs? The current methods only load entire files... what about big files that need to be processed in steps, for example?

Chriscbr commented 2 months ago

Any plans on adding streaming APIs? The current methods only load entire files... what about big files that need to be processed in steps, for example?

I left it out of the base bytes RFC to avoid more scope creep, but I'm totally with you, Wing should data streaming (at least in inflight). I'll open an issue for further design discussion.

I think since bytes is implemented in terms of JavaScript's Uint8Array (which is supported by Node.js and browsers), any further streaming additions should be compatible with this API. But we can adjust or revisit if needed

monadabot commented 2 months ago

Congrats! :rocket: This was released in Wing 0.85.5.