Skip to content
Draft
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 Cargo.lock

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

4 changes: 4 additions & 0 deletions shopify_function/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ license = "MIT"
description = "Crate to write Shopify Functions in Rust."

[dependencies]
serde = "1.0"
serde_json = "1.0"
shopify_function_macro.workspace = true
shopify_function_wasm_api = "0.3.1"

[dev-dependencies]
serde = { version = "1.0", features = ["derive"] }

# Use the `small` feature of ryu (transitive dependency through serde_json)
# to shave off ~9kb of the Wasm binary size.
[dependencies.ryu]
Expand Down
4 changes: 4 additions & 0 deletions shopify_function/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@
//! /* ... */
//! }
//! ```
//!
//! For types that are easier to express with [`serde`], such as simple enums, add
//! `#[shopify_function(serde)]` to the type. See the [`serde_adapter`] module for more details.

#[cfg(all(target_arch = "wasm32", target_os = "wasi", target_env = "p1"))]
compile_error!("Compiling to wasm32-wasip1 is unsupported, change your target to wasm32-unknown-unknown instead");

pub use shopify_function_macro::{shopify_function, typegen, Deserialize};

pub mod scalars;
pub mod serde_adapter;

pub mod prelude {
#[allow(deprecated)]
Expand Down
Loading
Loading