Skip to content
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

Move Compiler - set stdlib root #1

Open
ghost opened this issue Jul 24, 2019 · 2 comments
Open

Move Compiler - set stdlib root #1

ghost opened this issue Jul 24, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Jul 24, 2019

discussion is here
PR is here

The idea is add --stdlib-root ~/repos/bcx/libra/language/stdlib/ argument to set stdlib root path, that the Move compiler can find Move stdlib.

Improvement:
Use -I to set library path such as GCC/Clang:

./compiler -I ~/repos/bcx/libra/language/stdlib/ -I ~/repos/bcx/libra/language/others_lib ~/hello.mvir
@liangping
Copy link

@yinjimmy Do you mind integrate with Move Runner.

Move Runner is a tool focused on project management, including compile, build and run.

let's work together.

@ghost
Copy link
Author

ghost commented May 13, 2021

The new version compiler use --deps to support this feature. But has some issues:

  1. compile error
    A: solve with --no-stdlib
$ ./target/debug/compiler ~/hello.mvir --address 0x1
thread 'main' panicked at 'Failed to compile script: Duplicate dependency module for 00000000000000000000000000000001.Signer', language/compiler/src/main.rs:144:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  1. no output file, output file is in the same folder of ~/hello.mvir -> ~/hello.mv
$ ./target/debug/compiler ~/hello.mvir   --address 0x2 --no-stdlib
$ ls ~/hello.mv*
/Users/admin/hello.mv    # output file
/Users/admin/hello.mvir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant