Readme draft
- write code in language A
- annotate it (see below)
- launch
kitcom -src path/to/source.A -dest path/to/generated/file.B - Use generated file to IPC
Typescript:
Currently only whole classes are supported.
Annotate:
/**
* @kittenipc api
*/
class ClassName {}
Usage:
const localApi = new LocalAPI(); // LocalAPI is written by hand
const ipc = new ChildIPC(localApi);
const goApi = new RemoteAPI(ipc); // RemoteAPI is generated by kitcom
await ipc.start();
// work
await ipc.wait();
Golang:
Currently only whole structs are supported
Annotate
// kittenipc:api
type StructName struct {
}
Usage:
localApi := LocalAPI{} // LocalAPI is written by hand
cmd := exec.Command(fmt.Sprintf("node %s", "path to compiled js"))
ipc, err := kittenipc.NewParent(cmd, &localApi)
remoteApi := RemoteAPI{Ipc: ipc} // RemoteAPI is generated by kitcom
if err != nil {
log.Panic(err)
}
if err := ipc.Start(); err != nil {
log.Panic(err)
}
// work
if err := kit.Wait(); err != nil {
log.Panic(err)
}
LocalAPI on one side is RemoteAPI on the other side
Library status
Work in progress. No tests, no docs, code is not finished! Not everything is working yet. Code is partly crap.
Description
Languages
Go
99%
TypeScript
0.9%
Makefile
0.1%