Code Monkey home page Code Monkey logo

cargo's People

Contributors

alekangelov avatar cdmistman avatar dannymcgee avatar equilibris avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cargo's Issues

Not an issue but big thanks.

Hi, I was trying to do similar when I found .Net and Go support. But couldn't do it due to time constraint. But you created. And I was more than happy to delete my repo.

thanks for whoever is working on this Repo. I will be soon love to take it for a spin. I have quite a big workspace for client project.

Thanks again. And you can close the issue if you like. :)

Local dependencies for publishable crates

Hey there,

I was working with a Rust app and two libs that depend on each other, and I couldn't find a way to specify these dependencies other than explicitly specifying their relative paths on each app/lib's Cargo.toml file. I was under the impression that the Cargo.toml in the monorepo's parent directory would take care of all of this.

Here is an example:

2022-06-16_12-53

  • apps/myapp/src/main.rs :
use lib1 ;

fn main() {
    let result: String = lib1::lib1();
    println!("{result}");
}
  • apps/myapp/Cargo.toml :
[package]
name = "myapp"
version = "0.1.0"
edition = "2021"

[dependencies]
lib1 = {path = "../../libs/lib1"}
  • libs/lib1/src/lib.rs :
use lib2; 

pub fn lib1() -> String {
    lib2::lib2()
}
  • libs/lib1/Cargo.toml :
[package]
name = "lib1"
version = "0.1.0"
edition = "2021"

[dependencies]
lib2 = {path = "../lib2"}
  • libs/lib2/src/lib.rs :
pub fn lib2() -> String {
    "Hello".into()
}
  • libs/lib2/Cargo.toml :
[package]
name = "lib2"
version = "0.1.0"
edition = "2021"

[dependencies]

dep-graph

2022-06-16_12-52

I would like to know if there is a better way to specify these dependencies especially that we intend to publish to crates.io which would not work if we have to specify a dependency by path.

Thanks.

Project name in nx configuration file

Hello,

I'm starting to use your plugin to work on a multi language monorepo with rust, react and web assembly and its help a lot so thanks for this nice plugin.

I've a question about the name of the project in the nx configuration files. You chose to use snake case but most (all ?) of the plugin written by the @nrwl/nx team are using snake case with hyphen instead of underscore. I'm not really here to debate about the best way to name variable but it add a bit of inconsistency in the files of the monorepo.

So my request would be to change this behaviour to be the same as for @nrwl/nx.

I won't mind doing it myself in a pull request if you are willing to accept this change.

Regards,

Guillaume

Cannot compute dep graph

rt
image

output of verbose mode:

