Skip to content

Commit d6ed6a2

Browse files
committed
Initial commit
libunit-wasm and example C and Rust WebAssembly modules for NGINX Unit. Co-developed-by: Timo Stark <[email protected]> Co-developed-by: Liam Crilly <[email protected]> Signed-off-by: Andrew Clayton <[email protected]>
0 parents  commit d6ed6a2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+4307
-0
lines changed

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.c diff=cpp
2+
*.h diff=cpp

.github/workflows/build_tests.yaml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Builds
2+
3+
on:
4+
push:
5+
branches: preview
6+
paths:
7+
- Makefile
8+
- 'examples/**'
9+
- 'src/**'
10+
- '.github/workflows/build_tests.yaml'
11+
pull_request:
12+
branches: preview
13+
paths:
14+
- Makefile
15+
- 'examples/**'
16+
- 'src/**'
17+
- '.github/workflows/build_tests.yaml'
18+
19+
jobs:
20+
# GitHub Currently only supports running directly on Ubuntu,
21+
# for any other Linux we need to use a container.
22+
23+
fedora-rawhide:
24+
runs-on: ubuntu-latest
25+
26+
container:
27+
image: fedora:rawhide
28+
29+
steps:
30+
- name: Install tools/deps
31+
run: |
32+
dnf -y install git wget clang llvm compiler-rt lld make bindgen-cli cargo rust rust-std-static-wasm32-unknown-unknown rust-std-static-wasm32-wasi
33+
wget -O- https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-20/libclang_rt.builtins-wasm32-wasi-20.0.tar.gz | tar --strip-components=1 -xvzf - -C $(dirname $(rpm -ql compiler-rt | grep lib/libclang_rt.builtins-x86_64.a))
34+
wget -O- https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-20/wasi-sysroot-20.0.tar.gz | tar -xvzf - -C ${RUNNER_TEMP}
35+
36+
- uses: actions/checkout@v3
37+
with:
38+
fetch-depth: "0"
39+
40+
- name: make
41+
run: make WASI_SYSROOT=${RUNNER_TEMP}/wasi-sysroot V=1 E=1 all
+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: check-whitespace
2+
3+
# Get the repo with the commits(+1) in the series.
4+
# Process `git log --check` output to extract just the check errors.
5+
# Add a comment to the pull request with the check errors.
6+
7+
on:
8+
pull_request:
9+
types: [ opened, synchronize ]
10+
11+
jobs:
12+
check-whitespace:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
with:
17+
fetch-depth: 0
18+
19+
- name: git log --check
20+
id: check_out
21+
run: |
22+
log=
23+
commit=
24+
while read dash etc
25+
do
26+
case "${dash}" in
27+
"---")
28+
commit="${etc}"
29+
;;
30+
"")
31+
;;
32+
*)
33+
if test -n "${commit}"
34+
then
35+
log="${log}\n${commit}"
36+
echo ""
37+
echo "--- ${commit}"
38+
fi
39+
commit=
40+
log="${log}\n${dash} ${etc}"
41+
echo "${dash} ${etc}"
42+
;;
43+
esac
44+
done <<< $(git log --check --pretty=format:"--- %h %s" ${{github.event.pull_request.base.sha}}..)
45+
46+
if test -n "${log}"
47+
then
48+
exit 2
49+
fi

.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*.swp
2+
*~
3+
4+
*.o
5+
*.gch
6+
7+
tags

.rustfmt.toml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
max_width = 80
2+
#binop_separator = "Back"

0 commit comments

Comments
 (0)