Unverified Commit f1003d94 authored by Cecylia Bocovich's avatar Cecylia Bocovich 💬 Committed by boklm
Browse files

Bug 40852: Add wasm-bindgen project

parent 3b1b0d89
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -615,8 +615,11 @@ cargo_vendor-application-services: submodule-update
cargo_vendor-cbindgen: submodule-update
	$(rbm) build cbindgen --step cargo_vendor --target alpha --target torbrowser-linux-x86_64

cargo_vendor-wasm-bindgen: submodule-update
	$(rbm) build wasm-bindgen --step cargo_vendor --target alpha --target torbrowser-linux-x86_64

cargo_vendor-lox: submodule-update
	$(rbm) build lox-wasm --step cargo_vendor --target nightly --target torbrowser-linux-x86_64
	$(rbm) build lox-wasm --step cargo_vendor --target alpha --target torbrowser-linux-x86_64

go_vendor-snowflake-alpha: submodule-update
	$(rbm) build snowflake --step go_vendor --target alpha --target torbrowser-linux-x86_64
+44 −0
Original line number Diff line number Diff line
#!/bin/bash
[% c("var/set_default_env") -%]
distdir=/var/tmp/dist
builddir=/var/tmp/build/[% project %]
mkdir -p $distdir/[% project %]
tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/rust') %]
export PATH="/var/tmp/dist/rust/bin:$PATH"
[% IF c("var/linux") -%]
  export LD_LIBRARY_PATH="/var/tmp/dist/rust/lib:$LD_LIBRARY_PATH"
[% END -%]
mkdir -p /var/tmp/build
tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.[% c('compress_tar') %]

# Now prepare the offline build
# Move the directory for hardcoding the path in .cargo/config
mv /var/tmp/build/[% project %]-[% c('version') %] $builddir
tar -C $builddir -xf $rootdir/[% c('input_files_by_name/cargo_vendor') %]
cd $builddir
cat > .cargo/config << 'EOF'
[source.crates-io]
replace-with = "vendored-sources"

[source."git+https://github.com/alexcrichton/raytracer?branch=update-deps"]
git = "https://github.com/alexcrichton/raytracer"
branch = "update-deps"
replace-with = "vendored-sources"

[source."git+https://github.com/rustwasm/weedle.git"]
git = "https://github.com/rustwasm/weedle.git"
replace-with = "vendored-sources"

[source.vendored-sources]
directory = "/var/tmp/build/wasm-bindgen/vendor"
EOF

cargo build -p wasm-bindgen-cli --release --frozen --target x86_64-unknown-linux-gnu
cd $builddir
mv target/x86_64-unknown-linux-gnu/release/wasm-bindgen $distdir/[% project %]

cd $distdir
[% c('tar', {
        tar_src => [ project ],
        tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
    }) %]
+19 −0
Original line number Diff line number Diff line
# vim: filetype=yaml sw=2
version: 0.2.86
git_url: https://github.com/cohosh/wasm-bindgen
git_hash: ecc5ca153cda278bfcebc99c157fb4732eb75e6e
container:
  use_container: 1

steps:
  build:
    filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.[% c("compress_tar") %]'
    input_files:
      - project: container-image
      - project: rust
        name: rust
      - name: cargo_vendor
        project: wasm-bindgen
        pkg_type: cargo_vendor
        norec:
          sha256sum: 926e938cc4eebf2f5c99f34170fddc5aa7b12445fb379d768eb51aaae3b305a3