Skip to content

Commit cfe8fd4

Browse files
authored
Remove the JS host generator from this repository (#463)
* Refactor root `Cargo.toml` a bit * Update some wasm-tools dependencies * Use a `[patch]` for Wasmtime to reflect how this will eventually be a crates.io dependency * Use `workspace = true` to avoid duplicating path names. * Remove an unneeded futures-util dep * Remove the JS host generator This commit removes the JS host generator from this repository as it now lives at bytecodealliance/js-component-tools. The runtime tests will be updated in a subsequent commit to use Wasmtime as a host for executing components. This additionally removes the demo as it's no longer possible to build it in just this repository. The demo has slowly been getting less useful over time as generators are removed from this repository. Additionally it's always been a demo and not much more so it's more-or-less served its purpose and doesn't seem to have a great place to fit any more. This can possibly exist out-of-tree eventually in a separate location that pulls together all known generators, but until that time it seems best to just remove it for now. Closes #395 * Update the CLI with just guest generators No need for a `guest` subcommand any more since all supported generators are just guest generators. * Let tests run for the `wit-bindgen` binary This'll make sure that it builds as part of `cargo test` * Add scaffolding to run tests in Wasmtime Tests will unfortunately take longer due to wasmtime build times being somewhat nontrivial and additionally rebuilding the java components on each invocation is costly, but for now this should keep the tests relatively simple and easy to maintain by having all the logic be in one place rather than across multiple crates. * Migrate flavorful test * Migrate the lists test * Migrate the many arguments test * Migrate the records test * Migrate the smoke test * Bring back the unions host test * Migrate the variants test * Migrate strings test to Wasmtime * Remove invalid runtime test This is a test for host generators which is no longer being tested in this repository. * Remove exports_only test This is a JS host test primarily * Fix a rustfmt error
1 parent c482614 commit cfe8fd4

61 files changed

Lines changed: 2478 additions & 5455 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/main.yml

Lines changed: 7 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,18 @@ jobs:
4848
- uses: actions/setup-node@v2
4949
with:
5050
node-version: '16'
51-
- name: Install NPM packages
52-
run: npm install
53-
working-directory: crates/gen-host-js
5451
- uses: actions/setup-java@v3
5552
with:
5653
java-version: '18'
5754
distribution: 'adopt'
5855
- run: cargo test --workspace
59-
- run: cargo test -p wit-bindgen-gen-host-js --test runtime --features runtime-tests
56+
- run: cargo build
57+
- run: cargo build --no-default-features
58+
- run: cargo build --no-default-features --features rust
59+
- run: cargo build --no-default-features --features c
60+
- run: cargo build --no-default-features --features teavm-java
61+
- run: cargo build --no-default-features --features markdown
62+
6063

6164
rustfmt:
6265
name: Rustfmt
@@ -67,36 +70,3 @@ jobs:
6770
run: rustup update stable && rustup default stable && rustup component add rustfmt
6871
- name: Format source code
6972
run: cargo fmt -- --check
70-
71-
demo:
72-
name: Build wit-bindgen demo
73-
runs-on: ubuntu-latest
74-
steps:
75-
- uses: actions/checkout@v2
76-
- run: rustup update stable --no-self-update && rustup default stable
77-
- run: rustup target add wasm32-unknown-unknown
78-
- run: npm install
79-
working-directory: crates/wit-bindgen-demo
80-
81-
# Install the `wasm-tools` binary with the `component` subcommand that is all
82-
# that's needed here.
83-
- uses: actions/cache@v3
84-
with:
85-
path: ${{ runner.tool_cache }}/wasm-tools
86-
key: wasm-tools-bin-1.0.17-${{ runner.os }}
87-
- run: echo '${{ runner.tool_cache }}/wasm-tools/bin' >> $GITHUB_PATH
88-
- run: |
89-
cargo install \
90-
wasm-tools@1.0.17 \
91-
--root '${{ runner.tool_cache }}/wasm-tools' \
92-
--locked \
93-
--no-default-features \
94-
--features component
95-
96-
- run: ./crates/wit-bindgen-demo/build.sh
97-
- uses: JamesIves/github-pages-deploy-action@4.1.4
98-
with:
99-
branch: gh-pages
100-
folder: static
101-
single-commit: true
102-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'

0 commit comments

Comments
 (0)