fix rustbn and rustverkle deps

pull/4514/head
yann300 8 months ago
parent b64fa3dbd7
commit 2864ddcd3e
  1. 16
      apps/remix-ide/webpack.config.js
  2. 2
      package.json
  3. 9
      yarn.lock

@ -7,6 +7,7 @@ const fs = require('fs')
const TerserPlugin = require('terser-webpack-plugin') const TerserPlugin = require('terser-webpack-plugin')
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin') const CssMinimizerPlugin = require('css-minimizer-webpack-plugin')
const rustbnWasm = require('rustbn-wasm') const rustbnWasm = require('rustbn-wasm')
const path = require('path')
const versionData = { const versionData = {
version: version, version: version,
@ -68,15 +69,13 @@ module.exports = composePlugins(withNx(), withReact(), (config) => {
readline: false, readline: false,
child_process: false, child_process: false,
buffer: require.resolve('buffer/'), buffer: require.resolve('buffer/'),
vm: require.resolve('vm-browserify'), vm: require.resolve('vm-browserify')
'rustbn-wasm': require.resolve('rustbn-wasm')
} }
// add externals // add externals
config.externals = { config.externals = {
...config.externals, ...config.externals,
solc: 'solc', solc: 'solc',
'rustbn-wasm': rustbnWasm
} }
// uncomment this to enable react profiling // uncomment this to enable react profiling
@ -87,6 +86,17 @@ module.exports = composePlugins(withNx(), withReact(), (config) => {
} }
*/ */
// use the web build instead of the node.js build
// we do like that because using "config.resolve.alias" doesn't work
let pkgVerkle = fs.readFileSync(path.resolve(__dirname, '../../node_modules/rust-verkle-wasm/package.json'), 'utf8')
pkgVerkle = pkgVerkle.replace('"main": "./nodejs/rust_verkle_wasm.js",', '"main": "./web/rust_verkle_wasm.js",')
fs.writeFileSync(path.resolve(__dirname, '../../node_modules/rust-verkle-wasm/package.json'), pkgVerkle)
config.resolve.alias = {
...config.resolve.alias,
// 'rust-verkle-wasm$': path.resolve(__dirname, '../../node_modules/rust-verkle-wasm/web/run_verkle_wasm.js')
}
// add public path // add public path
if(process.env.NX_DESKTOP_FROM_DIST){ if(process.env.NX_DESKTOP_FROM_DIST){

@ -230,7 +230,7 @@
"remark-gfm": "^3.0.1", "remark-gfm": "^3.0.1",
"rlp": "^3.0.0", "rlp": "^3.0.0",
"rss-parser": "^3.12.0", "rss-parser": "^3.12.0",
"rustbn-wasm": "^0.2.0", "rustbn-wasm": "^0.4.0",
"signale": "^1.4.0", "signale": "^1.4.0",
"snarkjs": "^0.7.0", "snarkjs": "^0.7.0",
"sol2uml": "^2.4.3", "sol2uml": "^2.4.3",

@ -5533,7 +5533,7 @@
estree-walker "^2.0.1" estree-walker "^2.0.1"
picomatch "^2.2.2" picomatch "^2.2.2"
"@scure/base@^1.1.1", "@scure/base@^1.1.3", "@scure/base@^1.1.5", "@scure/base@~1.1.4": "@scure/base@^1.1.3", "@scure/base@^1.1.5", "@scure/base@~1.1.4":
version "1.1.5" version "1.1.5"
resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.5.tgz#1d85d17269fe97694b9c592552dd9e5e33552157" resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.5.tgz#1d85d17269fe97694b9c592552dd9e5e33552157"
integrity sha512-Brj9FiG2W1MRQSTB212YVPRrcbjkv48FoZi/u4l/zds/ieRrqsh7aUf6CLwkAq61oKXr/ZlTzlY66gLIj3TFTQ== integrity sha512-Brj9FiG2W1MRQSTB212YVPRrcbjkv48FoZi/u4l/zds/ieRrqsh7aUf6CLwkAq61oKXr/ZlTzlY66gLIj3TFTQ==
@ -25950,13 +25950,6 @@ rust-verkle-wasm@^0.0.1:
resolved "https://registry.yarnpkg.com/rust-verkle-wasm/-/rust-verkle-wasm-0.0.1.tgz#fd8396a7060d8ee8ea10da50ab6e862948095a74" resolved "https://registry.yarnpkg.com/rust-verkle-wasm/-/rust-verkle-wasm-0.0.1.tgz#fd8396a7060d8ee8ea10da50ab6e862948095a74"
integrity sha512-BN6fiTsxcd2dCECz/cHtGTt9cdLJR925nh7iAuRcj8ymKw7OOaPmCneQZ7JePOJ/ia27TjEL91VdOi88Yf+mcA== integrity sha512-BN6fiTsxcd2dCECz/cHtGTt9cdLJR925nh7iAuRcj8ymKw7OOaPmCneQZ7JePOJ/ia27TjEL91VdOi88Yf+mcA==
rustbn-wasm@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/rustbn-wasm/-/rustbn-wasm-0.2.0.tgz#0407521fb55ae69eeb4968d01885d63efd1c4ff9"
integrity sha512-FThvYFNTqrEKGqXuseeg0zR7yROh/6U1617mCHF68OVqrN1tNKRN7Tdwy4WayPVsCmmK+eMxtIZX1qL6JxTkMg==
dependencies:
"@scure/base" "^1.1.1"
rustbn-wasm@^0.4.0: rustbn-wasm@^0.4.0:
version "0.4.0" version "0.4.0"
resolved "https://registry.yarnpkg.com/rustbn-wasm/-/rustbn-wasm-0.4.0.tgz#fe5601c8d795dd9aa91c19cfad9637ec1df941b0" resolved "https://registry.yarnpkg.com/rustbn-wasm/-/rustbn-wasm-0.4.0.tgz#fe5601c8d795dd9aa91c19cfad9637ec1df941b0"

Loading…
Cancel
Save