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

feat: allow custom weval bin #522

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ jobs:
macos-latest
]
node: [18.x, 20.x, latest]
weval:
- 'v0.3.2'
exclude:
- os: macos-latest
node: 20.x
Expand All @@ -61,6 +63,10 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- uses: jaxxstorm/[email protected]
with:
repo: bytecodealliance/weval
tag: {{ matrix.weval }}
- name: Install NPM packages
run: npm ci
- name: Download Build
Expand Down
1 change: 1 addition & 0 deletions src/cmd/componentize.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export async function componentize (jsSource, opts) {
const source = await readFile(jsSource, 'utf8');
const { component } = await componentizeFn(source, {
enableAot: opts.aot,
wevalBin: opts.wevalBin,
sourceName: basename(jsSource),
witPath: resolve(opts.wit),
worldName: opts.worldName,
Expand Down
1 change: 1 addition & 0 deletions src/jco.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ program.command('componentize')
.requiredOption('-w, --wit <path>', 'WIT path to build with')
.option('-n, --world-name <name>', 'WIT world to build')
.option('--aot', 'Enable Weval AOT compilation of JS')
.option('--weval-bin <path>', 'Specify a custom weval binary to use')
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would have expected we'd need to set this somewhere in this PR to use it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes -- this PR actually isn't quite ready yet -- I need to make sure that installing weval with https://github.com/jaxxstorm/action-install-gh-release actually works. Will move this to draft while I work on the CI bits.

The place this has to go is in the CLI test where we call componentize -- just haven't added it yet!

.addOption(new Option('-d, --disable <feature...>', 'disable WASI features').choices(['clocks', 'http', 'random', 'stdio', 'all']))
// .addOption(new Option('-e, --enable <feature...>', 'enable WASI features').choices(['http']))
.option('--preview2-adapter <adapter>', 'provide a custom preview2 adapter path')
Expand Down