Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
38 changes: 19 additions & 19 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,17 @@ jobs:
cp ../../../../rust-toolchain ./
cargo build
touch src/lib.rs
cargo coq-of-rust
rsync -acv src/ ../../../../CoqOfRust/alloc/ --include='*/' --include='*.v' --exclude='*'
cargo coq-of-rust --with-json
rsync -acv src/ ../../../../CoqOfRust/alloc/ --include='*/' --include='*.v' --include='*.json' --exclude='*'
cd ../../../..
endGroup
startGroup "Translate the core library"
cd third-party/rust/library/core
cp ../../../../rust-toolchain ./
cargo build
touch src/lib.rs
cargo coq-of-rust
rsync -acv src/ ../../../../CoqOfRust/core/ --include='*/' --include='*.v' --exclude='*'
cargo coq-of-rust --with-json
rsync -acv src/ ../../../../CoqOfRust/core/ --include='*/' --include='*.v' --include='*.json' --exclude='*'
cd ../../../..
endGroup
startGroup "Save space"
Expand Down Expand Up @@ -128,38 +128,38 @@ jobs:
cd crates
# move-abstract-stack
cd move-abstract-stack
cargo coq-of-rust
cargo coq-of-rust --with-json
touch src/lib.rs
cargo coq-of-rust
rsync -acv src/ ../../../../CoqOfRust/move_sui/translations/move_abstract_stack/ --include='*/' --include='*.v' --exclude='*'
cargo coq-of-rust --with-json
rsync -acv src/ ../../../../CoqOfRust/move_sui/translations/move_abstract_stack/ --include='*/' --include='*.v' --include='*.json' --exclude='*'
cd ..
# move-binary-format
cd move-binary-format
cargo coq-of-rust
cargo coq-of-rust --with-json
touch src/lib.rs
cargo coq-of-rust
rsync -acv src/ ../../../../CoqOfRust/move_sui/translations/move_binary_format/ --include='*/' --include='*.v' --exclude='*'
cargo coq-of-rust --with-json
rsync -acv src/ ../../../../CoqOfRust/move_sui/translations/move_binary_format/ --include='*/' --include='*.v' --include='*.json' --exclude='*'
cd ..
# move-bytecode-verifier
cd move-bytecode-verifier
cargo coq-of-rust
cargo coq-of-rust --with-json
touch src/lib.rs
cargo coq-of-rust
rsync -acv src/ ../../../../CoqOfRust/move_sui/translations/move_bytecode_verifier/ --include='*/' --include='*.v' --exclude='*'
cargo coq-of-rust --with-json
rsync -acv src/ ../../../../CoqOfRust/move_sui/translations/move_bytecode_verifier/ --include='*/' --include='*.v' --include='*.json' --exclude='*'
cd ..
# move-bytecode-verifier-meter
cd move-bytecode-verifier-meter
cargo coq-of-rust
cargo coq-of-rust --with-json
touch src/lib.rs
cargo coq-of-rust
rsync -acv src/ ../../../../CoqOfRust/move_sui/translations/move_bytecode_verifier_meter/ --include='*/' --include='*.v' --exclude='*'
cargo coq-of-rust --with-json
rsync -acv src/ ../../../../CoqOfRust/move_sui/translations/move_bytecode_verifier_meter/ --include='*/' --include='*.v' --include='*.json' --exclude='*'
cd ..
# move-core-types
cd move-core-types
cargo coq-of-rust
cargo coq-of-rust --with-json
touch src/lib.rs
cargo coq-of-rust
rsync -acv src/ ../../../../CoqOfRust/move_sui/translations/move_core_types/ --include='*/' --include='*.v' --exclude='*'
cargo coq-of-rust --with-json
rsync -acv src/ ../../../../CoqOfRust/move_sui/translations/move_core_types/ --include='*/' --include='*.v' --include='*.json' --exclude='*'
cd ..
cd ../../..
endGroup
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@

# Generated files for the smart contracts
contracts/generated

# Python rules
__pycache__/
12 changes: 12 additions & 0 deletions CoqOfRust/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

VFILES := $(shell find -L . -name "*.v" | grep -v -f blacklist.txt | sort)

PYTHON_LINKS_FILES := $(shell find links -name "*.py")

OUTPUT_LINKS_FILES := $(PYTHON_LINKS_FILES:.py=.v)

# Default target
all: $(OUTPUT_FILES) links

default: all

# We use the '@' to avoid displaying this command as the parameters list is
Expand All @@ -27,3 +34,8 @@ clean: clean-coq
$(MAKE) clean-util # done separately to enforce order

distclean: clean

%.v: %.py links.py
PYTHONPATH=. python $< > $@

links: $(OUTPUT_LINKS_FILES)
Loading
Loading