summaryrefslogtreecommitdiffstats
path: root/vendor/wasm-bindgen/examples/import_js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:41:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:41:41 +0000
commit10ee2acdd26a7f1298c6f6d6b7af9b469fe29b87 (patch)
treebdffd5d80c26cf4a7a518281a204be1ace85b4c1 /vendor/wasm-bindgen/examples/import_js
parentReleasing progress-linux version 1.70.0+dfsg1-9~progress7.99u1. (diff)
downloadrustc-10ee2acdd26a7f1298c6f6d6b7af9b469fe29b87.tar.xz
rustc-10ee2acdd26a7f1298c6f6d6b7af9b469fe29b87.zip
Merging upstream version 1.70.0+dfsg2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/wasm-bindgen/examples/import_js')
-rw-r--r--vendor/wasm-bindgen/examples/import_js/README.md15
-rw-r--r--vendor/wasm-bindgen/examples/import_js/index.html8
-rw-r--r--vendor/wasm-bindgen/examples/import_js/package.json14
3 files changed, 37 insertions, 0 deletions
diff --git a/vendor/wasm-bindgen/examples/import_js/README.md b/vendor/wasm-bindgen/examples/import_js/README.md
new file mode 100644
index 000000000..58972ee79
--- /dev/null
+++ b/vendor/wasm-bindgen/examples/import_js/README.md
@@ -0,0 +1,15 @@
+# Importing non-browser JS
+
+[View documentation for this example online][dox] or [View compiled example
+online][compiled]
+
+[compiled]: https://rustwasm.github.io/wasm-bindgen/exbuild/import_js/
+[dox]: https://rustwasm.github.io/docs/wasm-bindgen/examples/import-js.html
+
+You can build the example locally with:
+
+```
+$ npm run serve
+```
+
+and then visiting http://localhost:8080 in a browser should run the example!
diff --git a/vendor/wasm-bindgen/examples/import_js/index.html b/vendor/wasm-bindgen/examples/import_js/index.html
new file mode 100644
index 000000000..e83a75f92
--- /dev/null
+++ b/vendor/wasm-bindgen/examples/import_js/index.html
@@ -0,0 +1,8 @@
+<html>
+ <head>
+ <meta content="text/html;charset=utf-8" http-equiv="Content-Type"/>
+ </head>
+ <body>
+ <p>Open up the developer console and you should see "Hello from Rust!"</p>
+ </body>
+</html>
diff --git a/vendor/wasm-bindgen/examples/import_js/package.json b/vendor/wasm-bindgen/examples/import_js/package.json
new file mode 100644
index 000000000..8b08e4870
--- /dev/null
+++ b/vendor/wasm-bindgen/examples/import_js/package.json
@@ -0,0 +1,14 @@
+{
+ "scripts": {
+ "build": "webpack",
+ "serve" : "webpack serve"
+ },
+ "devDependencies": {
+ "@wasm-tool/wasm-pack-plugin": "1.5.0",
+ "text-encoding": "^0.7.0",
+ "html-webpack-plugin": "^5.3.2",
+ "webpack": "^5.49.0",
+ "webpack-cli": "^4.7.2",
+ "webpack-dev-server": "^3.11.2"
+ }
+}