Chore/wasm removal cleanup (#37)

* Remove old wasm leftovers

* use wildcard for tlsn-js wasm entry

* Remove unused ttlcache dependency
This commit is contained in:
Hendrik Eeckhaut
2024-01-07 04:08:51 +01:00
committed by GitHub
parent 72efee69ff
commit c2b3b9dcfa
7 changed files with 8 additions and 53 deletions

View File

@@ -1,10 +0,0 @@
[target.wasm32-unknown-unknown]
rustflags = [
"-C",
"target-feature=+atomics,+bulk-memory,+mutable-globals",
"-C",
"link-arg=--max-memory=4294967296"
]
[unstable]
build-std = ["panic_abort", "std"]

2
.gitignore vendored
View File

@@ -2,11 +2,9 @@
**/*.rs.bk
Cargo.lock
bin/
wasm-pack.log
**/node_modules
**/.DS_Store
.idea
build
tlsn/
zip
wasm/prover/target/

View File

@@ -9,14 +9,13 @@
1. Check if your [Node.js](https://nodejs.org/) version is >= **18**.
2. Clone this repository.
3. Run `npm install` to install the dependencies.
4. Run `npm run build:wasm`
5. Run `npm run dev`
6. Load your extension on Chrome following:
4. Run `npm run dev`
5. Load your extension on Chrome following:
1. Access `chrome://extensions/`
2. Check `Developer mode`
3. Click on `Load unpacked extension`
4. Select the `build` folder.
7. Happy hacking.
6. Happy hacking.
## Building Websockify Docker Image
```
@@ -44,6 +43,4 @@ Now, the content of `build` folder will be the extension ready to be submitted t
## Resources:
- [Webpack documentation](https://webpack.js.org/concepts/)
- [Chrome Extension documentation](https://developer.chrome.com/extensions/getstarted)
- [wasm-bindgen-rayon](https://github.com/GoogleChromeLabs/wasm-bindgen-rayon)
- [wasm-unsafe-eval CSP](https://bugs.chromium.org/p/chromium/issues/detail?id=1173354#c60)
- [Chrome Extension documentation](https://developer.chrome.com/extensions/getstarted)

View File

@@ -8,8 +8,6 @@
},
"scripts": {
"clone:tlsn": "bash ./utils/download-tlsn.sh",
"build:wasm": "wasm-pack build --target web wasm/prover",
"update:wasm": "cargo update --manifest-path wasm/prover/Cargo.toml",
"build": "NODE_ENV=production node utils/build.js",
"build:webpack": "NODE_ENV=production webpack --config webpack.config.js",
"websockify": "docker run -it --rm -p 55688:80 -v $(pwd):/app novnc/websockify 80 --target-config /app/websockify_config",
@@ -82,7 +80,6 @@
"style-loader": "^3.3.1",
"terser-webpack-plugin": "^5.3.6",
"ts-loader": "^9.4.2",
"ttlcache": "@types/@isaacs/ttlcache",
"type-fest": "^3.5.2",
"typescript": "^4.9.4",
"webextension-polyfill": "^0.10.0",
@@ -91,4 +88,4 @@
"webpack-dev-server": "^4.11.1",
"zip-webpack-plugin": "^4.0.1"
}
}
}

View File

@@ -1,5 +0,0 @@
[toolchain]
# channel = "nightly-2022-12-12"
# channel = "stable"
# channel = "nightly-x86_64-apple-darwin"
channel = "nightly"

View File

@@ -1,22 +0,0 @@
#!/bin/bash
# Set the directory path where you want to clone the repository
target_directory="tlsn"
# GitHub repository URL
github_url="https://github.com/tlsnotary/tlsn.git"
# Check if the target directory exists
if [ -d "$target_directory" ]; then
echo "tlsn already exists."
else
# Clone the repository if the directory doesn't exist
git clone "$github_url" "$target_directory"
# Check if the cloning was successful
if [ $? -eq 0 ]; then
echo "tlsn cloned successfully."
else
echo "Error cloning repository."
fi
fi

View File

@@ -38,8 +38,8 @@ const isDevelopment = process.env.NODE_ENV !== "production";
var options = {
mode: process.env.NODE_ENV || "development",
ignoreWarnings: [
/Circular dependency between chunks with runtime/,
/ResizeObserver loop completed with undelivered notifications/
/Circular dependency between chunks with runtime/,
/ResizeObserver loop completed with undelivered notifications/
],
entry: {
@@ -209,7 +209,7 @@ var options = {
force: true,
},
{
from: "node_modules/tlsn-js/build/26f00cc36bec9d635c39.wasm",
from: "node_modules/tlsn-js/build/*.wasm",
to: path.join(__dirname, "build"),
force: true,
},