-
Notifications
You must be signed in to change notification settings - Fork 11.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] Add Starcoin-framework as a dependency #616
Conversation
@sblackshear @awelc @lxfind , I am getting the following compiler error:
Let me know if you have any insights on resolving this |
I suspect that you are seeing the conflict because we import Move's standard lib and so does Starcoin (and it looks like you pulling all their framework code). I am not sure what's possible in Move.toml files, but in Cargo.toml (e.g. here) you can pull more fine-grain dependencies separately. |
I think we may have to copy the u256.move in for now. |
@666lcz create an issue for tracking U256 support because we'll also have to propagate this to dependent services, which are currently capped at U64 now. |
Agreed with copying this in for now + encouraging the Move team to include this in the stdlib (assuming they don't go even further and add it to the language itself...). We actually do this with the Move stdlib as well (instead of depending on it in GH) to improve CI performance. |
2c23dfd
to
90634c7
Compare
After copying the files, I encountered the following error when running
I suspect this error is because I did not copy the native function definition from Starcoin. I have the following questions:
|
In order to make a new package accessible on-chain without publishing it, the package must be included in the genesis. Looks like we do need the natives and yet that's the correct path. |
It turns out it's tricky to add/copy the native part: https://github.com/starcoinorg/starcoin/tree/13d2c9ee658bebf9d7297ad498c7efc161aa0a17/vm/natives. I tried two approaches: Approach 1: add https://github.com/starcoinorg/starcoin/tree/13d2c9ee658bebf9d7297ad498c7efc161aa0a17/vm/natives as a dependency in
|
Your proposal makes perfect sense to me. Thanks for bearing with the difficulty of importing this! |
We should bring this up in this week's Move meeting with the Diem team. It seems to me the amount of work is similar to just adding U256 to upstream move stdlib. |
Here's the best documentation of what the As a consequence, I think it will not be possible to align the versions in the starcoin and move dependencies, and that we should give up on importing this via a regular cargo dependency. The only solutions I can see are an upstream contribution (add what we need to Move) or a fork. |
* fix: make apt update quiet * fix: actually need -qq to quiet apt commands
* fix: make apt update quiet * fix: actually need -qq to quiet apt commands
Per this suggestion, we will add
Starcoin-framework
as a dependency for the u256 support.TODO(once we solve the compiler error)
sui_programmability/framework/
where we will define an ERC721 module