Eonil
Generates Swift data-types and serialization code for IPC(inter-process communication) to Rust.
You define data schema in Rust code, and execute this tool to
derive corresponding Swift-side data-types and serializations.
You can perform Rust-side serializaton with serde
.
and Swift-side serialization code
will be generated.
Intermediate messages will be coded in JSON.
to_swift
.An example is included in source tree.
Rust to/from Swift.
std::bool <-> Bool
std::i64 <-> Int64
std::f64 <-> Float64
std::String <-> String
std::option::Option <-> Optional
std::vec::Vec <-> Array
(enum) <-> (enum)
(struct) <-> (struct)
Any other types will not be supported and code-generator will fail with an error.
pub
.serde
behavior. Any customizations won't work.
So DO NOT customize serde
behavior to make it work
on Swift side.Box
type. So no recursive data type.HashMap
(or any other associated collection) type.enum
or struct
types.Initial version has been written by Eonil. This project is licensed under "MIT License". Any contributions will become same license with this project.