Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use wit version 1.0.0 #12

Merged
merged 2 commits into from
Mar 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,11 @@ jobs:
- name: Install wasm tooling
run: CC=clang cargo install wit-bindgen-cli wasm-tools --locked

- name: Generate code
run: make setup

#- name: Install edgee
# uses: edgee-cloud/[email protected]
# with:
# build: true
#- name: Build component
# run: edgee components build
- name: Install edgee
uses: edgee-cloud/[email protected]

- name: Build component
run: make build-no-edgee
run: edgee components build

- name: Verify .wasm file exists
run: |
Expand Down
9 changes: 0 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,9 @@ help:
| sort \
| sed -e "s/^Makefile://" -e "s///" \
| awk 'BEGIN { FS = ":.*?## " }; { printf "\033[36m%-30s\033[0m %s\n", $$1, $$2 }'
internal:
mkdir -p internal
( cd internal && wit-bindgen c ../.edgee/wit )
setup: internal ## setup development environment

build:
edgee components build

build-no-edgee: setup ## build component
$(CC) dc_component.c internal/data_collection.c internal/data_collection_component_type.o -mexec-model=reactor -Os
wasm-tools component new -o dc_component.wasm a.out

clean: ## clean build artifacts
rm -rf dc_component.wasm
rm -rf dc_component_temp.wasm
Expand Down
4 changes: 2 additions & 2 deletions edgee-component.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ description = "Example C component for data collection"
documentation = "https://github.com/edgee-cloud/example-c-component"
repository = "https://github.com/edgee-cloud/example-c-component"
language = "C"
wit-version = "0.5.0"
wit-version = "1.0.0"

[component.build]
command = "$CC dc_component.c internal/data_collection.c internal/data_collection_component_type.o -mexec-model=reactor -Os && wasm-tools component new -o dc_component.wasm a.out"
command = "mkdir -p internal && (cd internal && wit-bindgen c ../.edgee/wit && cd ..) && $CC dc_component.c internal/data_collection.c internal/data_collection_component_type.o -mexec-model=reactor -Os && wasm-tools component new -o dc_component.wasm a.out"
output_path = "./dc_component.wasm"

[component.settings.example]
Expand Down