Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions FULL_HELP_DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ Generate code client bindings for a contract
* `rust` — Generate Rust bindings
* `typescript` — Generate a TypeScript / JavaScript package
* `python` — Generate Python bindings
* `java` — Generate Java bindings



Expand Down Expand Up @@ -318,6 +319,14 @@ Generate Python bindings



## `stellar contract bindings java`

Generate Java bindings

**Usage:** `stellar contract bindings java`



## `stellar contract build`

Build a contract from source
Expand Down
8 changes: 8 additions & 0 deletions cmd/soroban-cli/src/commands/contract/bindings.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pub mod java;
pub mod json;
pub mod python;
pub mod rust;
Expand All @@ -16,6 +17,9 @@ pub enum Cmd {

/// Generate Python bindings
Python(python::Cmd),

/// Generate Java bindings
Java(java::Cmd),
}

#[derive(thiserror::Error, Debug)]
Expand All @@ -31,6 +35,9 @@ pub enum Error {

#[error(transparent)]
Python(#[from] python::Error),

#[error(transparent)]
Java(#[from] java::Error),
}

impl Cmd {
Expand All @@ -40,6 +47,7 @@ impl Cmd {
Cmd::Rust(rust) => rust.run()?,
Cmd::Typescript(ts) => ts.run().await?,
Cmd::Python(python) => python.run()?,
Cmd::Java(java) => java.run()?,
}
Ok(())
}
Expand Down
19 changes: 19 additions & 0 deletions cmd/soroban-cli/src/commands/contract/bindings/java.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
use std::fmt::Debug;

use clap::Parser;

#[derive(Parser, Debug, Clone)]
#[group(skip)]
pub struct Cmd {}

#[derive(thiserror::Error, Debug)]
pub enum Error {
#[error("java binding generation is not implemented in the stellar-cli, but is available via the tool located here: https://github.com/lightsail-network/stellar-contract-bindings")]
NotImplemented,
}

impl Cmd {
pub fn run(&self) -> Result<(), Error> {
Err(Error::NotImplemented)
}
}