glowsquid on ๎‚  dev via ๎œ˜ v16.14.0 via ๐Ÿฆ€ v1.58.1 took 3s
โฏ NX_VERBOSE_LOGGING=true yarn build oxidize
<ref *1> Error: spawnSync /bin/sh ENOBUFS
    at Object.spawnSync (node:internal/child_process:1111:20)
    at spawnSync (node:child_process:814:24)
    at Object.execSync (node:child_process:897:15)
    at Object.processProjectGraph (/run/media/tntman/BulkStorage/projects/glowsquid/node_modules/@nxrs/cargo/src/graph/index.js:9:23)
    at /run/media/tntman/BulkStorage/projects/glowsquid/node_modules/@nrwl/workspace/src/core/project-graph/build-project-graph.js:215:27
    at Array.reduce (<anonymous>)
    at updateProjectGraphWithPlugins (/run/media/tntman/BulkStorage/projects/glowsquid/node_modules/@nrwl/workspace/src/core/project-graph/build-project-graph.js:213:28)
    at /run/media/tntman/BulkStorage/projects/glowsquid/node_modules/@nrwl/workspace/src/core/project-graph/build-project-graph.js:87:19
    at Generator.next (<anonymous>)
    at fulfilled (/run/media/tntman/BulkStorage/projects/glowsquid/node_modules/tslib/tslib.js:114:62) {
  errno: -105,
  code: 'ENOBUFS',
  syscall: 'spawnSync /bin/sh',
  path: '/bin/sh',
  spawnargs: [ '-c', 'cargo metadata --format-version=1' ],
  error: [Circular *1],
  status: null,
  signal: 'SIGTERM',
  output: [
    null,
    '{"packages":[{"name":"adler","version":"1.0.2","id":"adler 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)","license":"0BSD OR MIT OR Apache-2.0","license_file":null,"description":"A simple clean-room implementation of the Adler-32 checksum","source":"registry+https://github.com/rust-lang/crates.io-index","dependencies":[{"name":"compiler_builtins","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^0.1.2","kind":null,"rename":null,"optional":true,"uses_default_features":true,"features":[],"target":null,"registry":null},{"name":"rustc-std-workspace-core","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^1.0.0","kind":null,"rename":"core","optional":true,"uses_default_features":true,"features":[],"target":null,"registry":null},{"name":"criterion","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^0.3.2","kind":"dev","rename":null,"optional":false,"uses_default_features":true,"features":[],"target":null,"registry":null}],"targets":[{"kind":["lib"],"crate_types":["lib"],"name":"adler","src_path":"/home/tntman/.cargo/registry/src/github.com-1ecc6299db9ec823/adler-1.0.2/src/lib.rs","edition":"2015","doc":true,"doctest":true,"test":true},{"kind":["bench"],"crate_types":["bin"],"name":"bench","src_path":"/home/tntman/.cargo/registry/src/github.com-1ecc6299db9ec823/adler-1.0.2/benches/bench.rs","edition":"2015","doc":false,"doctest":false,"test":false}],"features":{"default":["std"],"rustc-dep-of-std":["core","compiler_builtins"],"std":[]},"manifest_path":"/home/tntman/.cargo/registry/src/github.com-1ecc6299db9ec823/adler-1.0.2/Cargo.toml","metadata":{"docs":{"rs":{"rustdoc-args":["--cfg=docsrs"]}},"release":{"no-dev-version":true,"pre-release-commit-message":"Release {{version}}","tag-message":"{{version}}","pre-release-replacements":[{"file":"CHANGELOG.md","replace":"## Unreleased\\n\\nNo changes.\\n\\n## [{{version}} - {{date}}](https://github.com/jonas-schievink/adler/releases/tag/v{{version}})\\n","search":"## Unreleased\\n"},{"file":"README.md","replace":"adler = \\"{{version}}\\"","search":"adler = \\"[a-z0-9\\\\\\\\.-]+\\""},{"file":"src/lib.rs","replace":"https://docs.rs/adler/{{version}}","search":"https://docs.rs/adler/[a-z0-9\\\\.-]+"}]}},"publish":null,"authors":["Jonas Schievink <[email protected]>"],"categories":["algorithms"],"keywords":["checksum","integrity","hash","adler32","zlib"],"readme":"README.md","repository":"https://github.com/jonas-schievink/adler.git","homepage":null,"documentation":"https://docs.rs/adler/","edition":"2015","links":null,"default_run":null,"rust_version":null},{"name":"adler32","version":"1.2.0","id":"adler32 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)","license":"Zlib","license_file":null,"description":"Minimal Adler32 implementation for Rust.","source":"registry+https://github.com/rust-lang/crates.io-index","dependencies":[{"name":"compiler_builtins","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^0.1.2","kind":null,"rename":null,"optional":true,"uses_default_features":true,"features":[],"target":null,"registry":null},{"name":"rustc-std-workspace-core","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^1.0.0","kind":null,"rename":"core","optional":true,"uses_default_features":true,"features":[],"target":null,"registry":null},{"name":"criterion","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^0.3","kind":"dev","rename":null,"optional":false,"uses_default_features":true,"features":[],"target":null,"registry":null},{"name":"getrandom","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^0.1","kind":"dev","rename":null,"optional":false,"uses_default_features":true,"features":["wasm-bindgen"],"target":null,"registry":null},{"name":"humansize","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^1.1","kind":"dev","rename":null,"optional":false,"uses_default_features":true,"features":[],"target":null,"registry":null},{"name":"rand","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^0.7","kind":"dev","rename":null,"optional":false,"uses_default_features":true,"features":[],"target":null,"registry":null},{"name":"wasm-bindgen","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^0.2.63","kind":"dev","rename":null,"optional":false,"uses_default_features":true,"features":[],"target":"cfg(target_arch = \\"wasm32\\")","registry":null},{"name":"wasm-bindgen-test","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^0.3","kind":"dev","rename":null,"optional":false,"uses_default_features":true,"features":[],"target":"cfg(target_arch = \\"wasm32\\")","registry":null}],"targets":[{"kind":["lib"],"crate_types":["lib"],"name":"adler32","src_path":"/home/tntman/.cargo/registry/src/github.com-1ecc6299db9ec823/adler32-1.2.0/src/lib.rs","edition":"2018","doc":true,"doctest":true,"test":true},{"kind":["bench"],"crate_types":["bin"],"name":"bench","src_path":"/home/tntman/.cargo/registry/src/github.com-1ecc6299db9ec823/adler32-1.2.0/src/bench.rs","edition":"2018","doc":false,"doctest":false,"test":false}],"features":{"default":["std"],"rustc-dep-of-std":["core","compiler_builtins"],"std":[]},"manifest_path":"/home/tntman/.cargo/registry/src/github.com-1ecc6299db9ec823/adler32-1.2.0/Cargo.toml","metadata":null,"publish":null,"authors":["Remi Rampin <[email protected]>"],"categories":[],"keywords":["adler32","hash","rolling"],"readme":"README.md","repository":"https://github.com/remram44/adler32-rs","homepage":null,"documentation":"https://docs.rs/adler32/","edition":"2018","links":null,"default_run":null,"rust_version":null},{"name":"aho-corasick","version":"0.7.18","id":"aho-corasick 0.7.18 (registry+https://github.com/rust-lang/crates.io-index)","license":"Unlicense/MIT","license_file":null,"description":"Fast multiple substring searching.","source":"registry+https://github.com/rust-lang/crates.io-index","dependencies":[{"name":"memchr","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^2.4.0","kind":null,"rename":null,"optional":false,"uses_default_features":false,"features":[],"target":null,"registry":null}],"targets":[{"kind":["lib"],"crate_types":["lib"],"name":"aho_corasick","src_path":"/home/tntman/.cargo/registry/src/github.com-1ecc6299db9ec823/aho-corasick-0.7.18/src/lib.rs","edition":"2018","doc":true,"doctest":true,"test":true}],"features":{"default":["std"],"std":["memchr/std"]},"manifest_path":"/home/tntman/.cargo/registry/src/github.com-1ecc6299db9ec823/aho-corasick-0.7.18/Cargo.toml","metadata":null,"publish":null,"authors":["Andrew Gallant <[email protected]>"],"categories":["text-processing"],"keywords":["string","search","text","aho","multi"],"readme":"README.md","repository":"https://github.com/BurntSushi/aho-corasick","homepage":"https://github.com/BurntSushi/aho-corasick","documentation":null,"edition":"2018","links":null,"default_run":null,"rust_version":null},{"name":"ansi_term","version":"0.12.1","id":"ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)","license":"MIT","license_file":null,"description":"Library for ANSI terminal colours and styles (bold, underline)","source":"registry+https://github.com/rust-lang/crates.io-index","dependencies":[{"name":"serde","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^1.0.90","kind":null,"rename":null,"optional":true,"uses_default_features":true,"features":["derive"],"target":null,"registry":null},{"name":"doc-comment","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^0.3","kind":"dev","rename":null,"optional":false,"uses_default_features":true,"features":[],"target":null,"registry":null},{"name":"regex","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^1.1.9","kind":"dev","rename":null,"optional":false,"uses_default_features":true,"features":[],"target":null,"registry":null},{"name":"serde_json","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^1.0.39","kind":"dev","rename":null,"optional":false,"uses_default_features":true,"features":[],"target":null,"registry":null},{"name":"winapi","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^0.3.4","kind":null,"rename":null,"optional":false,"uses_default_features":true,"features":["consoleapi","errhandlingapi","fileapi","handleapi","processenv"],"target":"cfg(target_os = \\"windows\\")","registry":null}],"targets":[{"kind":["lib"],"crate_types":["lib"],"name":"ansi_term","src_path":"/home/tntman/.cargo/registry/src/github.com-1ecc6299db9ec823/ansi_term-0.12.1/src/lib.rs","edition":"2015","doc":true,"doctest":true,"test":true},{"kind":["example"],"crate_types":["bin"],"name":"basic_colours","src_path":"/home/tntman/.cargo/registry/src/github.com-1ecc6299db9ec823/ansi_term-0.12.1/examples/basic_colours.rs","edition":"2015","doc":false,"doctest":false,"test":false},{"kind":["example"],"crate_types":["bin"],"name":"rgb_colours","src_path":"/home/tntman/.cargo/registry/src/github.com-1ecc6299db9ec823/ansi_term-0.12.1/examples/rgb_colours.rs","edition":"2015","doc":false,"doctest":false,"test":false},{"kind":["example"],"crate_types":["bin"],"name":"256_colours","src_path":"/home/tntman/.cargo/registry/src/github.com-1ecc6299db9ec823/ansi_term-0.12.1/examples/256_colours.rs","edition":"2015","doc":false,"doctest":false,"test":false}],"features":{"derive_serde_style":["serde"]},"manifest_path":"/home/tntman/.cargo/registry/src/github.com-1ecc6299db9ec823/ansi_term-0.12.1/Cargo.toml","metadata":null,"publish":null,"authors":["[email protected]","Ryan Scheel (Havvy) <[email protected]>","Josh Triplett <[email protected]>"],"categories":[],"keywords":[],"readme":"README.md","repository":"https://github.com/ogham/rust-ansi-term","homepage":"https://github.com/ogham/rust-ansi-term","documentation":"https://docs.rs/ansi_term","edition":"2015","links":null,"default_run":null,"rust_versi'... 1104070 more characters,
    ''
  ],
  pid: 122805,
  stdout: '{"packages":[{"name":"adler","version":"1.0.2","id":"adler 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)","license":"0BSD OR MIT OR Apache-2.0","license_file":null,"description":"A simple clean-room implementation of the Adler-32 checksum","source":"registry+https://github.com/rust-lang/crates.io-index","dependencies":[{"name":"compiler_builtins","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^0.1.2","kind":null,"rename":null,"optional":true,"uses_default_features":true,"features":[],"target":null,"registry":null},{"name":"rustc-std-workspace-core","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^1.0.0","kind":null,"rename":"core","optional":true,"uses_default_features":true,"features":[],"target":null,"registry":null},{"name":"criterion","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^0.3.2","kind":"dev","rename":null,"optional":false,"uses_default_features":true,"features":[],"target":null,"registry":null}],"targets":[{"kind":["lib"],"crate_types":["lib"],"name":"adler","src_path":"/home/tntman/.cargo/registry/src/github.com-1ecc6299db9ec823/adler-1.0.2/src/lib.rs","edition":"2015","doc":true,"doctest":true,"test":true},{"kind":["bench"],"crate_types":["bin"],"name":"bench","src_path":"/home/tntman/.cargo/registry/src/github.com-1ecc6299db9ec823/adler-1.0.2/benches/bench.rs","edition":"2015","doc":false,"doctest":false,"test":false}],"features":{"default":["std"],"rustc-dep-of-std":["core","compiler_builtins"],"std":[]},"manifest_path":"/home/tntman/.cargo/registry/src/github.com-1ecc6299db9ec823/adler-1.0.2/Cargo.toml","metadata":{"docs":{"rs":{"rustdoc-args":["--cfg=docsrs"]}},"release":{"no-dev-version":true,"pre-release-commit-message":"Release {{version}}","tag-message":"{{version}}","pre-release-replacements":[{"file":"CHANGELOG.md","replace":"## Unreleased\\n\\nNo changes.\\n\\n## [{{version}} - {{date}}](https://github.com/jonas-schievink/adler/releases/tag/v{{version}})\\n","search":"## Unreleased\\n"},{"file":"README.md","replace":"adler = \\"{{version}}\\"","search":"adler = \\"[a-z0-9\\\\\\\\.-]+\\""},{"file":"src/lib.rs","replace":"https://docs.rs/adler/{{version}}","search":"https://docs.rs/adler/[a-z0-9\\\\.-]+"}]}},"publish":null,"authors":["Jonas Schievink <[email protected]>"],"categories":["algorithms"],"keywords":["checksum","integrity","hash","adler32","zlib"],"readme":"README.md","repository":"https://github.com/jonas-schievink/adler.git","homepage":null,"documentation":"https://docs.rs/adler/","edition":"2015","links":null,"default_run":null,"rust_version":null},{"name":"adler32","version":"1.2.0","id":"adler32 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)","license":"Zlib","license_file":null,"description":"Minimal Adler32 implementation for Rust.","source":"registry+https://github.com/rust-lang/crates.io-index","dependencies":[{"name":"compiler_builtins","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^0.1.2","kind":null,"rename":null,"optional":true,"uses_default_features":true,"features":[],"target":null,"registry":null},{"name":"rustc-std-workspace-core","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^1.0.0","kind":null,"rename":"core","optional":true,"uses_default_features":true,"features":[],"target":null,"registry":null},{"name":"criterion","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^0.3","kind":"dev","rename":null,"optional":false,"uses_default_features":true,"features":[],"target":null,"registry":null},{"name":"getrandom","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^0.1","kind":"dev","rename":null,"optional":false,"uses_default_features":true,"features":["wasm-bindgen"],"target":null,"registry":null},{"name":"humansize","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^1.1","kind":"dev","rename":null,"optional":false,"uses_default_features":true,"features":[],"target":null,"registry":null},{"name":"rand","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^0.7","kind":"dev","rename":null,"optional":false,"uses_default_features":true,"features":[],"target":null,"registry":null},{"name":"wasm-bindgen","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^0.2.63","kind":"dev","rename":null,"optional":false,"uses_default_features":true,"features":[],"target":"cfg(target_arch = \\"wasm32\\")","registry":null},{"name":"wasm-bindgen-test","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^0.3","kind":"dev","rename":null,"optional":false,"uses_default_features":true,"features":[],"target":"cfg(target_arch = \\"wasm32\\")","registry":null}],"targets":[{"kind":["lib"],"crate_types":["lib"],"name":"adler32","src_path":"/home/tntman/.cargo/registry/src/github.com-1ecc6299db9ec823/adler32-1.2.0/src/lib.rs","edition":"2018","doc":true,"doctest":true,"test":true},{"kind":["bench"],"crate_types":["bin"],"name":"bench","src_path":"/home/tntman/.cargo/registry/src/github.com-1ecc6299db9ec823/adler32-1.2.0/src/bench.rs","edition":"2018","doc":false,"doctest":false,"test":false}],"features":{"default":["std"],"rustc-dep-of-std":["core","compiler_builtins"],"std":[]},"manifest_path":"/home/tntman/.cargo/registry/src/github.com-1ecc6299db9ec823/adler32-1.2.0/Cargo.toml","metadata":null,"publish":null,"authors":["Remi Rampin <[email protected]>"],"categories":[],"keywords":["adler32","hash","rolling"],"readme":"README.md","repository":"https://github.com/remram44/adler32-rs","homepage":null,"documentation":"https://docs.rs/adler32/","edition":"2018","links":null,"default_run":null,"rust_version":null},{"name":"aho-corasick","version":"0.7.18","id":"aho-corasick 0.7.18 (registry+https://github.com/rust-lang/crates.io-index)","license":"Unlicense/MIT","license_file":null,"description":"Fast multiple substring searching.","source":"registry+https://github.com/rust-lang/crates.io-index","dependencies":[{"name":"memchr","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^2.4.0","kind":null,"rename":null,"optional":false,"uses_default_features":false,"features":[],"target":null,"registry":null}],"targets":[{"kind":["lib"],"crate_types":["lib"],"name":"aho_corasick","src_path":"/home/tntman/.cargo/registry/src/github.com-1ecc6299db9ec823/aho-corasick-0.7.18/src/lib.rs","edition":"2018","doc":true,"doctest":true,"test":true}],"features":{"default":["std"],"std":["memchr/std"]},"manifest_path":"/home/tntman/.cargo/registry/src/github.com-1ecc6299db9ec823/aho-corasick-0.7.18/Cargo.toml","metadata":null,"publish":null,"authors":["Andrew Gallant <[email protected]>"],"categories":["text-processing"],"keywords":["string","search","text","aho","multi"],"readme":"README.md","repository":"https://github.com/BurntSushi/aho-corasick","homepage":"https://github.com/BurntSushi/aho-corasick","documentation":null,"edition":"2018","links":null,"default_run":null,"rust_version":null},{"name":"ansi_term","version":"0.12.1","id":"ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)","license":"MIT","license_file":null,"description":"Library for ANSI terminal colours and styles (bold, underline)","source":"registry+https://github.com/rust-lang/crates.io-index","dependencies":[{"name":"serde","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^1.0.90","kind":null,"rename":null,"optional":true,"uses_default_features":true,"features":["derive"],"target":null,"registry":null},{"name":"doc-comment","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^0.3","kind":"dev","rename":null,"optional":false,"uses_default_features":true,"features":[],"target":null,"registry":null},{"name":"regex","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^1.1.9","kind":"dev","rename":null,"optional":false,"uses_default_features":true,"features":[],"target":null,"registry":null},{"name":"serde_json","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^1.0.39","kind":"dev","rename":null,"optional":false,"uses_default_features":true,"features":[],"target":null,"registry":null},{"name":"winapi","source":"registry+https://github.com/rust-lang/crates.io-index","req":"^0.3.4","kind":null,"rename":null,"optional":false,"uses_default_features":true,"features":["consoleapi","errhandlingapi","fileapi","handleapi","processenv"],"target":"cfg(target_os = \\"windows\\")","registry":null}],"targets":[{"kind":["lib"],"crate_types":["lib"],"name":"ansi_term","src_path":"/home/tntman/.cargo/registry/src/github.com-1ecc6299db9ec823/ansi_term-0.12.1/src/lib.rs","edition":"2015","doc":true,"doctest":true,"test":true},{"kind":["example"],"crate_types":["bin"],"name":"basic_colours","src_path":"/home/tntman/.cargo/registry/src/github.com-1ecc6299db9ec823/ansi_term-0.12.1/examples/basic_colours.rs","edition":"2015","doc":false,"doctest":false,"test":false},{"kind":["example"],"crate_types":["bin"],"name":"rgb_colours","src_path":"/home/tntman/.cargo/registry/src/github.com-1ecc6299db9ec823/ansi_term-0.12.1/examples/rgb_colours.rs","edition":"2015","doc":false,"doctest":false,"test":false},{"kind":["example"],"crate_types":["bin"],"name":"256_colours","src_path":"/home/tntman/.cargo/registry/src/github.com-1ecc6299db9ec823/ansi_term-0.12.1/examples/256_colours.rs","edition":"2015","doc":false,"doctest":false,"test":false}],"features":{"derive_serde_style":["serde"]},"manifest_path":"/home/tntman/.cargo/registry/src/github.com-1ecc6299db9ec823/ansi_term-0.12.1/Cargo.toml","metadata":null,"publish":null,"authors":["[email protected]","Ryan Scheel (Havvy) <[email protected]>","Josh Triplett <[email protected]>"],"categories":[],"keywords":[],"readme":"README.md","repository":"https://github.com/ogham/rust-ansi-term","homepage":"https://github.com/ogham/rust-ansi-term","documentation":"https://docs.rs/ansi_term","edition":"2015","links":null,"default_run":null,"rust_versi'... 1104070 more characters,
  stderr: ''
}
Failed to process the project graph with "@nxrs/cargo". This will error in the future!

 >  NX   RunStart


