-
Notifications
You must be signed in to change notification settings - Fork 52
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
TS Wraps support #1888
Conversation
There was a problem hiding this 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/test-cases/cases/cli/build-cmd/wasm/typescript/001-sanity/polywrap.yaml
Outdated
Show resolved
Hide resolved
packages/test-cases/cases/cli/build-cmd/wasm/typescript/001-sanity/polywrap.build.yaml
Outdated
Show resolved
Hide resolved
@@ -0,0 +1 @@ | |||
0.1.6 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
packages/cli/src/lib/defaults/build-strategies/wasm/javascript/vm/Dockerfile
Show resolved
Hide resolved
packages/cli/src/lib/defaults/build-strategies/wasm/javascript/local/local.sh
Outdated
Show resolved
Hide resolved
packages/cli/src/lib/build-strategies/strategies/DockerVMStrategy.ts
Outdated
Show resolved
Hide resolved
packages/cli/src/lib/build-strategies/strategies/DockerVMStrategy.ts
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,3 @@ | |||
format: 0.3.0 | |||
config: | |||
scriptFile: ./bundled/wrap.js |
There was a problem hiding this comment.
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?
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