mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-16 09:55:07 +00:00
29614e2e52
* Simplifying libwaku.nim by extracting config parser to config.nim * Adding json_base_event.nim * Starting to control-version the libwaku.h We are creating this libwaku.h inspired by the one that is automatically generated by the nim compiler when `make libwaku` is invoked. Therefore, the self-generated header is then placed in: nimcache/release/libwaku/libwaku.h * Better waku_example.c organization * libwaku.nim: better memory management We need to create a 'cstring' internally from the 'const char*' passed from outside the library. We invoke 'allocShared' in order to create the internal 'cstring', and invoke 'deallocShared' in order to manually free the memory.
9 lines
228 B
Nim
9 lines
228 B
Nim
|
|
type JsonEvent* = ref object of RootObj
|
|
# https://rfc.vac.dev/spec/36/#jsonsignal-type
|
|
eventType* {.requiresInit.}: string
|
|
|
|
method `$`*(jsonEvent: JsonEvent): string {.base.} = discard
|
|
# All events should implement this
|
|
|