Skip to content
This repository was archived by the owner on Jul 28, 2023. It is now read-only.
This repository was archived by the owner on Jul 28, 2023. It is now read-only.

Feature request: conditional compilation #145

@villesundell

Description

@villesundell

Hello!
Recently the Diem Association (read: Facebook 😆 ) has been very interested to expand Move support to platforms such as NEAR (in fact, directly sponsored by Facebook).

This can lead to a situation, where a feature (for example: retrieving current time) can be implemented differently on Diem, Pontem and NEAR (since that would be platform specific, not language specific).

So, I would like to request a feature that would permit compiling different files if on a certain platform, and would also include (and exclude) some dependencies accordingly.

For example:

  • If on Diem, would compile DiemHelpers.move implementing Helpers-module, and include diem-stdlib as a dependency.
  • If on Pontem, would compile PontemHelpers.move implementing Helpers-module (and not DiemHelpers.move).
  • Other .move files could then just use Helper::getTime().

(Of course all of this would be project specific, and defined in Dove.toml.)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions