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
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,12 @@ ifndef REPOSITORY
endif
@$(eval FILE := $(@:publish-%=%))
@$(eval COMPONENT := $(if $(filter %.debug.wasm,$(FILE)),$(FILE:%.debug.wasm=%),$(FILE:%.wasm=%)))
@$(eval TITLE := $(if $(filter %.debug.wasm,$(FILE)),$(COMPONENT) (debug),$(COMPONENT)))
@$(eval TITLE := $(subst /,:,$(GITHUB_REPOSITORY))$(if $(filter interface,$(COMPONENT)),,-$(COMPONENT))$(if $(filter %.debug.wasm,$(FILE)), (debug)))
@$(eval DESCRIPTION := $(shell head -n 3 "lib/${FILE}.md" | tail -n 1))
@$(eval REVISION := $(shell git rev-parse HEAD)$(shell git diff --quiet HEAD && echo "+dirty"))
@$(eval COMMIT := $(shell git rev-parse HEAD))
@$(eval README_DIR := $(if $(wildcard components/$(COMPONENT)/README.md),/components/$(COMPONENT)))
@$(eval URL := https://github.com/${GITHUB_REPOSITORY}/tree/${COMMIT}${README_DIR})
@$(eval REVISION := ${COMMIT}$(shell git diff --quiet HEAD || echo "+dirty"))
@$(eval COMPONENT_VERSION := $(if $(filter %.debug.wasm,$(FILE)),${VERSION}+debug,${VERSION}))
@$(eval TAG := $(patsubst v%,%,$(subst +,_,$(COMPONENT_VERSION))))
@$(eval IMAGE := $(if $(filter interface.wasm,$(FILE)),${REPOSITORY}:${TAG},${REPOSITORY}/${COMPONENT}:${TAG}))
Expand All @@ -79,6 +82,7 @@ endif
--annotation "org.opencontainers.image.title=${TITLE}" \
--annotation "org.opencontainers.image.description=${DESCRIPTION}" \
--annotation "org.opencontainers.image.version=${COMPONENT_VERSION}" \
--annotation "org.opencontainers.image.url=${URL}" \
--annotation "org.opencontainers.image.source=https://github.com/${GITHUB_REPOSITORY}.git" \
--annotation "org.opencontainers.image.revision=${REVISION}" \
--annotation "org.opencontainers.image.licenses=Apache-2.0" \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ make components

### Components

- [`http-client`](./components/http-client/)
- [`client`](./components/client/)

## Community

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "http-client"
name = "client"
version = "0.1.0"
edition = "2024"
license = "Apache-2.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `http-client`
# `client`

A higher-level HTTP client that delegates to wasi:http/client.

Expand All @@ -17,7 +17,7 @@ A higher-level HTTP client that delegates to wasi:http/client.
- `trace(url, headers, options)`
- `query(url, headers, body, options)`

## The `http-client` World
## The `client` World

- exports `componentized:http/client`
- imports `wasi:http/client@0.3.1`
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use url::Url;

wit_bindgen::generate!({
path: "../wit",
world: "http-client",
world: "client",
generate_all,
});

Expand Down
2 changes: 1 addition & 1 deletion components/wit/worlds.wit
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package componentized:components;

world http-client {
world client {
import wasi:http/client@0.3.0;
export componentized:http/client@0.1.0-dev;
}
Loading