All Projects → etorth → libnvc

etorth / libnvc

Licence: MIT license
Easy way to embed (neo)vim in your application

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to libnvc

RustTetris
Tetris Made in Rust and SDL2
Stars: ✭ 18 (-43.75%)
Mutual labels:  sdl2
cirrina
cirrina is an opinionated asynchronous web framework based on aiohttp
Stars: ✭ 32 (+0%)
Mutual labels:  rpc
DoubleStar
A personalized/enhanced re-creation of the Darkhotel "Double Star" APT exploit chain with a focus on Windows 8.1 and mixed with some of my own techniques
Stars: ✭ 140 (+337.5%)
Mutual labels:  rpc
chip-8
A CHIP-8 Emulator written in Haskell
Stars: ✭ 34 (+6.25%)
Mutual labels:  sdl2
fluid
🐙 Code-generated, Auto-versioned, & Smart Web APIs
Stars: ✭ 37 (+15.63%)
Mutual labels:  rpc
ParsecSoda
Parsec Soda is a custom open-source game streaming app that integrates with Parsec API and is focused in Host experience.
Stars: ✭ 135 (+321.88%)
Mutual labels:  sdl2
teki
Touhou-style shoot'em up
Stars: ✭ 60 (+87.5%)
Mutual labels:  sdl2
endbasic
BASIC environment with a REPL, a web interface, a graphical console, and RPi support written in Rust
Stars: ✭ 220 (+587.5%)
Mutual labels:  sdl2
xmlrpcwsc-dotnet
XML-RPC Web Service Client C# implementation
Stars: ✭ 30 (-6.25%)
Mutual labels:  rpc
ExpertVideoToolbox
A lightweight, versatile GUI of x264, x265. Nearly full input formats support, .mkv and .mp4 output support. Avs support will be added soon. Language: Chinese
Stars: ✭ 12 (-62.5%)
Mutual labels:  gui-application
RawSalmonEngine
A game engine utilising "Tiled" map files
Stars: ✭ 15 (-53.12%)
Mutual labels:  sdl2
virtualGizmo3D
Virtual GIZMO - 3D object manipulator / orientator, via mouse, with pan and dolly/zoom features
Stars: ✭ 36 (+12.5%)
Mutual labels:  sdl2
rpc
RPC-like client-service implementation over messaging queue
Stars: ✭ 26 (-18.75%)
Mutual labels:  rpc
sdl2-raycast
SDL2 C++ raycasting engine with vertical movement, floor/ceiling texture mapping and sprites.
Stars: ✭ 80 (+150%)
Mutual labels:  sdl2
ffi-sdl
PHP FFI SDL bindings
Stars: ✭ 23 (-28.12%)
Mutual labels:  sdl2
openmom
A cross-platform open source port of Master of Magic game from Microprose
Stars: ✭ 90 (+181.25%)
Mutual labels:  sdl2
elm-protobuf
protobuf plugin for elm
Stars: ✭ 93 (+190.63%)
Mutual labels:  rpc
thrift-typescript
Generate TypeScript from Thrift IDL files
Stars: ✭ 129 (+303.13%)
Mutual labels:  rpc
RRQMSocket
TouchSocket是.Net(包括 C# 、VB.Net、F#)的一个整合性的、超轻量级的网络通信框架。包含了 tcp、udp、ssl、http、websocket、rpc、jsonrpc、webapi、xmlrpc等一系列的通信模块。一键式解决 TCP 黏分包问题,udp大数据包分片组合问题等。使用协议模板,可快速实现「固定包头」、「固定长度」、「区间字符」等一系列的数据报文解析。
Stars: ✭ 286 (+793.75%)
Mutual labels:  rpc
monero-java
A Java library for using Monero
Stars: ✭ 76 (+137.5%)
Mutual labels:  rpc

libnvc

another c++-20 nvim msgpack-rpc client, nvim-0.5.0 tested.
nvim's rpc interface is convenient but not something you can finish in 10 minutes.
this repo creates libnvc.a and you can use it to read/write a process running neovim easily.

image

start nvim and use asio_socket to talk to it:

#include "libnvc.hpp"

int main()
{
    // start nvim:
    // $ nvim --listen "127.0.0.1:6666"
    libnvc::asio_socket socket;
    if(!socket.connect("localhost", 6666)){
        throw std::runtime_error("failed to connect to localhost:6666");
    }

    libnvc::api_client client(&socket);
    client.nvim_input("$i123<CR>123<ESC>");
    client.nvim_buf_set_name(1, "1234");

or use reproc_device to spawn a process running nvim in background:

#include "libnvc.hpp"

int main()
{
    // spawn nvim process with default parameters
    libnvc::reproc_device reproc_dev;
    reproc_dev.spawn();

    libnvc::api_client client(&reproc_dev);
    client.nvim_ui_attach(100, 80, {{"rgb", true}, {"ext_linegrid", true}});
    client.nvim_input("$i123<CR>123<ESC>");
    client.nvim_buf_set_name(1, "1234");

build

there is zero dependenct for user's building environment.
libnvc use asio, mpack and reproc internally but hiden by pimpl.

# build the libnvc library, nvim should be in your PATH
$ cd $HOME
$ git clone https://github.com/etorth/libnvc.git
$ mkdir b_libnvc && cd b_libnvc
$ cmake ../libnvc -DCMAKE_INSTALL_PREFIX=install -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11
$ make && make install

# build the sample project, a simple nvim gui
# this requires SDL2, SDL2-image and SDL2-ttf installed
$ cd $HOME
$ mkdir b_nvim_sdl2 && cd b_nvim_sdl2
$ cmake ../libnvc/sample/nvim_sdl2 -DCMAKE_INSTALL_PREFIX=install -DLIBNVC_INCLUDE=$HOME/b_libnvc/install/include -DLIBNVC_LIB=$HOME/b_libnvc/install/lib
$ make && make install

# run the sample gui
$ cd $HOME/b_nvim_sdl2/install/nvim_sdl2 && ./nvim_sdl2
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].