-
Notifications
You must be signed in to change notification settings - Fork 64
Add template code for multi-class discounts in rust #588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c3da6f0
1e55047
199c691
d246160
a258837
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| /target | ||
| Cargo.lock |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| [package] | ||
| name = "{{handle | replace: " ", "-" | downcase}}" | ||
| version = "1.0.0" | ||
| edition = "2021" | ||
| rust-version = "1.84" | ||
|
|
||
| [dependencies] | ||
| serde = { version = "1.0.13", features = ["derive"] } | ||
| serde_json = "1.0" | ||
| shopify_function = "0.8.1" | ||
| graphql_client = "0.14.0" | ||
|
|
||
| [profile.release] | ||
| lto = true | ||
| opt-level = 'z' | ||
| strip = true | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # Shopify Function development with Rust | ||
|
|
||
| ## Dependencies | ||
|
|
||
| - [Install Rust](https://www.rust-lang.org/tools/install) | ||
| - On Windows, Rust requires the [Microsoft C++ Build Tools](https://docs.microsoft.com/en-us/windows/dev-environment/rust/setup). Be sure to select the _Desktop development with C++_ workload when installing them. | ||
|
|
||
| ## Building the function | ||
|
|
||
| You can build this individual function using `cargo build`. | ||
|
|
||
| ```shell | ||
| cargo build --target=wasm32-wasip1 --release | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wasn't this target added with the newer Rust version? Seems this could also be a reason to bump the Rust version.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That is true, however this target has been available before this release, it just became the new default with 1.84 |
||
| ``` | ||
|
|
||
| The Shopify CLI `build` command will also execute this, based on the configuration in `shopify.extension.toml`. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "name": "{{name}}", | ||
| "description": "{{name}}" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be "2025"?