diem / diem/move

[Feature Request] Share Move libraries between Move blockchain projects

Open
#91 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
378
Forks
137
PR merge metrics
No merged PRs in 30d

Description

# πŸš€ Feature Request

## Motivation

Now we have several Blockchain projects using Move, but it is hard to share Move libraries between different blockchains.

Perhaps the ideal way of Move project dependency like:

```

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚Move Std lib β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚Move DeFi libβ”‚ β”‚Move Commons lib β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Move Chain independent lib β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ StarcoinFramework β”‚ β”‚ DiemFramework β”‚ β”‚ 0lFramework β”‚ β”‚ PontemFramework β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

```

1. Move std lib: provide the basic modules for Move language.
2. Move DeFi lib: provide the basic modules for DeFi, such as Token and NFT standards.
3. Move Commons lib: provide some utils module for Move language, like java's apache-commons.
4. Frameworks: the chain-specific modules.

However, this is not yet possible and there is an address conflict issue.

Move stdlib uses the `0x1` address and will conflict with the framework. For example, if StarcoinFramework defines a dependency on Move stdlib in `Move.toml`, the Move project will produce an error.

One approach to resolve this is to auto-embed Move stdlib and Move DeFi lib to the chain framework, but this also has the problem of naming conflicts.

I think this is very important for building the Move ecosystem, and this is an advantage of Move over Solidity ecosystem.

**Is your feature request related to a problem? Please describe.**

## Pitch

**Describe the solution you'd like**

**Describe alternatives you've considered**

**Are you willing to open a pull request?** (See [CONTRIBUTING](../../CONTRIBUTING.md))

## Additional context

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.