Skip to content

Commit 2e4e643

Browse files
committed
implement procedural derive macro for IsPlutusData
1 parent 9274576 commit 2e4e643

File tree

7 files changed

+819
-0
lines changed

7 files changed

+819
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ result
22
.direnv
33
.pre-commit-config.yaml
44
.DS_Store
5+
target

flake.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
./hercules-ci.nix
2424

2525
./plutus-ledger-api/build.nix
26+
./is-plutus-data-derive/build.nix
2627
];
2728
debug = true;
2829
systems = [ "x86_64-linux" "x86_64-darwin" ];

is-plutus-data-derive/Cargo.lock

Lines changed: 68 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

is-plutus-data-derive/Cargo.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[package]
2+
name = "plutus-data-derive"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[dependencies]
7+
proc-macro2 = "1.0.87"
8+
quote = "1.0.37"
9+
syn = { version = "2.0.79", features = ["full", "extra-traits"]}
10+
thiserror = "1.0.64"
11+
12+
[lib]
13+
proc-macro = true

is-plutus-data-derive/build.nix

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{ inputs, ... }: {
2+
perSystem = { config, system, ... }:
3+
let
4+
rustFlake =
5+
inputs.flake-lang.lib.${system}.rustFlake {
6+
src = ./.;
7+
version = "0";
8+
crateName = "is-plutus-data-derive";
9+
devShellHook = config.settings.shell.hook;
10+
cargoNextestExtraArgs = "--all-features";
11+
};
12+
13+
in
14+
{
15+
inherit (rustFlake) packages checks devShells;
16+
};
17+
}

0 commit comments

Comments
 (0)