Skip to content
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# generated files
.edgee/
internal/

# output
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ help:
| awk 'BEGIN { FS = ":.*?## " }; { printf "\033[36m%-30s\033[0m %s\n", $$1, $$2 }'
internal:
mkdir -p internal
cd internal && wit-bindgen c ../wit && cd ..
( 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 -o /dev/stdout -mexec-model=reactor -Os | wasm-tools component new -o dc_component.wasm
$(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
Expand Down
5 changes: 3 additions & 2 deletions edgee-component.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ subcategory = "analytics"
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"
wit-world-version = "0.5.0"
language = "C"
wit-version = "0.5.0"

[component.build]
command = "$(CC) dc_component.c internal/data_collection.c internal/data_collection_component_type.o -o /dev/stdout -mexec-model=reactor -Os | wasm-tools component new -o dc_component.wasm"
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"
output_path = "./dc_component.wasm"

[component.settings.example]
Expand Down
4 changes: 0 additions & 4 deletions wit/deps.lock

This file was deleted.

1 change: 0 additions & 1 deletion wit/deps.toml

This file was deleted.

13 changes: 0 additions & 13 deletions wit/deps/edgee/consent-mapping.wit

This file was deleted.

114 changes: 0 additions & 114 deletions wit/deps/edgee/data-collection.wit

This file was deleted.

5 changes: 0 additions & 5 deletions wit/world.wit

This file was deleted.

Loading