"make build-c" fails to build sample apps
squillace opened this issue · 3 comments
Description of the bug
make build-c
make -C examples/multi_capability-demo-clang/ clean
make[1]: Entering directory '/home/squillace/work/squillace/spiderlightning/examples/multi_capability-demo-clang'
rm -rf bindings/
mkdir bindings/
make[1]: Leaving directory '/home/squillace/work/squillace/spiderlightning/examples/multi_capability-demo-clang'
make -C examples/multi_capability-demo-clang/ bindings
make[1]: Entering directory '/home/squillace/work/squillace/spiderlightning/examples/multi_capability-demo-clang'
wit-bindgen c --import ../../wit/keyvalue.wit --out-dir bindings/
Error: expected an identifier or string, found '('
--> ../../wit/keyvalue.wit:4:19
|
4 | static open: func(name: string) -> expected<keyvalue, keyvalue-error>
| ^
make[1]: *** [Makefile:21: bindings] Error 1
make[1]: Leaving directory '/home/squillace/work/squillace/spiderlightning/examples/multi_capability-demo-clang'
make: *** [Makefile:158: build-c] Error 2
To Reproduce
make build-c
Additional context
Thanks for rasing this issue @squillace . make build-c
is actually not ran by the CI/CD so its currently broken. I will take "adding make build-c
to CI" as a follow up
But to just fix the issue you ran into - please make sure that you have wit-bindgen tag v0.2.0
installed instead of the latest wit-bindgen
cargo install --git https://github.com/bytecodealliance/wit-bindgen \
wit-bindgen-cli --tag v0.2.0
Maybe that should go the docs somewhere? Took me a bit to figure out the right incantation.