GitXplorerGitXplorer
J

component-model-example

public
4 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
57d894cd3e68c9a38ce8a4f1a9bea769367c9e4b

Variant for JSConf Budapest

JJSMonk committed 7 months ago
Unverified
8cf3df578595a6593d91353ae428b99913d6e74d

Add project files

sskuzmich committed 9 months ago
Verified
c12a0de5b5d8893c0c631e97697cdcd7c641a6d5

Initial commit

sskuzmich committed 9 months ago

README

The README file for this repository.

Experiments with compiling Kotlin to Wasm Component, linking it with an example component written in Rust, transpiling it to JS + Core Wasm using jco, and running the result in Node.js.

Install dependencies

Checkout skuzmich/cm-prototype branch of Kotlin somewhere and install it to mavenLocal:

cd path/to/kotlin
./gradlew install --parallel

Install recent Rust toolchain and add wasm32-unknown-unknown target:

rustup target add wasm32-unknown-unknown

Install wasm-tools

cargo install wasm-tools

Install Node.js with canary V8 with WasmGC support, for example via NVM:

NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/v8-canary nvm install 21.0.0-v8-canary20231019bd785be450

Install jco and preview2-shim

npm install

Install the latest experimental wit-bindgen CLI with Kotlin support via cargo:

cargo install wit-bindgen-cli --git https://github.com/skuzmich/wit-bindgen --branch kotlin

Build and run

./run.sh