Use Winglang to build Wing SDK resources #4810
Labels
✨ enhancement
New feature or request
needs-discussion
Further discussion is needed prior to impl
🎨 sdk
SDK
📜 sdk-spec-impl
Appears in the SDK spec roadmap
Milestone
Feature Spec
It is now possible to add new classes to the Wing SDK written in winglang by committing them under
libs/winglang/sdk
or something like this (for example:libs/winglang/sdk/check.w
).These classes will be "merged" into the
cloud
namespace by the compiler and will seamlessly be available under thecloud
builtin module when used from Winglang code. They will look and feel exactly like any other native Wing SDK class.xxx.md
files placed next to these.w
files will also be included in the documentation.NOTE: These classes may reference each other and other SDK classes but SDK classes written in TypeScript won't be able to use these classes.
Use Cases
As winglang matures, it becomes a great option to author new resources in the Wing SDK. For example, the
cloud.Check
resource is a great example. Another example is thecloud.Workload
, which is currently implemented as an external library but should also be part of the Wing SDK.Implementation Notes
No response
Component
Compiler, SDK
Community Notes
The text was updated successfully, but these errors were encountered: