Package org.eolang.maven.rust
Class Project
- java.lang.Object
-
- org.eolang.maven.rust.Project
-
public final class Project extends Object
To create the cargo project.- Since:
- 1.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Projectdependency(String name, Object content)Add dependency to project.Pathsave()Saves the project to file system.Projectwith(Module module, List<String> dependencies)Adds the module to the project.
-
-
-
Constructor Detail
-
Project
public Project(Path target)
Ctor. Creates a raw cargo project.- Parameters:
target- Destination path.
-
-
Method Detail
-
with
public Project with(Module module, List<String> dependencies)
Adds the module to the project.- Parameters:
module- New module to be added to the project.dependencies- Dependencies of the module.- Returns:
- The project.
-
dependency
public Project dependency(String name, Object content)
Add dependency to project. Dependency can be `like jni = "0.21.1"` or `eo = { path = "/rust/eo" }`.- Parameters:
name- Name of dependency.content- Content of dependency.- Returns:
- The project.
-
save
public Path save() throws IOException
Saves the project to file system.- Returns:
- Path to project.
- Throws:
IOException- If any issues with I/O.
-
-