1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #!/usr/bin/env bash
- # Copyright Materialize, Inc. and contributors. All rights reserved.
- #
- # Use of this software is governed by the Business Source License
- # included in the LICENSE file at the root of this repository.
- #
- # As of the Change Date specified in that file, in accordance with
- # the Business Source License, use of this software will be governed
- # by the Apache License, Version 2.0.
- #
- # wasm-build — build a crate for WASM32
- set -euo pipefail
- . misc/shlib/shlib.bash
- # Unset existing flags because several linker-specific ones don't play nicely with WASM targets
- export RUSTFLAGS="--cfg=tokio_unstable"
- if [[ $# -lt 1 ]]
- then
- echo "usage: $0 <path>
- Builds a WASM32 target and NPM metadata for the specified crate
- path the path to the crate"
- exit 1
- fi
- crate=$1
- exec "$(dirname "$0")"/xcompile \
- tool \
- --no-name-target-prefix \
- wasm-pack \
- build \
- --release \
- --scope materializeinc \
- "$crate" \
- -- \
- --no-default-features
|