Skip to content

Commit

Permalink
Merge pull request #263 from cryptoquick/HB/2021
Browse files Browse the repository at this point in the history
Update to Rust Edition 2021
  • Loading branch information
JeremyRubin committed Jan 4, 2024
2 parents baadc7a + 74d7ccf commit 9fcc1e9
Show file tree
Hide file tree
Showing 35 changed files with 87 additions and 129 deletions.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ members = ["sapio"
, "tools"
, "plugins"
, 'emulator-trait'
, 'examples/dcf_mining_pool'
, 'examples/*'
, 'sapio-trait'
, 'sapio_macros'
, 'sapio-psbt'
, 'simp-pack']
exclude = ["plugin-example", "integration_tests"]
resolver = "2"
4 changes: 2 additions & 2 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "sapio-cli"
version = "0.2.0"
license = "MPL-2.0"
authors = ["Jeremy Rubin <j@rubin.io>"]
edition = "2018"
edition = "2021"
repository = "https://github.com/sapio-lang/sapio"
homepage = "https://sapio-lang.org"
description = "A Command Line Interface for interacting with Sapio Contracts"
Expand All @@ -21,7 +21,7 @@ lazy_static = "1.4.0"
bitcoincore-rpc-async = "4.0.1-alpha.1"
tokio = { version = "1", features = ["full"] }
directories = "3.0.1"
rand="^0.6"
rand = "^0.6"
jsonschema-valid = "0.4.0"

[dependencies.sapio-psbt]
Expand Down
8 changes: 3 additions & 5 deletions ctv_emulators/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "ctv_emulators"
version = "0.2.0"
license = "MPL-2.0"
authors = ["Jeremy Rubin <j@rubin.io>"]
edition = "2018"
edition = "2021"
repository = "https://github.com/sapio-lang/sapio"
homepage = "https://sapio-lang.org"
description = "Implementation of the CTV Emulator Trait"
Expand All @@ -19,7 +19,7 @@ rand = "0.8.1"


[dependencies.sapio-ctv-emulator-trait]
path="../emulator-trait"
path = "../emulator-trait"
version = "0.2.0"

[dependencies.bitcoin]
Expand All @@ -33,12 +33,10 @@ version = "^7.0.0"
features = ['compiler', 'use-serde', 'rand', 'use-schemars', 'serde']

[dependencies.sapio-base]
path="../sapio-base"
path = "../sapio-base"
version = "0.2.0"




[lib]
name = "emulator_connect"
path = "src/lib.rs"
Expand Down
2 changes: 1 addition & 1 deletion docs/learn-sapio/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ src = "src"
title = "Designing Bitcoin Contracts with Sapio"

[rust]
edition=2018
edition = "2021"

[output.html]
mathjax-support = true
Expand Down
5 changes: 2 additions & 3 deletions emulator-trait/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "sapio-ctv-emulator-trait"
version = "0.2.0"
license = "MPL-2.0"
authors = ["Jeremy Rubin <j@rubin.io>"]
edition = "2018"
edition = "2021"
repository = "https://github.com/sapio-lang/sapio"
homepage = "https://sapio-lang.org"
description = "Emulator Trait for mocking out CTV with other logic, trait separate to avoid pulling in tokio to compiler"
Expand All @@ -28,6 +28,5 @@ version = "^7.0.0"
features = ['compiler', 'use-serde', 'use-schemars', 'serde']

[dependencies.sapio-base]
path="../sapio-base"
path = "../sapio-base"
version = "0.2.0"

3 changes: 3 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Sapio Server Examples

To run server examples, use `cargo run --package`; e.g. `cargo run --package dcf_mining_pool`
7 changes: 3 additions & 4 deletions examples/dcf_mining_pool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
name = "dcf_mining_pool"
version = "0.2.0"
authors = ["Jeremy Rubin <j@rubin.io>"]
edition = "2018"
edition = "2021"
publish = false

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand All @@ -29,14 +30,12 @@ path = "../../sapio-base"
version = "0.2.0"



