Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS Wraps support #1888

Merged
merged 24 commits into from
Sep 7, 2023
Merged

TS Wraps support #1888

merged 24 commits into from
Sep 7, 2023

Conversation

namesty
Copy link
Collaborator

@namesty namesty commented Sep 5, 2023

This PR adds:

Creating TS wrap projects
Codegen for TS wrap bindings
Template for TS wrap projects
Building TS wraps with Image and VM strategies
Additionally, it separates binding languages from build languages: go, rust and assemblyscript are both; interfaces and typescript are bindings only and javascript is, currently, build only.

The reason for this is that we shouldn't need 2 different directories for JS and TS build strategies; because TS wraps are TS bindings + rollup.js config that produce a single JS file, that is then built as a JS wrap.

The reasons I built it this way are basically letting users tweak bundling configurations and debug their bundles freely, or even use other bundlers like webpack; and in general, not doing anything special or extra on our side for TS, but rather trying to get it as cheaply as possible on top of JS wraps

Copy link
Member

@dOrgJelli dOrgJelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking really good! Just a few minor NITS

packages/schema/bind/src/bindings/index.ts Outdated Show resolved Hide resolved
@@ -0,0 +1 @@
0.1.6
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: strange that we started this off at 0.1.6

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the image I published has no version tag. Just initted this with 0.0.1

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@namesty it looks like you might have accidentally published 0.1.6, see here: https://hub.docker.com/r/polywrap/vm-base-js/tags

Not sure if we can "yank" the tag or not. Also let's start dev versioning at 0.1.0 like we do in our other software.

@@ -0,0 +1,3 @@
format: 0.3.0
config:
scriptFile: ./bundled/wrap.js
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this file be removed?

@dOrgJelli dOrgJelli merged commit be9085f into origin-dev Sep 7, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants