Skip to content

Commit fbf5974

Browse files
chore: remove unnececary stuff for a first experimental version
Signed-off-by: Henry <mail@henrygressmann.de>
1 parent 21bc72a commit fbf5974

7 files changed

Lines changed: 3 additions & 331 deletions

File tree

‎.github/workflows/release.yaml‎

Lines changed: 0 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -3,73 +3,7 @@ on:
33
push:
44
tags: ["v*"]
55

6-
permissions:
7-
contents: read
8-
96
jobs:
10-
artifacts:
11-
name: Build ${{ matrix.target }}
12-
runs-on: ${{ matrix.os }}
13-
strategy:
14-
fail-fast: false
15-
matrix:
16-
include:
17-
- os: ubuntu-22.04
18-
target: x86_64-unknown-linux-gnu
19-
shared-library: libtinywasm.so
20-
- os: ubuntu-22.04-arm
21-
target: aarch64-unknown-linux-gnu
22-
shared-library: libtinywasm.so
23-
- os: macos-15-intel
24-
target: x86_64-apple-darwin
25-
shared-library: libtinywasm.dylib
26-
- os: macos-15
27-
target: aarch64-apple-darwin
28-
shared-library: libtinywasm.dylib
29-
steps:
30-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
31-
with:
32-
persist-credentials: false
33-
- uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0
34-
with:
35-
toolchain: stable
36-
target: ${{ matrix.target }}
37-
rustflags: ""
38-
- name: Build CLI and C API
39-
env:
40-
TARGET: ${{ matrix.target }}
41-
run: |
42-
cargo build --locked --release --target "$TARGET" -p tinywasm-cli
43-
if [[ "$TARGET" == *-apple-darwin ]]; then
44-
cargo rustc --locked --release --target "$TARGET" -p tinywasm-c-api -- \
45-
-C link-arg=-Wl,-install_name,@rpath/libtinywasm.dylib
46-
else
47-
cargo build --locked --release --target "$TARGET" -p tinywasm-c-api
48-
fi
49-
- name: Package and smoke-test
50-
env:
51-
TARGET: ${{ matrix.target }}
52-
SHARED_LIBRARY: ${{ matrix.shared-library }}
53-
run: |
54-
name="tinywasm-${GITHUB_REF_NAME}-${TARGET}"
55-
package="$RUNNER_TEMP/$name"
56-
mkdir -p "$package/bin" "$package/lib" "$package/include" "$package/licenses" dist
57-
cp "target/$TARGET/release/tinywasm" "$package/bin/"
58-
cp "target/$TARGET/release/$SHARED_LIBRARY" "target/$TARGET/release/libtinywasm.a" "$package/lib/"
59-
cp crates/c-api/include/*.h "$package/include/"
60-
cp LICENSE-MIT LICENSE-APACHE crates/c-api/include/LICENSE-wasm-c-api "$package/licenses/"
61-
cp crates/c-api/README.md "$package/README.md"
62-
"$package/bin/tinywasm" --version
63-
cc -std=c11 -I"$package/include" crates/c-api/examples/add.c \
64-
-L"$package/lib" -Wl,-rpath,"$package/lib" -ltinywasm -o "$RUNNER_TEMP/c-api-example"
65-
"$RUNNER_TEMP/c-api-example"
66-
tar -czf "dist/$name.tar.gz" -C "$RUNNER_TEMP" "$name"
67-
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
68-
with:
69-
name: tinywasm-${{ matrix.target }}
70-
path: dist/*.tar.gz
71-
if-no-files-found: error
72-
737
publish:
748
runs-on: ubuntu-26.04
759
environment: release
@@ -85,28 +19,3 @@ jobs:
8519
- run: cargo publish --workspace
8620
env:
8721
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
88-
89-
release:
90-
name: Attach release archives
91-
needs: [publish, artifacts]
92-
runs-on: ubuntu-latest
93-
permissions:
94-
contents: write
95-
steps:
96-
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
97-
with:
98-
pattern: tinywasm-*
99-
merge-multiple: true
100-
path: dist
101-
- name: Create checksums and upload
102-
working-directory: dist
103-
env:
104-
GH_TOKEN: ${{ github.token }}
105-
GH_REPO: ${{ github.repository }}
106-
TAG: ${{ github.ref_name }}
107-
run: |
108-
sha256sum -- *.tar.gz > SHA256SUMS
109-
if ! gh release view "$TAG" > /dev/null 2>&1; then
110-
gh release create "$TAG" --verify-tag --generate-notes
111-
fi
112-
gh release upload "$TAG" ./*.tar.gz SHA256SUMS --clobber

‎.github/workflows/test.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
toolchain: nightly
2525
components: miri
2626
rustflags: ""
27+
build-warnings: warn
2728
- run: cargo miri test -p tinywasm-c-api --lib
2829
- run: make -C crates/c-api test
2930
- run: make -C crates/c-api test TINYWASM_C_API_PREFIX=test_ TARGET_DIR=../../target/c-api-prefixed

‎README.md‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,6 @@ assert_eq!(result, 3);
4343

4444
See the [examples](./examples) directory and [documentation](https://docs.rs/tinywasm) for more information.
4545

46-
### C and C++
47-
48-
The experimental [`tinywasm-c-api` crate](./crates/c-api) provides `wasm.h`,
49-
TinyWasm extensions in `tinywasm.h`, and static and shared libraries. Build the
50-
libraries with:
51-
52-
```sh
53-
make -C crates/c-api
54-
```
55-
56-
See its [README](./crates/c-api/README.md) for installation and usage.
57-
5846
## Cargo Features
5947

6048
- **`full`:** Enables `archive`, `debug`, `parallel-parser`, `parser`, `state`, and `validate`. Enabled by default.

‎crates/c-api/Makefile‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,10 @@ test: example
4242
"$(BUILDDIR)/add-static"
4343
$(CC) $(CPPFLAGS) $(CFLAGS) -std=c11 -Iinclude tests/api.c "$(BUILD_LIBDIR)/libtinywasm.a" $(NATIVE_LIBS) $(LDFLAGS) -o "$(BUILDDIR)/api-static"
4444
"$(BUILDDIR)/api-static" "$(BUILDDIR)"
45-
python3 tests/symbols.py "$(BUILD_LIBDIR)/libtinywasm.$(SHARED_EXT)" "$(CC)" "$(TINYWASM_C_API_PREFIX)"
4645

4746
install: build
4847
install -d "$(DESTDIR)$(PREFIX)/include" "$(DESTDIR)$(LIBDIR)/pkgconfig" "$(DESTDIR)$(PREFIX)/share/licenses/tinywasm"
4948
install -m644 include/wasm.h include/tinywasm.h include/tinywasm-prefix.h "$(DESTDIR)$(PREFIX)/include/"
5049
install -m644 "$(BUILD_LIBDIR)/libtinywasm.a" "$(BUILD_LIBDIR)/libtinywasm.$(SHARED_EXT)" "$(DESTDIR)$(LIBDIR)/"
51-
install -m644 include/LICENSE-wasm-c-api ../../LICENSE-APACHE ../../LICENSE-MIT "$(DESTDIR)$(PREFIX)/share/licenses/tinywasm/"
50+
install -m644 ../../LICENSE-APACHE ../../LICENSE-MIT "$(DESTDIR)$(PREFIX)/share/licenses/tinywasm/"
5251
sed -e 's|@PREFIX@|$(PREFIX)|g' -e 's|@LIBDIR@|$(LIBDIR)|g' -e 's|@VERSION@|$(VERSION)|g' -e 's|@NATIVE_LIBS@|$(NATIVE_LIBS)|g' -e 's|@PREFIX_FLAG@|$(if $(TINYWASM_C_API_PREFIX),-DTINYWASM_C_API_PREFIX=$(TINYWASM_C_API_PREFIX))|g' tinywasm.pc.in > "$(DESTDIR)$(LIBDIR)/pkgconfig/tinywasm.pc"

‎crates/c-api/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ When building with Cargo directly, enable `custom-prefix` and set the
4949
5050
`wasm.h` is vendored from WebAssembly/wasm-c-api commit
5151
`9d6b93764ac96cdd9db51081c363e09d2d488b4d`, under
52-
[`include/LICENSE-wasm-c-api`](include/LICENSE-wasm-c-api).
52+
[Apache 2.0](../../LICENSE-APACHE).

‎crates/c-api/include/LICENSE-wasm-c-api‎

Lines changed: 0 additions & 202 deletions
This file was deleted.

‎crates/c-api/tests/symbols.py‎

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)