14 breaking releases

0.15.0 Nov 8, 2024
0.13.0 Oct 23, 2024
0.8.0 Jul 31, 2024
0.4.0 Mar 29, 2024
0.2.0 Nov 21, 2023

#1378 in WebAssembly

Download history 4132/week @ 2024-09-24 4737/week @ 2024-10-01 5601/week @ 2024-10-08 5684/week @ 2024-10-15 10989/week @ 2024-10-22 8272/week @ 2024-10-29 5768/week @ 2024-11-05 3626/week @ 2024-11-12 9604/week @ 2024-11-19 6691/week @ 2024-11-26 6612/week @ 2024-12-03 5527/week @ 2024-12-10 4849/week @ 2024-12-17 2122/week @ 2024-12-24 1855/week @ 2024-12-31 2459/week @ 2025-01-07

12,412 downloads per month
Used in 10 crates (8 directly)

Apache-2.0

1.5MB
3.5K SLoC

wasmcloud-core

This repository contains the core data types, traits and reusable functionality to enable the wasmCloud ecosystem.

This crate provides:

  • Utilities for dealing with WIT types
  • Types used across wasmCloud Hosts
  • Types used in linking on wasmCloud lattices
  • Logging types
  • Utilities for interacting with NATS
  • ... and more

This crate is meant to be used by programs, utilities and infrastructure targeting the wasmCloud platform.

Installation

To use wasmcloud-core in your project, you can add it via cargo add:

cargo add wasmcloud-core

Or include the following in your Cargo.toml:

wasmcloud-core = "0.7.0"

Features

wasmcloud-core comes with the following features:

Feature Default? Description
hyper-rustls yes Enable hyper-rustls usage (see tls module)
oci yes Enable oci-client and oci-wasm usage (see tls module)
reqwest yes Enable [reqwest][request] extensions (see tls module)
rustls-native-certs yes Enable rustls-native-certs (see tls module)
webpki-roots yes Enable webpki-roots (see tls module)
otel no Enable OpenTelemetry module support

Using wasmcloud-core

wasmcloud-core does not provide a prelude, but instead exports types as needed under appropriate modules.

Import the needed types and traits as necessary from your project similarly to the following:

use wasmcloud_core::nats::convert_header_map_to_hashmap;
use wasmcloud_core::rpc::{health_subject, link_del_subject, link_put_subject, shutdown_subject};
use wasmcloud_core::{
    HealthCheckRequest, HealthCheckResponse, HostData, InterfaceLinkDefinition, LatticeTarget,
};

Contributing

Have a change that belongs be in wasmcloud-core? Please feel free to file an issue and/or join us on the wasmCloud slack!

Dependencies

~29–45MB
~802K SLoC