File: vendor-c-api-headers.sh

package info (click to toggle)
rust-wasmtime 28.0.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 54,116 kB
  • sloc: ansic: 4,071; sh: 567; javascript: 548; cpp: 280; asm: 175; ml: 96; makefile: 55
file content (23 lines) | stat: -rwxr-xr-x 633 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

# Script to re-vendor the headers from the `wasm-c-api` proposal.

rev="2ce1367c9d1271c83fb63bef26d896a2f290cd23"
files="wasm.h wasm.hh"

set -ex

for file in $files; do
  dst=crates/c-api/include/$file
  pretty_url=https://github.com/WebAssembly/wasm-c-api/blob/$rev/include/$file
  url=https://raw.githubusercontent.com/WebAssembly/wasm-c-api/$rev/include/$file
  cat >$dst <<-EOF
// Wasmtime-vendored copy of this header file as present in upstream:
// <$pretty_url>
//
// Wasmtime maintainers can update this vendored copy in-tree with the
// ./ci/vendor-c-api-headers.sh shell script.
//
EOF
  curl $url >> $dst
done