[dependencies.sapio-ctv-emulator-trait]
path="../../emulator-trait"
path = "../../emulator-trait"
version = "0.2.0"

[dependencies.miniscript]
package = "sapio-miniscript"
version = "^7.0.0"
features = ['compiler', 'use-serde', 'rand', 'use-schemars', 'serde']
optional = true

7 changes: 3 additions & 4 deletions integration_tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "sapio_integration_tests"
version = "0.2.0"
authors = ["Jeremy Rubin <j@rubin.io>"]
edition = "2018"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand All @@ -25,7 +25,7 @@ path = "../sapio"
path = "../ctv_emulators"

[dependencies.sapio-ctv-emulator-trait]
path="../emulator-trait"
path = "../emulator-trait"
version = "0.2.0"

[dependencies.bitcoin]
Expand All @@ -39,6 +39,5 @@ version = "^7.0.0"
features = ['compiler', 'use-serde', 'rand', 'use-schemars', 'serde']

[dependencies.sapio-base]
path="../sapio-base"
path = "../sapio-base"
version = "0.2.0"

7 changes: 7 additions & 0 deletions plugin-example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Sapio Plugin Examples

To run plugin examples, you must first have zig and wasm-pack installed.

Then run: `CC="zig cc" wasm-pack build`

For more, see the docs: https://learn.sapio-lang.org/ch01-01-installation.html#local-quickstart
8 changes: 4 additions & 4 deletions plugin-example/batching-trait/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "batching-trait"
version = "0.1.0"
edition = "2018"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand All @@ -28,11 +28,11 @@ version = "0.2.0"


[dependencies.sapio-trait]
path="../../sapio-trait"
path = "../../sapio-trait"
version = "0.2.0"

[dependencies.sapio-ctv-emulator-trait]
path="../../emulator-trait"
path = "../../emulator-trait"
version = "0.2.0"

[dependencies.miniscript]
Expand All @@ -45,4 +45,4 @@ optional = true
[dependencies.sapio-wasm-plugin]
path = "../../plugins"
version = "0.2.0"
features = ["client"]
features = ["client"]
8 changes: 3 additions & 5 deletions plugin-example/clause-module-trampoline/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ name = "sapio-wasm-clause-trampoline"
version = "0.1.0"
license = "MPL-2.0"
authors = ["Jeremy Rubin <j@rubin.io>"]
edition = "2018"
edition = "2021"
repository = "https://github.com/sapio-lang/sapio"
homepage = "https://sapio-lang.org"
description = "An Example Sapio Application"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html



[dependencies]
serde_json = "1.0"
serde = "1.0"
Expand Down Expand Up @@ -44,9 +43,8 @@ crate-type = ["cdylib", "rlib"]
path = "src/plugin.rs"



[dependencies.sapio-ctv-emulator-trait]
path="../../emulator-trait"
path = "../../emulator-trait"
version = "0.2.0"

[dependencies.miniscript]
Expand All @@ -65,5 +63,5 @@ features = ["client"]


[dependencies.sapio-trait]
path="../../sapio-trait"
path = "../../sapio-trait"
version = "0.2.0"
7 changes: 2 additions & 5 deletions plugin-example/clause-module/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ name = "sapio-wasm-clause"
version = "0.1.0"
license = "MPL-2.0"
authors = ["Jeremy Rubin <j@rubin.io>"]
edition = "2018"
edition = "2021"
repository = "https://github.com/sapio-lang/sapio"
homepage = "https://sapio-lang.org"
description = "An Example Sapio Application"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html



[dependencies]
serde_json = "1.0"
serde = "1.0"
Expand Down Expand Up @@ -44,9 +43,8 @@ crate-type = ["cdylib", "rlib"]
path = "src/plugin.rs"



[dependencies.sapio-ctv-emulator-trait]
path="../../emulator-trait"
path = "../../emulator-trait"
version = "0.2.0"

[dependencies.miniscript]
Expand All @@ -62,4 +60,3 @@ wasm-opt = false
path = "../../plugins"
version = "0.2.0"
features = ["client"]