{
  "meta": {
    "nxCloudVersion": "latest"
  },
  "branch": null,
  "runGroup": "258503086da7a63149fca8bbd17472907d266c57",
  "hashes": []
}


 >  NX   RunStart


{
  "meta": {
    "nxCloudVersion": "latest"
  },
  "branch": null,
  "runGroup": "258503086da7a63149fca8bbd17472907d266c57",
  "hashes": [
    "c5e7f2e74d0a942f665df4e3c6eb78ec047bcd3d3b2dd8e1741e5d1f86a4fa44"
  ]
}


 >  NX   Nx Cloud: Cache miss c5e7f2e74d0a942f665df4e3c6eb78ec047bcd3d3b2dd8e1741e5d1f86a4fa44.


> nx run oxidize:build

> cargo +nightly build --bin oxidize --target-dir ../../dist/apps/oxide/target -Z unstable-options --out-dir ../../dist/apps/oxide/builds/debug
error: no bin target named `oxidize`

 โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”

 >  NX   Ran target build for project oxidize (2s)

    โœ–    1/1 failed
    โœ”    0/1 succeeded [0 read from cache]


 >  NX   RunEnd. Completed tasks


[
  {
    "taskId": "oxidize:build",
    "startTime": "2022-02-18T09:47:11.218Z",
    "target": "build",
    "projectName": "oxidize",
    "hash": "c5e7f2e74d0a942f665df4e3c6eb78ec047bcd3d3b2dd8e1741e5d1f86a4fa44",
    "hashDetails": {
      "nodes": {
        "oxidize": "fd0153c875e149eb9a76c99a5bf923d2d2b58a4b20fe0c73dd9aedd5e6363e5e"
      },
      "runtime": {},
      "implicitDeps": {
        "/run/media/tntman/BulkStorage/projects/glowsquid/package.json": "63edd6fa919cf231a47d20367fe1126a19916668a0d8f1d88d0ea6c6c62f4bf1",
        "/run/media/tntman/BulkStorage/projects/glowsquid/.eslintrc.json": "ce764c60ea27b190bfc7c5a49d94aaa869f715ccf48d17f5d181a3ba702e09db",
        "/run/media/tntman/BulkStorage/projects/glowsquid/yarn.lock": "ce672bf1212f09a5de3725b75e0667cca7f1dd681d8efdefb8d882841488f86e",
        "/run/media/tntman/BulkStorage/projects/glowsquid/.gitignore": "602c3e7127a95bcb5b684174f15a05d77d106e921f5c190ba4783815c9245a8d",
        "nx.json": "756cca89a4a8aa556ec9e519dc750cba747c908de98ac48e66fe4e4f7f105b1f"
      }
    },
    "params": "",
    "endTime": "2022-02-18T09:47:12.904Z",
    "status": 1,
    "cacheStatus": "cache-miss",
    "terminalOutput": "\u001b[2m> cargo +nightly..."
  }
]

   See Nx Cloud run details at https://nx.app/runs/yOkgEJjMBFF


