Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
d5fefc9
wip: algod_ffi_crate work
joe-p Sep 29, 2025
5751500
wip: more work
joe-p Sep 29, 2025
1aefe34
wip: convert errors
joe-p Oct 5, 2025
d191a08
wip: custom type for UnknownJsonValue
joe-p Oct 5, 2025
8aecf07
wip: error free client except Vec and str
joe-p Oct 5, 2025
6f679c5
wip: handle string params in client
joe-p Oct 5, 2025
33c3a41
wip: handle vec reponse types
joe-p Oct 6, 2025
8f814b3
wip: handle Vecs in models
joe-p Oct 6, 2025
51a73f8
wip: skip Into rust type impl for problematic return types
joe-p Oct 6, 2025
1837a10
wip: handle option vecs in model From impls
joe-p Oct 6, 2025
736e6b9
wip: handle SimulateRequestTransactionGroup
joe-p Oct 6, 2025
368cf38
wip: handle SimulateRequest
joe-p Oct 6, 2025
678072c
wip: more skipped Froms
joe-p Oct 6, 2025
3ac7995
wip: use custom_newtype! for Vec aliases
joe-p Oct 6, 2025
ece3b3b
wip: all models except errors
joe-p Oct 6, 2025
7d953e2
wip: rm From<Error> for RustError
joe-p Oct 6, 2025
41fb5fa
wip: rm From impl for api errors
joe-p Oct 6, 2025
73838ce
wip: working From for api errors
joe-p Oct 6, 2025
5a76b84
wip: fix typo in Vec alias From
joe-p Oct 6, 2025
bafda16
wip: proper try_into for sim request
joe-p Oct 6, 2025
cf3148b
wip: proper try_into for dryrun
joe-p Oct 6, 2025
b1b91c3
Merge branch 'main' into feat/algod_client_ffi_crate
joe-p Oct 6, 2025
6802367
wip: use algod_client_ffi in algokit_utils_ffi
joe-p Oct 6, 2025
23b7376
wip: rm escape seq
joe-p Oct 6, 2025
90978a6
wip: passing test_utils.py]
joe-p Oct 6, 2025
5ae5f4b
wip: add tests/__init__.py and update transact in utils
joe-p Oct 7, 2025
9faee33
wip: implement AlgodClientTrait
joe-p Oct 7, 2025
78c883a
debug: no len on main
joe-p Oct 7, 2025
2ffc811
wip: passing async test
joe-p Oct 7, 2025
8e7d8d3
Merge branch 'main' into feat/algod_client_ffi_crate
joe-p Oct 8, 2025
ccecfb9
wip: fix RustComposer instantiation
joe-p Oct 8, 2025
5b7a232
wip: uniffi 0.30
joe-p Oct 10, 2025
33005ce
Merge branch 'main' into feat/algod_client_ffi_crate
joe-p Oct 10, 2025
e72de7d
wip: rm unused file
joe-p Oct 14, 2025
ed36208
wip: updated block templates, minus From impls
joe-p Oct 15, 2025
a56318a
wip: all From impls but not TryFrom
joe-p Oct 15, 2025
7f9f9ef
wip: TryFrom for block models
joe-p Oct 15, 2025
6bade0d
wip: update transact, passing tests
joe-p Oct 15, 2025
44ee498
wip: rm binary artifacts
joe-p Oct 15, 2025
263452f
wip: ignore binary artifacts
joe-p Oct 15, 2025
78c0f01
wip: use TransactionComposerSendResult
joe-p Oct 15, 2025
6c68686
wip: run clippy after generating api
joe-p Oct 15, 2025
aab1aa6
wip: add clippy to API setup
joe-p Oct 15, 2025
180a206
wip: fix unused variable
joe-p Oct 15, 2025
19f0112
wip: generate-all, only ffi for algod
joe-p Oct 15, 2025
eaa68a0
wip: rm unused clients mod
joe-p Oct 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .github/actions/setup-api-tools/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ runs:
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.85.0
components: rustfmt
components: rustfmt, clippy

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Install uv dependencies
working-directory: api/oas_generator
shell: bash
Expand Down
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ AGENTS.md
.kiro/

packages/python/**/*algokit_*.py
packages/python**/*.dll
packages/python**/*.so
packages/python**/*.dylib
packages/python**/*.whl
packages/python/**/*.dll
packages/python/**/*.so
packages/python/**/*.dylib
packages/python/**/*.whl

118 changes: 88 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ members = [
"crates/algokit_test_artifacts",
"crates/ffi_macros",
"crates/algod_client",
"crates/algod_client_ffi",
"crates/indexer_client",
"crates/kmd_client",
"tools/build_pkgs",
Expand All @@ -20,7 +21,7 @@ members = [
]

[workspace.dependencies]
uniffi = { version = "0.29.4" }
uniffi = { version = "0.30.0" }
snafu = { version = "0.8" }
base32 = { version = "0.5.1" }
sha2 = { version = "0.10.8" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def rust_doc_comment(text: str, indent: int = 0) -> str:
if not text:
return ""

lines = text.strip().split("\n")
lines = text.strip().replace("\\[", "[").replace("\\]", "]").split("\n")
indent_str = " " * indent

if len(lines) == 1:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,13 @@ def get_error_types(operation: Operation) -> list[str]:

return error_types

@staticmethod
def parse_error_type(error_type: str) -> dict[str, str | None]:
variant = error_type.split("(")[0]
inner_type = error_type.split("(")[1].rstrip(")") if "(" in error_type else None

return {"variant": variant, "inner_type": inner_type}

@staticmethod
def get_response_types_by_filter(
operations: list[Operation],
Expand Down Expand Up @@ -341,6 +348,7 @@ def _register_globals(self) -> None:
"group_operations_by_tag": op_analyzer.group_operations_by_tag,
# Response analysis
"get_error_types": resp_analyzer.get_error_types,
"parse_error_type": resp_analyzer.parse_error_type,
"get_success_response_type": resp_analyzer.get_success_response_type,
"get_all_response_types": resp_analyzer.get_all_response_types,
"get_endpoint_response_types": lambda op: resp_analyzer.get_all_response_types([op]),
Expand Down Expand Up @@ -463,6 +471,7 @@ def generate_client(
"schemas": spec.schemas,
"content_types": spec.content_types,
"custom_description": custom_description,
"ffi": "ffi" in package_name.lower(),
}

files = {}
Expand All @@ -485,7 +494,7 @@ def _generate_base_files(self, context: dict[str, Any], output_dir: Path) -> dic
# Detect client type
client_type_fn = self.template_engine.env.globals.get("get_client_type")
client_type = client_type_fn(context["spec"]) if callable(client_type_fn) else "Api"
if client_type == "Algod":
if client_type == "Algod" and not context.get("ffi", False):
# Provide msgpack helper to encode/decode arbitrary msgpack values as bytes
files[src_dir / "msgpack_value_bytes.rs"] = self.template_engine.render_template(
"base/msgpack_value_bytes.rs.j2", context
Expand Down
Loading