Skip to content

Commit

Permalink
Merge pull request #945 from hacspec/fstar-allow-unsafe
Browse files Browse the repository at this point in the history
feat(engine/f*): allow unsafe code
  • Loading branch information
W95Psp authored Oct 2, 2024
2 parents f8124b7 + cd59416 commit bfcd974
Show file tree
Hide file tree
Showing 7 changed files with 137 additions and 48 deletions.
97 changes: 53 additions & 44 deletions Cargo.lock

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

8 changes: 4 additions & 4 deletions engine/backends/fstar/fstar_backend.ml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ include
include On.Construct_base
include On.Quote
include On.Dyn
include On.Unsafe
end)
(struct
let backend = Diagnostics.Backend.FStar
Expand Down Expand Up @@ -42,8 +43,7 @@ module SubtypeToInputLanguage
and type for_index_loop = Features.Off.for_index_loop
and type state_passing_loop = Features.Off.state_passing_loop
and type match_guard = Features.Off.match_guard
and type trait_item_default = Features.Off.trait_item_default
and type unsafe = Features.Off.unsafe) =
and type trait_item_default = Features.Off.trait_item_default) =
struct
module FB = InputLanguage

Expand All @@ -59,6 +59,7 @@ struct
include Features.SUBTYPE.On.Macro
include Features.SUBTYPE.On.Quote
include Features.SUBTYPE.On.Dyn
include Features.SUBTYPE.On.Unsafe
end)

let metadata = Phase_utils.Metadata.make (Reject (NotInBackendLang backend))
Expand Down Expand Up @@ -1685,8 +1686,7 @@ module DepGraphR = Dependencies.Make (Features.Rust)

module TransformToInputLanguage =
[%functor_application
Phases.Reject.Unsafe(Features.Rust)
|> Phases.Reject.RawOrMutPointer
Phases.Reject.RawOrMutPointer(Features.Rust)
|> Phases.Transform_hax_lib_inline
|> Phases.Specialize
|> Phases.Drop_sized_trait
Expand Down
Loading

0 comments on commit bfcd974

Please sign in to comment.