Skip to content

Commit

Permalink
Merge pull request #62 from rainlanguage/2025-01-11-rm-typeshare
Browse files Browse the repository at this point in the history
  • Loading branch information
hardyjosh authored Feb 21, 2025
2 parents 653c6bc + f6ef769 commit 4eb7080
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 79 deletions.
148 changes: 74 additions & 74 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ url = "2.5.0"
serde_json = "1.0.108"
async-trait = "0.1.77"
rain-erc = { git = "https://github.com/rainlanguage/rain.erc", rev = "0106e645ebd49334addc698c5aad9a85370eb54d" }
typeshare = { git = "https://github.com/tomjw64/typeshare", rev = "556b44aafd5304eedf17206800f69834e3820b7c" }

[workspace.dependencies.rain-metadata-bindings]
path = "crates/bindings"
Expand Down
4 changes: 3 additions & 1 deletion crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ thiserror = { workspace = true }
alloy-ethers-typecast = { workspace = true }
url = { workspace = true }
rain-erc = { workspace = true }
typeshare = { workspace = true }

# json-schema
schemars = { version = "0.8.12", optional = true }
Expand All @@ -47,6 +46,9 @@ tracing-subscriber = { version = "0.3.17", optional = true }
clap = { version = "4.4.8", features = ["cargo", "derive"], optional = true }
tokio = { version = "1.34.0", features = ["sync", "macros", "io-util", "rt", "time"], optional = true }

[target.'cfg(target_family = "wasm")'.dependencies]
wasm-bindgen-utils = "0.0"

[dev-dependencies]
httpmock = "0.7.0"

Expand Down
11 changes: 8 additions & 3 deletions crates/cli/src/meta/types/authoring/v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,25 @@ use crate::meta::{KnownMagic, RainMetaDocumentV1Item};
use rain_metadata_bindings::IDescribedByMetaV1;
use thiserror::Error;
use super::super::super::implements_i_described_by_meta_v1;
use typeshare::typeshare;
#[cfg(target_family = "wasm")]
use wasm_bindgen_utils::{prelude::*, impl_wasm_traits};

#[typeshare]
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
#[cfg_attr(target_family = "wasm", derive(Tsify))]
pub struct AuthoringMetaV2Word {
pub word: String,
pub description: String,
}
#[cfg(target_family = "wasm")]
impl_wasm_traits!(AuthoringMetaV2Word);

#[typeshare]
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
#[cfg_attr(target_family = "wasm", derive(Tsify))]
pub struct AuthoringMetaV2 {
pub words: Vec<AuthoringMetaV2Word>,
}
#[cfg(target_family = "wasm")]
impl_wasm_traits!(AuthoringMetaV2);

sol!(
struct AuthoringMetaV2Sol {
Expand Down

0 comments on commit 4eb7080

Please sign in to comment.