更新libclamav库1.0.0版本
This commit is contained in:
7
clamav/libclamav_rust/.cargo/vendor/wasm-bindgen/examples/README.md
vendored
Normal file
7
clamav/libclamav_rust/.cargo/vendor/wasm-bindgen/examples/README.md
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
# Examples
|
||||
|
||||
This directory contains a number of Cargo projects that are all examples of how
|
||||
to use `wasm-bindgen` in various contexts. More documentation can be [found
|
||||
online][dox]
|
||||
|
||||
[dox]: https://rustwasm.github.io/docs/wasm-bindgen/examples/index.html
|
||||
15
clamav/libclamav_rust/.cargo/vendor/wasm-bindgen/examples/import_js/README.md
vendored
Normal file
15
clamav/libclamav_rust/.cargo/vendor/wasm-bindgen/examples/import_js/README.md
vendored
Normal file
@@ -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!
|
||||
8
clamav/libclamav_rust/.cargo/vendor/wasm-bindgen/examples/import_js/index.html
vendored
Normal file
8
clamav/libclamav_rust/.cargo/vendor/wasm-bindgen/examples/import_js/index.html
vendored
Normal file
@@ -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>
|
||||
4
clamav/libclamav_rust/.cargo/vendor/wasm-bindgen/examples/import_js/index.js
vendored
Normal file
4
clamav/libclamav_rust/.cargo/vendor/wasm-bindgen/examples/import_js/index.js
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
// For more comments about what's going on here, check out the `hello_world`
|
||||
// example
|
||||
import('./crate/pkg')
|
||||
.catch(console.error);
|
||||
14
clamav/libclamav_rust/.cargo/vendor/wasm-bindgen/examples/import_js/package.json
vendored
Normal file
14
clamav/libclamav_rust/.cargo/vendor/wasm-bindgen/examples/import_js/package.json
vendored
Normal file
@@ -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"
|
||||
}
|
||||
}
|
||||
30
clamav/libclamav_rust/.cargo/vendor/wasm-bindgen/examples/import_js/webpack.config.js
vendored
Normal file
30
clamav/libclamav_rust/.cargo/vendor/wasm-bindgen/examples/import_js/webpack.config.js
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
const path = require('path');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const webpack = require('webpack');
|
||||
const WasmPackPlugin = require("@wasm-tool/wasm-pack-plugin");
|
||||
|
||||
module.exports = {
|
||||
entry: './index.js',
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
filename: 'index.js',
|
||||
},
|
||||
plugins: [
|
||||
new HtmlWebpackPlugin({
|
||||
template: 'index.html'
|
||||
}),
|
||||
new WasmPackPlugin({
|
||||
crateDirectory: path.resolve(__dirname, "crate")
|
||||
}),
|
||||
// Have this example work in Edge which doesn't ship `TextEncoder` or
|
||||
// `TextDecoder` at this time.
|
||||
new webpack.ProvidePlugin({
|
||||
TextDecoder: ['text-encoding', 'TextDecoder'],
|
||||
TextEncoder: ['text-encoding', 'TextEncoder']
|
||||
})
|
||||
],
|
||||
mode: 'development',
|
||||
experiments: {
|
||||
asyncWebAssembly: true
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user