Skip to content

Commit

Permalink
implement procedural derive macro for IsPlutusData
Browse files Browse the repository at this point in the history
  • Loading branch information
chfanghr committed Oct 14, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 9274576 commit dddfbb6
Showing 7 changed files with 819 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -2,3 +2,4 @@ result
.direnv
.pre-commit-config.yaml
.DS_Store
target
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -23,6 +23,7 @@
./hercules-ci.nix

./plutus-ledger-api/build.nix
./is-plutus-data-derive/build.nix
];
debug = true;
systems = [ "x86_64-linux" "x86_64-darwin" ];
68 changes: 68 additions & 0 deletions is-plutus-data-derive/Cargo.lock

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

13 changes: 13 additions & 0 deletions is-plutus-data-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "plutus-data-derive"
version = "0.1.0"
edition = "2021"

[dependencies]
proc-macro2 = "1.0.87"
quote = "1.0.37"
syn = { version = "2.0.79", features = ["full", "extra-traits"]}
thiserror = "1.0.64"

[lib]
proc-macro = true
17 changes: 17 additions & 0 deletions is-plutus-data-derive/build.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{ inputs, ... }: {
perSystem = { config, system, ... }:
let
rustFlake =
inputs.flake-lang.lib.${system}.rustFlake {
src = ./.;
version = "0";
crateName = "is-plutus-data-derive";
devShellHook = config.settings.shell.hook;
cargoNextestExtraArgs = "--all-features";
};

in
{
inherit (rustFlake) packages checks devShells;
};
}
Loading

0 comments on commit dddfbb6

Please sign in to comment.