mirror of
https://github.com/fluencelabs/interface-types
synced 2024-12-04 07:10:21 +00:00
add VariantCount for IType and Value (#12)
This commit is contained in:
parent
138bbaf8bd
commit
f0c93d9423
13
Cargo.lock
generated
13
Cargo.lock
generated
@ -28,11 +28,12 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
|
||||
|
||||
[[package]]
|
||||
name = "fluence-it-types"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
dependencies = [
|
||||
"it-to-bytes",
|
||||
"nom",
|
||||
"serde",
|
||||
"variant_count",
|
||||
"wast",
|
||||
]
|
||||
|
||||
@ -253,6 +254,16 @@ version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564"
|
||||
|
||||
[[package]]
|
||||
name = "variant_count"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aae2faf80ac463422992abf4de234731279c058aaf33171ca70277c98406b124"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "version_check"
|
||||
version = "0.9.3"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "fluence-it-types"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
description = "Definitions of IValue and IType"
|
||||
authors = ["Fluence Labs"]
|
||||
edition = "2018"
|
||||
@ -18,5 +18,7 @@ serde = { version = "1.0.118", features = ["derive", "rc"]}
|
||||
nom = { version = "5.1", optional = true }
|
||||
wast = { version = "8.0", optional = true }
|
||||
|
||||
variant_count = "1.1"
|
||||
|
||||
[features]
|
||||
impls = ["nom", "wast"]
|
||||
|
@ -4,9 +4,9 @@ use crate::ne_vec::NEVec;
|
||||
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use variant_count::VariantCount;
|
||||
/// Represents the types supported by WIT.
|
||||
#[derive(PartialEq, Eq, Debug, Clone, Hash, Serialize, Deserialize)]
|
||||
#[derive(PartialEq, Eq, Debug, Clone, Hash, Serialize, Deserialize, VariantCount)]
|
||||
pub enum IType {
|
||||
/// Boolean.
|
||||
Boolean,
|
||||
|
@ -2,8 +2,10 @@
|
||||
|
||||
use crate::ne_vec::NEVec;
|
||||
|
||||
use variant_count::VariantCount;
|
||||
|
||||
/// A WIT value.
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq, VariantCount)]
|
||||
pub enum IValue {
|
||||
/// Boolean value.
|
||||
Boolean(bool),
|
||||
|
@ -8,7 +8,7 @@ repository = "https://github.com/wasmerio/wasmer"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
fluence-it-types = { path = "../crates/it-types", version = "0.3.0", features = ["impls"] }
|
||||
fluence-it-types = { path = "../crates/it-types", version = "0.3.1", features = ["impls"] }
|
||||
it-to-bytes = { path = "../crates/to-bytes", version = "0.1.0" }
|
||||
it-lilo = { path = "../crates/it-lilo", version = "0.1.0" }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user