You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The number of runtimes that are javascript or typescript compatible is growing.
Our tests assume nodejs as it's the most popular, but we're seeing Deno turn up in all kinds of places like Cloudflare workers (I think), and bun is also shaping up into a plausible alternative.
Our tests use jest right now via node - how would we support the other tools if we wanted to demonstrate wider support?
Here's our current unit test github action that runs on every PR or push to master:
name: Unit testson:
push:
pull_request:
# snipjobs:
build:
runs-on: ubuntu-lateststrategy:
matrix:
node-version: [14.x, 16.x, 18.x]steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}uses: actions/setup-node@v3with:
node-version: ${{ matrix.node-version }}
- name: Installrun: npm ci
- name: Verify lintrun: npm run lint
- name: Run unit testsrun: npm test
The text was updated successfully, but these errors were encountered:
Wow, it looks like you can now compile javascript directly to wasm now, meaning you don't even need a runtime like Nodejs, Deno, Bun and so on - just something that can consume webassembly.
There are all kinds of restrictions on what you can actually do, but it might be a fun hackday project to see you can make tiny versions of CO2.js that can be consumed in other languages like python or php and so on, if they can consume WASM.
For example, I believe Python can consume WASM files using its wasmtime library, and PHP can do the same with wasmer-php.
This paper gives numbers for showing the same code run in JavaScript, and then using WASM. So, in addition to being able to be run in other runtimes, might also be more efficient.
We would probably need some way of making the types more explicit to compile to WASM. I think reading up on the WIT stuff below would shed some light.
The number of runtimes that are javascript or typescript compatible is growing.
Our tests assume nodejs as it's the most popular, but we're seeing Deno turn up in all kinds of places like Cloudflare workers (I think), and bun is also shaping up into a plausible alternative.
Our tests use jest right now via node - how would we support the other tools if we wanted to demonstrate wider support?
Here's our current unit test github action that runs on every PR or push to master:
The text was updated successfully, but these errors were encountered: