更新libclamav库1.0.0版本

This commit is contained in:
2023-01-14 18:28:39 +08:00
parent b879ee0b2e
commit 45fe15f472
8531 changed files with 1222046 additions and 177272 deletions

View 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

View 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!

View 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>

View 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);

View 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"
}
}

View 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
}
};