glowsquid

Plugin defines cargo dependencies to be implicit dependencies

Here is a project graph:
image

As you can see all dependencies declared in apps/esteem/Cargo.toml are added as implicit dependencies. By definition, only in-workspace projects qualify as implicitDependencies.So in the above example only esteem_core should be display in the graph.

I could not find any specific documentation for this, but you can test it easily by adding a random name to your project.json.

As an example:
image

And here is the output of build
image

The fix is pretty easy, and I am willing to make a PR for the same.

Support for affected dependent builds?

Hi,

On the lookout for a builder for rust and I was wondering if this supports the :affected plugin part so that it knows what has changed so it can only build libraries etc that are dependent on others.

I think NX released the API for supporting this in other languages, I know a GO builder supports this.

I was wondering if this does or if it's in the plans?

Thanks in advance

Add support for Zola

As this is supporting or will be supporting almost everything related to rust. It would be great to have Zola support as well.

Warning from NX when running build, test, or lint command

First off, thank you so much for writing this plugin. So far everything is looking good, but I have run across the following:

Failed to process the project graph with "@nxrs/cargo". This will error in the future! Run with NX_VERBOSE_LOGGING=true to see the error.

This is probably due to the changes around the dependency graphing to open it up for others.

I might take a crack at solving this and submitting a PR, but wanted to document it here first.

