1
0
Fork 0
mirror of https://github.com/anyproto/anytype-heart.git synced 2025-06-10 10:00:46 +09:00
Shared library for Anytype clients https://anytype.io
Find a file
Sergey Cherepanov 495acffb68
fix
2020-06-16 14:32:31 +03:00
.circleci Revert "ci: allow creating version from branch" 2020-05-01 18:32:00 +03:00
.github/ISSUE_TEMPLATE fix github issue templates location 2020-03-03 11:43:06 +02:00
anymark #382: string.replace stuff refactored 2020-05-07 18:31:09 +03:00
build generate switft protobuf bindings 2019-12-16 23:35:55 +02:00
change details heads 2020-06-15 16:21:04 +03:00
core fix 2020-06-16 14:32:31 +03:00
dist remove lfs file 2019-10-03 17:59:46 +03:00
docs details tree 2020-06-15 14:17:25 +03:00
jsaddon rework jsaddon test.js 2019-11-29 15:43:53 +02:00
lib merge 2020-05-26 14:22:01 +03:00
lib-debug fix lib-debug to stop on SIGINT/SIGTERM 2020-05-01 18:10:22 +03:00
pb details tree 2020-06-15 14:17:25 +03:00
util fix 2020-06-16 14:32:31 +03:00
.gitattributes lib.so moved to dist/ and updated 2019-09-26 22:56:33 +03:00
.gitignore fix account bugs and snapshot sync 2020-01-31 18:16:55 +02:00
.pre-commit-config.yaml Add precommit 2020-03-24 16:01:52 +03:00
go.mod short ids and optimize state apply 2020-06-11 15:12:56 +03:00
go.sum short ids and optimize state apply 2020-06-11 15:12:56 +03:00
Makefile cleanup 2020-03-30 17:14:48 +03:00
package.json add npm build:tsmodel 2020-04-22 11:39:07 +03:00
README.md update readme and makefile 2020-02-04 20:31:51 +02:00

Anytype Middleware Library

CircleCI

How to build

  1. Install Golang 1.13.* from here
  2. make setup to install deps
  3. make build-lib to build C-archived(lib.a + lib.h) library into dist folder
  4. make build-js to build NodeJS Addon into jsaddon/build
  5. npm install & npm build:ts to compile proto files for TS/JS into build/ts
  6. make install-dev-js to copy the compiled NodeJS addon and protobuf binding into ../js-anytype

Rebuild protobuf generated files

This repo uses custom protoc located at anytypeio/protobuf. It adds gomobile plugin and some env-controlled options to control the generated code style.

This protobuf generator will replace your protoc binary, BTW it doesn't have any breaking changes for other protobuf and grpc code

You can install it with a simple command:

make setup-protoc

Then you can easily regenerate proto files:

make protos

Run tests

GO test:

make test

NodeJS addon test:

cd jsaddon
npm run test

Run local gRPC server to debug

⚠️ Make sure to update/install protobuf compiler from this repo using make setup-protoc

Commands:

  • make run-debug - builds proto files for grpc server, builds the binary and runs it
  • make build-debug - builds proto files for grpc server and builds the binary into dist/debug

If you want to change the default port(9999):

ANYTYPE_GRPC_ADDR=127.0.0.1:8888 make run-debug


Useful tools for debug:

GUI

https://github.com/uw-labs/bloomrpc

HowTo: Set the import path to the middleware root, then select commands.proto file

CLI

https://github.com/njpatel/grpcc