Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Do not merge] Prototype: Async rewriter alternative 1 (Rust, WASM, no AST manipulation) #1931

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
615 changes: 614 additions & 1 deletion .evergreen.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .evergreen/evergreen.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ functions:
source .evergreen/setup-env.sh
npm run evergreen-release bump
npm run compile
tar cvzf compiled-ts.tgz packages/*/{lib,dist,package.json} package.json package-lock.json
tar cvzf compiled-ts.tgz packages/*/{lib,dist,pkg,target,package.json} package.json package-lock.json
- command: s3.put
params:
aws_key: ${aws_key}
Expand Down
4 changes: 4 additions & 0 deletions .evergreen/install-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ else
if which realpath; then # No realpath on macOS, but also not needed there
export HOME="$(realpath "$HOME")" # Needed to de-confuse nvm when /home is a symlink
fi

echo "Setting up Rust"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh /dev/stdin -y

# Some Node.js driver versions leave a ~/.npmrc file lying around
# that breaks nvm because it contains a 'prefix=' option (pointing
# to a directory that no longer exists anyway).
Expand Down
2 changes: 2 additions & 0 deletions .evergreen/setup-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ if [ "$OS" != "Windows_NT" ]; then
if which realpath; then # No realpath on macOS, but also not needed there
export HOME="$(realpath "$HOME")" # Needed to de-confuse nvm when /home is a symlink
fi
source $HOME/.cargo/env

export NVM_DIR="$BASEDIR/.nvm"
echo "Setting NVM environment home: $NVM_DIR"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
Expand Down
13 changes: 11 additions & 2 deletions config/webpack.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ module.exports = {
test: /\.ts$/,
use: [{ loader: 'ts-loader' }],
exclude: [/node_modules/]
}
},
/*{
test: /\.wasm$/,
type: 'asset/source',
},*/
]
},

Expand Down Expand Up @@ -54,6 +58,7 @@ module.exports = {
},

output: {
chunkFormat: false,
strictModuleErrorHandling: true,
strictModuleExceptionHandling: true,
},
Expand All @@ -66,5 +71,9 @@ module.exports = {
analyzerMode: 'static',
openAnalyzer: false
})
]
],

experiments: {
asyncWebAssembly: true
},
};
110 changes: 110 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
"workspaces": [
"configs/eslint-config-mongosh",
"configs/tsconfig-mongosh",
"packages/async-rewriter3",
"scripts/docker",
"packages/async-rewriter2",
"packages/build",
Expand Down
Loading
Loading