Skip to content

Commit

Permalink
Autogenerate fiat-rust/src/lib.rs
Browse files Browse the repository at this point in the history
Fixes #1089, exposing poly1305
  • Loading branch information
JasonGross committed Dec 28, 2021
1 parent dcb216e commit 25ce137
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ EXTRA_C_FILES := inversion/c/*_test.c
ALL_C_FILES := $(patsubst %,$(C_DIR)%.c,$(ALL_BASE_FILES))
ALL_BEDROCK2_FILES := $(patsubst %,$(BEDROCK2_DIR)%.c,$(filter-out $(BASE_FILES_NEEDING_INT128),$(ALL_BASE_FILES)))
ALL_RUST_FILES := $(patsubst %,$(RUST_DIR)%.rs,$(ALL_BASE_FILES))
ALL_RUST_MODS := $(ALL_BASE_FILES)
ALL_GO_FILES := $(patsubst %,$(GO_DIR)%.go,$(call GO_RENAME_TO_FILE,$(filter-out $(BASE_FILES_NEEDING_INT128),$(ALL_BASE_FILES))))
ALL_JSON_FILES := $(patsubst %,$(JSON_DIR)%.json,$(ALL_BASE_FILES))
ALL_JAVA_FILES := $(patsubst %,$(JAVA_DIR)%.java,$(call JAVA_RENAME,$(filter-out $(BASE_FILES_NEEDING_INT128),$(ALL_BASE_FILES))))
Expand Down Expand Up @@ -605,6 +606,12 @@ test-rust-files: $(ALL_RUST_FILES)
test-rust-files only-test-rust-files:
cd fiat-rust; $(CARGO_BUILD)

rust-files lite-rust-files: fiat-rust/src/lib.rs

fiat-rust/src/lib.rs: Makefile
$(SHOW)'PRINTF > $@'
$(HIDE)(echo '// AUTOGENERATED FILE: DO NOT EDIT'; echo '#![cfg_attr(not(feature = "std"), no_std)]'; printf 'pub mod %s;\n' $(sort $(ALL_RUST_MODS))) > $@

$(ALL_ZIG_FILES) : $(ZIG_DIR)%.zig : $$($$($$*_BINARY_NAME))
$(SHOW)'SYNTHESIZE > $@'
$(HIDE)rm -f $@.ok
Expand Down
26 changes: 15 additions & 11 deletions fiat-rust/src/lib.rs

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

0 comments on commit 25ce137

Please sign in to comment.