Command arguments and message passing

Flow

Flow uses actor model to offer an snappy experience when working with projects that have tens of thousands of source files, also features async communication with the threads that are working in independent tasks supporting git interface, lsp and tree-sitter integration, apart from the directory introspection to make available all the files of the project, all of them expected s from an IDE. The command arguments travel to the target command and are en/decoded powered by cbor, the same as the parameters that are sent from one thread to another. The process management is provided by thespian.

This chapter describes the mechanisms that flow has to pass arguments between components.

Library usage

The most basic example on deserialization of an integer value is shown in commands.

Cbor features en/decoding arrays, json and compounds of basic types and the only requirement is to decode in the same order as encoding the data, more samples on using cbor can be seen in cbor tests.

For example, when interacting with the clipboard, the messages sent are multiple chunks of information,

Buffer scoping

CBOR structures are mostly stored in a way that avoids allocation entirely. This is really fast, but requires that you always know where the CBOR data you are working with is stored.

All of this implies several things worth keeping in mind:

More information