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

Publish WASM as NPM/JSR package? #136

Open
SebastienGllmt opened this issue Dec 6, 2024 · 1 comment · May be fixed by #137
Open

Publish WASM as NPM/JSR package? #136

SebastienGllmt opened this issue Dec 6, 2024 · 1 comment · May be fixed by #137

Comments

@SebastienGllmt
Copy link

Currently, dax has a very slim single Rust file here that exposes a WASM interface for the deno_task_shell parsing logic which it then compiles with deno run -A https://deno.land/x/wasmbuild@0.15.6/main.ts --sync --out ./src/lib

The problem is that having this code inlined into dax leads to two issues:

  1. If a new version of deno_task_shell is released, you can't use it from JS until dax is updated
  2. If you want to build an alternative to dax instead of waiting for it to be updated, you have to copy-paste the rust->wasm compilation system into your own project

It feels like probably it would be better to just inline the WASM compilation step into this project and then release deno_task_shell on NPM/JSR. That means that

  1. You can update deno_task_shell without updating dax by just using a patch easily
  2. You can easily use the Deno.Command interface yourself directly if dax doesn't quite fit your needs
@SebastienGllmt SebastienGllmt changed the title Publish as NPM/JSR package? Publish WASM as NPM/JSR package? Dec 6, 2024
@SebastienGllmt SebastienGllmt linked a pull request Dec 6, 2024 that will close this issue
@dsherret
Copy link
Member

dsherret commented Dec 6, 2024

I'm not sure I'd use this in Dax at the moment. Dax uses multiple rust dependencies and it's a smaller footprint to have them all compiled in a single Wasm file.

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 a pull request may close this issue.

2 participants