Skip to content

Commit

Permalink
Add wasm based examples (#1018)
Browse files Browse the repository at this point in the history
* WIP

* Add custom add request

* Update package.json

* Component model resource example

* Update to latest wit-bindgen

* WIP

* Minor example updates

* Update wasm-lsp example

* Added some minor comments

* Minor renames

* Change lsp server to count files

* More model resource work

* WIP

* Make the example work

* Update examples to latest

* Update sample to latest tooling

* Update sample to latest wit2ts tooling

* WIP

* Carry over https://github.com/microsoft/vscode-docs/pull/7234/files

* Code cleanup

* Remove dist folder

* Remove another dist folder
  • Loading branch information
dbaeumer authored May 7, 2024
1 parent 12375b5 commit 209ce0e
Show file tree
Hide file tree
Showing 35 changed files with 4,743 additions and 8,206 deletions.
5 changes: 5 additions & 0 deletions wasm-component-model-resource/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/**
out
dist
src/example.ts
bin
21 changes: 21 additions & 0 deletions wasm-component-model-resource/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**@type {import('eslint').Linter.Config} */
// eslint-disable-next-line no-undef
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {
'semi': [2, "always"],
'@typescript-eslint/no-unused-vars': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-namespace': "off"
}
};
2 changes: 2 additions & 0 deletions wasm-component-model-resource/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
target
dist
19 changes: 19 additions & 0 deletions wasm-component-model-resource/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "extensionHost",
"request": "launch",
"name": "Run Example",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceRoot}",
],
"outFiles": [
"${workspaceRoot}/out/**/*.js"
],
"sourceMaps": true,
"preLaunchTask": "npm: build"
}
]
}
313 changes: 313 additions & 0 deletions wasm-component-model-resource/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions wasm-component-model-resource/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "calculator"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
crate-type = ["cdylib"]

[dependencies]
wit-bindgen = "0.24.0"
Loading

0 comments on commit 209ce0e

Please sign in to comment.