Thanks again

project future and wasm support

Hey guys, just recently discovered this plugin, wonderful idea!

I want to add wasm support with wasm-pack (here is pr #26), and for that I would like to know if you are going to continue to support the project?
If not, I'll publish my own module on npm with a link to this project as inspiration.

Cheers!

Rust - w.a.s.m. support

https://rustwasm.github.io/book/introduction.html

Not entirely sure of the schematics of how this would work with nx, or if this would even be considered in the scope of this project. But, I'm more so bringing it up as I'm curious.
As this may be a really cool thing to have as an nx library, as then it could export typescript from a barrel file to be used in a frontend application.

Any who, let me know what you think c:

Thank you for the plugin! Any roadmap?

Hello, I am Doni And we are using Nx in our company workflow.

thanks for making this, so that we are not building by ourselves.

anything that I can help to make it more stable? Maybe docs or something or any roadmap?

Cannot build app

I am unable to build a cargo app using this.

error:

glowsquid/apps/oxidize on ๎‚  dev [!] is ๐Ÿ“ฆ v0.1.0 via .NET v6.0.100 via ๐Ÿฆ€ v1.57.0 took 3s
โฏ yarn nx build oxidize    
yarn run v1.22.15
$ D:\projects\glowsquid\node_modules\.bin\nx build oxidize
error: could not find `Cargo.toml` in `D:\projects\glowsquid` or any parent directory
Failed to process the project graph with "@nxrs/cargo". This will error in the future!
Run with NX_VERBOSE_LOGGING=true to see the error.

> nx run oxidize:build 
> cargo build --bin oxidize
error: could not find `Cargo.toml` in `D:\projects\glowsquid` or any parent directory

โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”

>  NX   ERROR  Running target "oxidize:build" failed

  Failed tasks:

  - oxidize:build

  Hint: run the command with --verbose for more details.


>  NX   CLOUD  See run details at https://nx.app/runs/sEGeeqGliP8

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

It seems that when running the path that cargo runs in isnt correct

[Bug Report] target handling in 0.4.0 introduces error with --configuration

Overview

After the 0.4.0 update, cargo failed with this error message:

> nx run foo-svc:test:ci 
> cargo test -p foo-svc --options "[object Object]"
error: unexpected argument '--options' found

  tip: a similar argument exists: '--timings'

Usage: cargo test --package [<SPEC>] --timings[=<FMTS>] [TESTNAME] [-- [args]...]

For more information, try '--help'.

Context

In CI we run:

nx affected --target=test --configuration=ci

The extra configuration [nx docs] argument is required for one or two of our projects -- for other projects it's just ignored.

Workaround

Easy enough to temporarily split out cargo tasks into it's own command w/o a configuration argument

Thanks!

TypeError: builder.addDependency is not a function

Hi there,

I'm trying this out. Want to flag:build and lint commands fail with

builder.addDependency(devkit_1.DependencyType.static, pkg.name, depName);

TypeError: builder.addDependency is not a function

Using 12.6.2 of nx.

target option for build seems to be ignored / not implemented

    "build": {
      "executor": "@nxrs/cargo:build",
      "options": {
        "release": false
      },
      "configurations": {
        "production": {
          "release": true
        },
        "windows": {
          "target": "86_64-pc-windows-gnu", <--- this is ignored
        }
      }
    },

Cannot specify target, cargo keeps building with its default, so no cross-compilation is possible

[bug] Cannot build when the crate and bin name differ

Hi,

Thanks for this plugin.
There is a small quirk it seems that --bin xxx is hardcoded into the build executor?

I'm trying to build a bin from a crate but their name differ.
Could this be a configuration option for the executor?

Thanks

cargo.exe popup window on save (windows)

When I run the serve target on all projects (I'm not using any serve target on the rust project, so it's not running) a cmd window pops up. When i look in task manager I see that the cargo.exe process is running in that command window. Everytime I save a file and the automatic reloader triggers, the cmd window pops up for a couple seconds and then closes. When I remove the "plugins": ["@nxrs/cargo"] line in de nx.json file the issue issue no longer occurs. This only happens on windows 10, this does not happen on my linux machine

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.