NetBeans Rust plugin

Related tags

IDEs rust-netbeans
Overview

Rust NetBeans Plugin

A NetBeans plugin for Rust.

Linux / OSX Windows
nix Build Status Windows Build status

Requirements

  • NetBeans 8.2.x
  • Java 8+
  • Rust
  • Cargo
  • Rustup

Features

So far, it includes

  • Cargo project support:
    • project view
    • clean/build/run/test from UI
  • Highlighting:
    • syntax highlighting
  • Editing:
    • brace matching
    • comment toggling
  • Navigation:
    • Go To Type
  • Formatting:
    • auto-indentation
    • basic auto-formatting
  • Testing UI:
    • run all tests
    • run module's tests
  • Coming Soon:
    • error/warning highlighting
    • code completion
    • code folding
    • basic file overview
    • basic occurrence matching
    • basic variable renaming

Installing

First, clone and build the plugin.

git clone https://github.com/drrb/rust-netbeans.git
mvn package

You can then install the plugin from NetBeans (the plugin will have been packaged at target/rust-netbeans-1.0.0-SNAPSHOT.nbm).

License

Rust NetBeans Plugin

Copyright (C) 2017 drrb

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Comments
  • cannot be compiled on windows

    cannot be compiled on windows

    essentially it gets to 'set-up-grammar.sh' and the build fails, obviously because windows cant run unix scripts.

    and with the amount of time that any of the files were last modified I'm surprised there isn't a single release at all...

    opened by Vectrobe 14
  • Doesn't package

    Doesn't package

    Output:

    $ rustc --version
    rustc 1.13.0-nightly (a059cb2f3 2016-09-27)
    $ mvn package
    [INFO] Scanning for projects...
    [INFO]                                                                         
    [INFO] ------------------------------------------------------------------------
    [INFO] Building Rust NetBeans Plugin 1.0.0-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO] 
    [INFO] --- build-helper-maven-plugin:1.9.1:add-source (compile-build-addon) @ rust-netbeans ---
    [INFO] Source directory: /home/azazar/Private/Projects/rust-netbeans/src/build/java added.
    [INFO] 
    [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ rust-netbeans ---
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] Copying 22 resources
    [INFO] 
    [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ rust-netbeans ---
    [INFO] Nothing to compile - all classes are up to date
    [INFO] 
    [INFO] --- exec-maven-plugin:1.3.2:java (compile-rust-bridge) @ rust-netbeans ---
    [WARNING] Warning: killAfter is now deprecated. Do you need it ? Please comment on MEXEC-6.
    Changes detected. Compiling all Rust crates!
    Compiling crate src/main/rust/com/github/drrb/javarust/lib/javarustbridge.rs
    Running command: [rustc, --out-dir, target/rust-libs, src/main/rust/com/github/drrb/javarust/lib/javarustbridge.rs]
    error[E0432]: unresolved import `rustc::middle::ty::CtxtArenas`
     --> src/main/rust/com/github/drrb/javarust/lib/compiler.rs:2:5
      |
    2 | use rustc::middle::ty::CtxtArenas;
      |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `ty` in `rustc::middle`
    
    error[E0432]: unresolved import `syntax::ast_map::Forest`
      --> src/main/rust/com/github/drrb/javarust/lib/compiler.rs:15:5
       |
    15 | use syntax::ast_map::Forest;
       |     ^^^^^^^^^^^^^^^^^^^^^^^ Could not find `ast_map` in `syntax`
    
    error[E0432]: unresolved import `syntax::diagnostic`
      --> src/main/rust/com/github/drrb/javarust/lib/compiler.rs:17:5
       |
    17 | use syntax::diagnostic;
       |     ^^^^^^^^^^^^^^^^^^ no `diagnostic` in `syntax`. Did you mean to use `diagnostics`?
    
    error[E0432]: unresolved import `syntax::ast::Item_`
     --> src/main/rust/com/github/drrb/javarust/lib/highlights.rs:6:5
      |
    6 | use syntax::ast::Item_;
      |     ^^^^^^^^^^^^^^^^^^ no `Item_` in `syntax::ast`. Did you mean to use `Item`?
    
    error[E0432]: unresolved import `syntax::diagnostic::Auto`
      --> src/main/rust/com/github/drrb/javarust/lib/highlights.rs:14:5
       |
    14 | use syntax::diagnostic::Auto;
       |     ^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `diagnostic` in `syntax`
    
    error[E0432]: unresolved import `syntax::diagnostic`
      --> src/main/rust/com/github/drrb/javarust/lib/highlights.rs:15:5
       |
    15 | use syntax::diagnostic;
       |     ^^^^^^^^^^^^^^^^^^ no `diagnostic` in `syntax`. Did you mean to use `diagnostics`?
    
    error[E0432]: unresolved import `syntax::diagnostic::Auto`
     --> src/main/rust/com/github/drrb/javarust/lib/lexer.rs:6:5
      |
    6 | use syntax::diagnostic::Auto;
      |     ^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `diagnostic` in `syntax`
    
    error[E0432]: unresolved import `syntax::diagnostic::SpanHandler`
     --> src/main/rust/com/github/drrb/javarust/lib/lexer.rs:7:5
      |
    7 | use syntax::diagnostic::SpanHandler;
      |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `diagnostic` in `syntax`
    
    error[E0432]: unresolved import `syntax::diagnostic`
     --> src/main/rust/com/github/drrb/javarust/lib/lexer.rs:8:5
      |
    8 | use syntax::diagnostic;
      |     ^^^^^^^^^^^^^^^^^^ no `diagnostic` in `syntax`. Did you mean to use `diagnostics`?
    
    error[E0432]: unresolved import `syntax::parse::token::special_idents`
      --> src/main/rust/com/github/drrb/javarust/lib/lexer.rs:16:5
       |
    16 | use syntax::parse::token::special_idents;
       |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `special_idents` in `syntax::parse::token`
    
    error[E0432]: unresolved import `syntax::diagnostic::Emitter`
     --> src/main/rust/com/github/drrb/javarust/lib/parser.rs:8:5
      |
    8 | use syntax::diagnostic::Emitter;
      |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `diagnostic` in `syntax`
    
    error[E0432]: unresolved import `syntax::diagnostic::Level`
     --> src/main/rust/com/github/drrb/javarust/lib/parser.rs:9:5
      |
    9 | use syntax::diagnostic::Level;
      |     ^^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `diagnostic` in `syntax`
    
    error[E0432]: unresolved import `syntax::diagnostic::RenderSpan`
      --> src/main/rust/com/github/drrb/javarust/lib/parser.rs:10:5
       |
    10 | use syntax::diagnostic::RenderSpan;
       |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `diagnostic` in `syntax`
    
    error[E0432]: unresolved import `syntax::diagnostic`
      --> src/main/rust/com/github/drrb/javarust/lib/parser.rs:11:5
       |
    11 | use syntax::diagnostic;
       |     ^^^^^^^^^^^^^^^^^^ no `diagnostic` in `syntax`. Did you mean to use `diagnostics`?
    
    error[E0432]: unresolved import `std::rt::unwind`
      --> src/main/rust/com/github/drrb/javarust/lib/javarustbridge.rs:48:5
       |
    48 | use std::rt::unwind;
       |     ^^^^^^^^^^^^^^^ no `unwind` in `std::rt`
    
    error[E0433]: failed to resolve. Use of undeclared type or module `Path`
      --> src/main/rust/com/github/drrb/javarust/lib/compiler.rs:37:21
       |
    37 |     let odir = Some(Path::new(&output_dir));
       |                     ^^^^^^^^^ Use of undeclared type or module `Path`
    
    error[E0423]: `Input::Str` is the name of a struct or struct variant, but this expression uses it like a function name
      --> src/main/rust/com/github/drrb/javarust/lib/compiler.rs:39:17
       |
    39 |     let input = Input::Str(request.input_source);
       |                 ^^^^^^^^^^ struct called like a function
       |
       = help: did you mean to write: `Input::Str { /* fields */ }`?
    
    error[E0433]: failed to resolve. Use of undeclared type or module `Path`
      --> src/main/rust/com/github/drrb/javarust/lib/compiler.rs:40:32
       |
    40 |     let input_file_path = Some(Path::new(&request.input_path));
       |                                ^^^^^^^^^ Use of undeclared type or module `Path`
    
    error[E0412]: type name `Path` is undefined or not in scope
      --> src/main/rust/com/github/drrb/javarust/lib/compiler.rs:57:33
       |
    57 |                      _: &Option<Path>,
       |                                 ^^^^ undefined or not in scope
       |
       = help: you can import several candidates into scope (`use ...;`):
       = help:   `rustc::hir::Path`
       = help:   `std::path::Path`
       = help:   `syntax::ast::Path`
    
    error[E0412]: type name `Path` is undefined or not in scope
      --> src/main/rust/com/github/drrb/javarust/lib/compiler.rs:58:33
       |
    58 |                      _: &Option<Path>,
       |                                 ^^^^ undefined or not in scope
       |
       = help: you can import several candidates into scope (`use ...;`):
       = help:   `rustc::hir::Path`
       = help:   `std::path::Path`
       = help:   `syntax::ast::Path`
    
    error[E0425]: unresolved name `driver::assign_node_ids_and_map`
      --> src/main/rust/com/github/drrb/javarust/lib/compiler.rs:78:19
       |
    78 |     let ast_map = driver::assign_node_ids_and_map(&sess, &mut forest);
       |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unresolved name
    
    error[E0433]: failed to resolve. Could not find `mtwt` in `syntax::ext`
      --> src/main/rust/com/github/drrb/javarust/lib/compiler.rs:90:5
       |
    90 |     syntax::ext::mtwt::reset_tables();
       |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `mtwt` in `syntax::ext`
    
    error[E0425]: unresolved name `parse::new_parse_sess_special_handler`
      --> src/main/rust/com/github/drrb/javarust/lib/parser.rs:53:16
       |
    53 |     let sess = parse::new_parse_sess_special_handler(span_handler);
       |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unresolved name
    
    error[E0107]: wrong number of lifetime parameters: expected 0, found 1
       --> src/main/rust/com/github/drrb/javarust/lib/highlights.rs:108:13
        |
    108 | impl<'v,'a> Visitor<'v> for HighlightVisitor<'a> {
        |             ^^^^^^^^^^^ unexpected lifetime parameter
    
    error: cannot continue compilation due to previous error
    
    [WARNING] 
    java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
        at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.RuntimeException: rustc exited nonzero (status code = 101)
        at com.github.drrb.rust.netbeans.build.CompileRustCrates.compile(CompileRustCrates.java:68)
        at com.github.drrb.rust.netbeans.build.CompileRustCrates.main(CompileRustCrates.java:49)
        ... 6 more
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 1.275 s
    [INFO] Finished at: 2016-09-29T12:47:29+03:00
    [INFO] Final Memory: 13M/295M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.3.2:java (compile-rust-bridge) on project rust-netbeans: An exception occured while executing the Java class. null: InvocationTargetException: rustc exited nonzero (status code = 101) -> [Help 1]
    [ERROR] 
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR] 
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
    
    opened by azazar 6
  • Fails to load native Rust libraries on Linux

    Fails to load native Rust libraries on Linux

    Running the build on Linux currently yields segfaults during the tests (when JNA attempts to load our native component).

    Example output: https://travis-ci.org/drrb/rust-netbeans/jobs/50808653#L2789.

    opened by drrb 4
  • Compilation fails using rust 1.0.0-beta

    Compilation fails using rust 1.0.0-beta

    Attempting to compile the plugin using "mvn package" on Mac OS X 10.10.3, using Java 8 and the newest Rust 1.0.0-beta, results in the following errors:

    Changes detected. Compiling all Rust crates! Compiling crate src/main/rust/com/github/drrb/javarust/lib/javarustbridge.rs Running command: [rustc, --out-dir, target/rust-libs, src/main/rust/com/github/drrb/javarust/lib/javarustbridge.rs] src/main/rust/com/github/drrb/javarust/lib/compiler.rs:37:21: 37:30 error: failed to resolve. Use of undeclared type or module Path src/main/rust/com/github/drrb/javarust/lib/compiler.rs:37 let odir = Some(Path::new(&output_dir)); ^~~~~~~~~ src/main/rust/com/github/drrb/javarust/lib/compiler.rs:37:21: 37:30 error: unresolved name Path::new src/main/rust/com/github/drrb/javarust/lib/compiler.rs:37 let odir = Some(Path::new(&output_dir)); ^~~~~~~~~ src/main/rust/com/github/drrb/javarust/lib/compiler.rs:40:32: 40:41 error: failed to resolve. Use of undeclared type or module Path src/main/rust/com/github/drrb/javarust/lib/compiler.rs:40 let input_file_path = Some(Path::new(&request.input_path)); ^~~~~~~~~ src/main/rust/com/github/drrb/javarust/lib/compiler.rs:40:32: 40:41 error: unresolved name Path::new src/main/rust/com/github/drrb/javarust/lib/compiler.rs:40 let input_file_path = Some(Path::new(&request.input_path)); ^~~~~~~~~ src/main/rust/com/github/drrb/javarust/lib/compiler.rs:57:33: 57:37 error: use of undeclared type name Path src/main/rust/com/github/drrb/javarust/lib/compiler.rs:57 _: &Option, ^~~~ src/main/rust/com/github/drrb/javarust/lib/compiler.rs:58:33: 58:37 error: use of undeclared type name Path src/main/rust/com/github/drrb/javarust/lib/compiler.rs:58 _: &Option, ^~~~ src/main/rust/com/github/drrb/javarust/lib/highlights.rs:130:13: 130:38 error: unresolved enum variant, struct or const RequiredMethod src/main/rust/com/github/drrb/javarust/lib/highlights.rs:130 TraitItem::RequiredMethod(ref method) => { ^~~~~~~~~~~~~~~~~~~~~~~~~ src/main/rust/com/github/drrb/javarust/lib/highlights.rs:134:13: 134:38 error: unresolved enum variant, struct or const ProvidedMethod src/main/rust/com/github/drrb/javarust/lib/highlights.rs:134 TraitItem::ProvidedMethod(ref method) => { ^~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 8 previous errors [WARNING] java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293) at java.lang.Thread.run(Thread.java:744) Caused by: java.lang.RuntimeException: rustc exited nonzero (status code = 101) at com.github.drrb.rust.netbeans.build.CompileRustCrates.compile(CompileRustCrates.java:68) at com.github.drrb.rust.netbeans.build.CompileRustCrates.main(CompileRustCrates.java:49) ... 6 more

    opened by mischkl 3
  • Doesn't package on linux

    Doesn't package on linux

    Maven output:

    $ mvn -e package [INFO] Error stacktraces are turned on. [INFO] Scanning for projects... [INFO]
    [INFO] ------------------------------------------------------------------------ [INFO] Building Rust NetBeans Plugin 1.0.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- antlr4-maven-plugin:4.0:antlr4 (default) @ rust-netbeans --- [INFO] ANTLR 4: Processing source directory /home/portable/tmp/rust-netbeans/src/main/antlr4 [INFO] Processing grammar: com/github/drrb/rust/netbeans/parsing/Rust.g4 [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.719s [INFO] Finished at: Fri Nov 21 12:15:46 YEKT 2014 [INFO] Final Memory: 14M/444M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.antlr:antlr4-maven-plugin:4.0:antlr4 (default) on project rust-netbeans: Execution default of goal org.antlr:antlr4-maven-plugin:4.0:antlr4 failed: Index: 0, Size: 0 -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.antlr:antlr4-maven-plugin:4.0:antlr4 (default) on project rust-netbeans: Execution default of goal org.antlr:antlr4-maven-plugin:4.0:antlr4 failed: Index: 0, Size: 0 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal org.antlr:antlr4-maven-plugin:4.0:antlr4 failed: Index: 0, Size: 0 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:638) at java.util.ArrayList.get(ArrayList.java:414) at org.antlr.v4.misc.OrderedHashMap.getElement(OrderedHashMap.java:46) at org.antlr.v4.analysis.LeftRecursiveRuleTransformer.setAltASTPointers(LeftRecursiveRuleTransformer.java:241) at org.antlr.v4.analysis.LeftRecursiveRuleTransformer.translateLeftRecursiveRule(LeftRecursiveRuleTransformer.java:162) at org.antlr.v4.analysis.LeftRecursiveRuleTransformer.translateLeftRecursiveRules(LeftRecursiveRuleTransformer.java:89) at org.antlr.v4.semantics.SemanticPipeline.process(SemanticPipeline.java:94) at org.antlr.v4.Tool.processNonCombinedGrammar(Tool.java:399) at org.antlr.v4.Tool.process(Tool.java:384) at org.antlr.mojo.antlr4.Antlr4Mojo$CustomTool.process(Antlr4Mojo.java:461) at org.antlr.v4.Tool.processGrammarsOnCommandLine(Tool.java:343) at org.antlr.mojo.antlr4.Antlr4Mojo.execute(Antlr4Mojo.java:272) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) ... 20 more [ERROR] [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

    opened by nukesparrow 3
  • issue installing plugin ubuntu 14.04 x64, Netbeans 8.0.2 -- mvn package error

    issue installing plugin ubuntu 14.04 x64, Netbeans 8.0.2 -- mvn package error

    Hello. I was trying to install the plugin but ran into the following build errors when running mvn package.

    [~/apps/rust-netbeans/]‹master› » mvn package [INFO] Scanning for projects... [INFO]
    [INFO] ------------------------------------------------------------------------ [INFO] Building Rust NetBeans Plugin 1.0.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- build-helper-maven-plugin:1.9.1:add-source (compile-build-addon) @ rust-netbeans --- [INFO] Source directory: /home/krishnab/apps/rust-netbeans/src/build/java added. [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ rust-netbeans --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 22 resources [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ rust-netbeans --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- exec-maven-plugin:1.3.2:java (compile-rust-bridge) @ rust-netbeans --- [WARNING] Warning: killAfter is now deprecated. Do you need it ? Please comment on MEXEC-6. Changes detected. Compiling all Rust crates! Compiling crate src/main/rust/com/github/drrb/javarust/lib/javarustbridge.rs Running command: [rustc, --out-dir, target/rust-libs, src/main/rust/com/github/drrb/javarust/lib/javarustbridge.rs] src/main/rust/com/github/drrb/javarust/lib/javarustbridge.rs:18:1: 18:25 error: #[feature] may not be used on the stable release channel src/main/rust/com/github/drrb/javarust/lib/javarustbridge.rs:18 #![feature(collections)] ^~~~~~~~~~~~~~~~~~~~~~~~ src/main/rust/com/github/drrb/javarust/lib/javarustbridge.rs:19:1: 19:18 error: #[feature] may not be used on the stable release channel src/main/rust/com/github/drrb/javarust/lib/javarustbridge.rs:19 #![feature(core)] ^~~~~~~~~~~~~~~~~ src/main/rust/com/github/drrb/javarust/lib/javarustbridge.rs:20:1: 20:18 error: #[feature] may not be used on the stable release channel src/main/rust/com/github/drrb/javarust/lib/javarustbridge.rs:20 #![feature(libc)] ^~~~~~~~~~~~~~~~~ src/main/rust/com/github/drrb/javarust/lib/javarustbridge.rs:21:1: 21:22 error: #[feature] may not be used on the stable release channel src/main/rust/com/github/drrb/javarust/lib/javarustbridge.rs:21 #![feature(old_path)] ^~~~~~~~~~~~~~~~~~~~~ src/main/rust/com/github/drrb/javarust/lib/javarustbridge.rs:22:1: 22:27 error: #[feature] may not be used on the stable release channel src/main/rust/com/github/drrb/javarust/lib/javarustbridge.rs:22 #![feature(rustc_private)] ^~~~~~~~~~~~~~~~~~~~~~~~~~ src/main/rust/com/github/drrb/javarust/lib/javarustbridge.rs:23:1: 23:22 error: #[feature] may not be used on the stable release channel src/main/rust/com/github/drrb/javarust/lib/javarustbridge.rs:23 #![feature(std_misc)] ^~~~~~~~~~~~~~~~~~~~~ error: aborting due to 6 previous errors [WARNING] java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.RuntimeException: rustc exited nonzero (status code = 101) at com.github.drrb.rust.netbeans.build.CompileRustCrates.compile(CompileRustCrates.java:68) at com.github.drrb.rust.netbeans.build.CompileRustCrates.main(CompileRustCrates.java:49) ... 6 more [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.705s [INFO] Finished at: Thu Sep 10 10:09:08 PDT 2015 [INFO] Final Memory: 14M/455M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.3.2:java (compile-rust-bridge) on project rust-netbeans: An exception occured while executing the Java class. null: InvocationTargetException: rustc exited nonzero (status code = 101) -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

    Please let me know if you have any suggestions.

    opened by 00krishna 2
  • Fail to compile on OS X 10.11 beta 6 with Rustc 1.2.0-nightly (31d9aee68 2015-06-22)

    Fail to compile on OS X 10.11 beta 6 with Rustc 1.2.0-nightly (31d9aee68 2015-06-22)

    When using mvn package:

    Changes detected. Compiling all Rust crates! Compiling crate src/main/rust/com/github/drrb/javarust/lib/javarustbridge.rs Running command: [rustc, --out-dir, target/rust-libs, src/main/rust/com/github/drrb/javarust/lib/javarustbridge.rs] src/main/rust/com/github/drrb/javarust/lib/compiler.rs:15:5: 15:28 error: unresolved import syntax::ast_map::Forest. Could not find ast_map in syntax src/main/rust/com/github/drrb/javarust/lib/compiler.rs:15 use syntax::ast_map::Forest; ^~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error

    opened by Axure 2
  • Please change shebang and add build command for NixOS based systems

    Please change shebang and add build command for NixOS based systems

    To build on NixOS, one must run

    nix-shell --pure --packages maven openjdk ruby --run 'mvn package'
    

    Furthermore, please consider changing #!/bin/bash to #!/usr/bin/env bash. The latter one works on almost all Unix like systems, the first one does not work on serveral BSDs and NixOS, for example.

    Edit: Please do the shebang change on all occurrences. Building a rust project does also not work, due to /bin/bash -lc '/usr/local/bin/cargo run --verbose' trying to run /bin/bash instead of /usr/bin/env bash.

    Edit 2: I see that you are running commands through bash. Why do you run bash to run rustc inside of bash?

    Edit 3: It looks like almost all of the paths are hard coded. Why that? Is there a rational reason against letting the given system environment determine, where to find a cargo binary?

    opened by wucke13 1
  • Error during build

    Error during build

    I am quite new to installing plugins and maven all together but I attempted to build your plugin in netbeans however the following error ensued. I need RUST to compile a programming challenge but finding the right IDE or Editor plugin has been a bear. Thanks in advance!

    Mike

    Error as follows:

    Total time: 5.002s Finished at: Wed Jun 29 18:27:41 PDT 2016

    Final Memory: 13M/207M

    Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.3.2:java (compile-rust-bridge) on project rust-netbeans: An exception occured while executing the Java class. null: InvocationTargetException: rustc exited nonzero (status code = 101) -> [Help 1]

    To see the full stack trace of the errors, re-run Maven with the -e switch. Re-run Maven using the -X switch to enable full debug logging.

    For more information about the errors and possible solutions, please read the following articles: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException


    My system attributes: Windows 8.1 Java VM 1.8.0_91 Netbeans 8.0.2 (with all available netbean maven plugins) Rust 1.9 (w/cargo)

    I attempted to install the maven plugin 1.3.2 from the repository as well and it builds fine but I get an error when executing the .jar file from the cmd window that there is no main manifest attribute. I don't know what's going on but today is definitely not my day with plugins.

    -Mike

    opened by mjfmechanic 1
  • Macros are treated as undefined + configuring racer for code completion

    Macros are treated as undefined + configuring racer for code completion

    First of all, thank you for creating Rust plugin for my favorite IDE Netbeans.

    1. I have logging macros like debug! and info! which are shown as undefined.
    2. Code completion doesn't seem to work out of the box. How do I configure racer path?
    opened by rohitjoshi 1
  • Test Case failures with Java 1.8 on mac

    Test Case failures with Java 1.8 on mac

    java -version java version "1.8.0" Java(TM) SE Runtime Environment (build 1.8.0-b132) Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)

    Failed tests: CargoConfigTest.shouldFindCratesForEachSource:41 Content does not match between 'crates/dependencies' and 'crates/dependencies.crates' Expected content is:

    crates: src/main.rs: EXECUTABLE sources: src/orphan.rs: crate: src/orphan.rs src/main.rs: crate: src/main.rs src/other/mod.rs: crate: src/main.rs src/other/third.rs: crate: src/main.rs

    but actual is:

    crates: src/main.rs: EXECUTABLE sources: src/orphan.rs: crate: src/orphan.rs src/main.rs: crate: src/main.rs src/other/third.rs: crate: src/main.rs src/other/mod.rs: crate: src/main.rs

    It differs in the following things:

    Line 7 contains different content than expected: Expected: src/other/mod.rs: Actual: src/other/third.rs:

    Line 9 contains different content than expected: Expected: src/other/third.rs: Actual: src/other/mod.rs:

    Tests run: 79, Failures: 1, Errors: 0, Skipped: 1

    [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:36 min [INFO] Finished at: 2015-02-23T20:51:21-05:00 [INFO] Final Memory: 27M/1169M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project rust-netbeans: There are test failures. [ERROR] [ERROR] Please refer to /Users/ytr289/projects/rust/rust-netbeans/target/surefire-reports for the individual test results. [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

    opened by rohitjoshi 1
  • Build on Mac fails with

    Build on Mac fails with "blocked mirror" error.

    I'm trying to build on my Mac. These are the commands I typed:

    git clone https://github.com/drrb/rust-netbeans.git
    cd rust-netbeans
    mvn package
    

    This is the error I eventually get:

    [ERROR] Failed to execute goal on project rust-netbeans: Could not resolve dependencies for project com.github.drrb:rust-netbeans:nbm:1.0.0-SNAPSHOT: Failed to collect dependencies at org.netbeans.api:org-netbeans-modules-csl-api:jar:RELEASE82: Failed to read artifact descriptor for org.netbeans.api:org-netbeans-modules-csl-api:jar:RELEASE82: Could not transfer artifact org.netbeans.api:org-netbeans-modules-csl-api:pom:RELEASE82 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [netbeans (http://bits.netbeans.org/nexus/content/groups/netbeans, default, releases)] -> [Help 1]

    opened by theosib-amazon 0
  • Plugin won't install on Apache Netbeans 12.0 due to

    Plugin won't install on Apache Netbeans 12.0 due to "Common Test Runnner UI" dependency

    Gives a dialog box and can't press the Next button in the installation window:

    Some plugins require plugin Common Test Runner UI to be installed. The plugin Common Test Runner UI is requested in implementation version 201609300101. The following plugin is affected:       Rust Some plugins require plugin Common Test Runner API to be installed. The plugin Common Test Runner API is requested in implementation version 201609300101. The following plugin is affected:       Rust

    opened by darwinte 0
  • Compile error javax.annotation (Generated) not found , java 11

    Compile error javax.annotation (Generated) not found , java 11

    Netbeans 8.2 java --version java 11.0.1 2018-10-16 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.1+13-LTS) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.1+13-LTS, mixed mode)

    Linux Mint 19 Tara

    cd /devel/rust/rust-netbeans mvn package ... ... /devel/rust/rust-netbeans/target/generated-sources/annotations/com/github/drrb/rust/netbeans/configuration/Bundle.java:[3,18] cannot find symbol [ERROR] symbol: class Generated [ERROR] location: package javax.annotation

    mvn -X

    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project rust-netbeans: Compilation failure: Compilation failure: [ERROR] /devel/rust/rust-netbeans/target/generated-sources/annotations/com/github/drrb/rust/netbeans/Bundle.java:[3,18] cannot find symbol [ERROR] symbol: class Generated [ERROR] location: package javax.annotation [ERROR] /devel/rust/rust-netbeans/target/generated-sources/annotations/com/github/drrb/rust/netbeans/configuration/Bundle.java:[3,18] cannot find symbol [ERROR] symbol: class Generated [ERROR] location: package javax.annotation [ERROR] -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project rust-netbeans: Compilation failure at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290) at org.apache.maven.cli.MavenCli.main (MavenCli.java:194) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:566) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356) Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute (AbstractCompilerMojo.java:858) at org.apache.maven.plugin.compiler.CompilerMojo.execute (CompilerMojo.java:129) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290) at org.apache.maven.cli.MavenCli.main (MavenCli.java:194) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:566) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356) [ERROR] [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

    opened by robinvanleeuwen 3
  • Consider replacing javacc with existing Antlr 4 grammar

    Consider replacing javacc with existing Antlr 4 grammar

    Antlr 4 is considerably more powerful than javacc, and javacc's future is a bit less certain these days; a Rust grammar is available that could probably just be picked up and used, but it would mean some rework.

    More beneficially, it would allow for considerably more sophisticated syntax highlighting, such as distinguishing macro uses and more.

    opened by timboudreau 8
Owner
drrb
drrb
Obsidian Plugin: Convert a URL into markdown

Obsidian Plugin: Convert a URL into markdown Transforms a URL to markdown view if the website allows it. Installation Available in the community plugi

Stephen Solka 142 Jan 3, 2023
Rust IDE support for Atom, powered by the Rust Language Server (RLS)

IDE-Rust Rust language support for Atom-IDE, powered by rust-analyzer. Features Auto-completion Diagnostics (errors and warnings from rustc) Document

The Rust Programming Language 239 Dec 14, 2022
rust-analyzer is a modular compiler frontend for the Rust language

rust-analyzer is a modular compiler frontend for the Rust language. It is a part of a larger rls-2.0 effort to create excellent IDE support for Rust.

null 11.2k Jan 8, 2023
Rust language support in Atom - LOOKING FOR MAINTAINER, see #144

Rust language support in Atom Adds syntax highlighting and snippets to Rust files in Atom. Install Install the package language-rust in Atom (Preferen

Andreas Neuhaus 118 Oct 11, 2022
Eclipse Corrosion - Rust edition in Eclipse IDE

Eclipse Corrosion Rust edition and debug in Eclipse IDE Corrosion is a Rust development plugin for the Eclipse IDE, providing a rich edition experienc

Eclipse Foundation 194 Dec 23, 2022
RustDT is an Eclipse based IDE for the Rust programming language:

Project website: http://rustdt.github.io/ As of 2017, RustDT is no longer actively maintained, see this blog post for more information. If you are int

null 351 Aug 20, 2022
Emacs configuration for Rust

Table of Contents Introduction Installation Melpa Manual installation Feature guide Indentation Code formatting Running / testing / compiling code Cli

The Rust Programming Language 919 Jan 4, 2023
Rust development environment for Emacs

Rustic Table of Contents Rustic Intro Installation straight Compilation Faces rustc errors Rustfmt edition 2018 LSP Server Client eglot lsp-mode lsp-e

null 612 Dec 30, 2022
Better Rust/Cargo support for Flycheck

flycheck-rust — Flycheck for Rust This Flycheck extension configures Flycheck automatically for the current Cargo project. Setup Install from MELPA or

Flycheck 112 Sep 21, 2022
Rust IDE

This branch contains the development of a "new ride" that maintain a small impact on the ui library. This is for a few reasons. Can customize the colo

Gustav Jansson 171 Dec 24, 2022
An IDE for Rust

Introduction SolidOak is a simple IDE for Rust. See the website for binary releases. It has the following features: An embedded copy of Neovim as its

Zach Oakes 907 Dec 29, 2022
The official Sublime Text 3 package for the Rust Programming Language

Rust Enhanced About This is a Sublime Text 3 package which supports Rust starting with version 1.0, it makes no attempt at supporting earlier incompat

The Rust Programming Language 704 Jan 7, 2023
Vim configuration for Rust.

rust.vim Description This is a Vim plugin that provides Rust file detection, syntax highlighting, formatting, Syntastic integration, and more. It requ

The Rust Programming Language 3.4k Jan 8, 2023
Rust Cargo command bindings

Vim Cargo Simple vim command bindings to quickly run cargo stuff from vim. Commands Available, mapping with their Cargo equivalant: CargoBench CargoBu

Timon Vonk 52 Dec 24, 2022
Visual Studio extension for Rust

Visual Studio extension for Rust Currently in development, and not feature complete. Stable versions are available on the Visual Studio extension gall

PistonDevelopers 697 Dec 18, 2022
Rust extension for Visual Studio 2017 with RLS support

Rust support for Visual Studio 2017 Preview Adds language support for Rust to Visual Studio 2017. Supports: code completion goto definition find all r

Zoey Riordan 111 Aug 4, 2022
crates is an extension aims to help people to manage their dependencies for rust (crates.io & TOML).

crates Hello Rust & VSCode lovers, This is crates, an extension for crates.io dependencies. Aims helping developers to manage dependencies while using

Seray Uzgur 164 Jan 4, 2023
Rust On the FLY completion for neovim

rofl.nvim Rust On the FLy completion engine for Neovim. Why Rust? It's 2021. I think the question you should be asking yourself is "Why NOT Rust?!?? (

TJ DeVries 63 Sep 25, 2022
A *seriously* no-bullshit Neovim GUI written in Rust and Tauri

Looking for a shareable component template? Go here --> sveltejs/component-template svelte app This is a project template for Svelte apps. It lives at

null 13 Nov 21, 2022