7 changes: 2 additions & 5 deletions plugin-example/coin_pool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ name = "sapio-wasm-coin-pool"
version = "0.1.0"
license = "MPL-2.0"
authors = ["Jeremy Rubin <j@rubin.io>"]
edition = "2018"
edition = "2021"
repository = "https://github.com/sapio-lang/sapio"
homepage = "https://sapio-lang.org"
description = "An Example Sapio Application"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html



[dependencies]
serde_json = "1.0"
serde = "1.0"
Expand Down Expand Up @@ -44,9 +43,8 @@ crate-type = ["cdylib", "rlib"]
path = "src/plugin.rs"



[dependencies.sapio-ctv-emulator-trait]
path="../../emulator-trait"
path = "../../emulator-trait"
version = "0.2.0"

[dependencies.miniscript]
Expand All @@ -62,4 +60,3 @@ wasm-opt = false
path = "../../plugins"
version = "0.2.0"
features = ["client"]

6 changes: 2 additions & 4 deletions plugin-example/dao/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ name = "sapio-wasm-dao"
version = "0.1.0"
license = "MPL-2.0"
authors = ["Jeremy Rubin <j@rubin.io>"]
edition = "2018"
edition = "2021"
repository = "https://github.com/sapio-lang/sapio"
homepage = "https://sapio-lang.org"
description = "An Example Sapio Application"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html



[dependencies]
serde_json = "1.0"
serde = "1.0"
Expand Down Expand Up @@ -44,9 +43,8 @@ crate-type = ["cdylib", "rlib"]
path = "src/dao.rs"



[dependencies.sapio-ctv-emulator-trait]
path="../../emulator-trait"
path = "../../emulator-trait"
version = "0.2.0"

[dependencies.miniscript]
Expand Down
7 changes: 2 additions & 5 deletions plugin-example/fedpeg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ name = "sapio-wasm-fedpeg"
version = "0.1.0"
license = "MPL-2.0"
authors = ["Jeremy Rubin <j@rubin.io>"]
edition = "2018"
edition = "2021"
repository = "https://github.com/sapio-lang/sapio"
homepage = "https://sapio-lang.org"
description = "An Example Sapio Application"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html



[dependencies]
serde_json = "1.0"
serde = "1.0"
Expand Down Expand Up @@ -44,9 +43,8 @@ crate-type = ["cdylib", "rlib"]
path = "src/plugin.rs"



[dependencies.sapio-ctv-emulator-trait]
path="../../emulator-trait"
path = "../../emulator-trait"
version = "0.2.0"

[dependencies.miniscript]
Expand All @@ -62,4 +60,3 @@ wasm-opt = false
path = "../../plugins"
version = "0.2.0"
features = ["client"]

9 changes: 3 additions & 6 deletions plugin-example/hanukkiah/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ name = "sapio-wasm-hanukkiah"
version = "0.1.0"
license = "MPL-2.0"
authors = ["Jeremy Rubin <j@rubin.io>"]
edition = "2018"
edition = "2021"
repository = "https://github.com/sapio-lang/sapio"
homepage = "https://sapio-lang.org"
description = "An Example Sapio Application"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html



[dependencies]
serde_json = "1.0"
serde = "1.0"
Expand Down Expand Up @@ -43,15 +42,14 @@ crate-type = ["cdylib", "rlib"]
path = "src/plugin.rs"



[dependencies.sapio-ctv-emulator-trait]
path="../../emulator-trait"
path = "../../emulator-trait"
version = "0.2.0"

[dependencies.miniscript]
package = "sapio-miniscript"
version = "^7.0.0"
features = ['compiler', 'use-serde', 'use-schemars', 'serde']
features = ['compiler', 'use-serde', 'use-schemars', 'serde']
optional = true

[package.metadata.wasm-pack.profile.release]
Expand All @@ -61,4 +59,3 @@ wasm-opt = false
path = "../../plugins"
version = "0.2.0"
features = ["client"]

0 comments on commit 9fcc1e9

Please sign in to comment.