1
0
Fork 0
mirror of https://github.com/anyproto/anytype-heart.git synced 2025-06-09 09:35:00 +09:00
Shared library for Anytype clients https://anytype.io
Find a file
2020-10-02 01:06:59 +03:00
.circleci Revert "ci: temp enable platforms builds in branches" 2020-09-14 10:20:13 +03:00
.github/ISSUE_TEMPLATE fix github issue templates location 2020-03-03 11:43:06 +02:00
anymark replace go-anytype-library with pkg/lib 2020-09-14 08:31:09 +03:00
change objectType changes, custom types dv queries, detailsHead->metaHead 2020-10-02 01:06:59 +03:00
clientlibrary objectType changes, custom types dv queries, detailsHead->metaHead 2020-10-02 01:06:59 +03:00
cmd/grpcserver replace go-anytype-library with pkg/lib 2020-09-14 08:31:09 +03:00
core objectType changes, custom types dv queries, detailsHead->metaHead 2020-10-02 01:06:59 +03:00
dist ci: remove separate lib packages 2020-06-26 17:42:37 +03:00
docs objectType changes, custom types dv queries, detailsHead->metaHead 2020-10-02 01:06:59 +03:00
pb objectType changes, custom types dv queries, detailsHead->metaHead 2020-10-02 01:06:59 +03:00
pkg/lib objectType changes, custom types dv queries, detailsHead->metaHead 2020-10-02 01:06:59 +03:00
util objectType changes, custom types dv queries, detailsHead->metaHead 2020-10-02 01:06:59 +03:00
.gitattributes lib.so moved to dist/ and updated 2019-09-26 22:56:33 +03:00
.gitignore refactor: rename client pkgs requires and fix makefile 2020-09-12 15:52:36 +03:00
.pre-commit-config.yaml Add precommit 2020-03-24 16:01:52 +03:00
go.mod Merge branch 'master' of github.com:anytypeio/go-anytype-middleware into feat-relations 2020-10-01 15:50:40 +03:00
go.sum merge 2020-09-30 18:55:16 +03:00
Makefile add relation protos to js/swift/java generators 2020-09-24 11:58:22 +03:00
package.json replace go-anytype-library with pkg/lib 2020-09-14 08:31:09 +03:00
README.md Merge branch 'master' of github.com:anytypeio/go-anytype-middleware into grpcweb 2020-06-26 23:41:22 +03:00
webpack.config.js add webpack umd library options 2020-06-22 16:22:28 +03:00

Anytype Middleware Library

CircleCI

Build from Source

  1. Install Golang 1.13.* from here
  2. Follow instructions below for the target systems

Build and install for the desktop client

  1. make install-dev-js to build the local server and copy it and protobuf binding into ../js-anytype

Build for iOS

  1. make build-ios to build the framework into dist/ios folder
  2. make protos-swift to generate swift protobuf bindings into dist/ios/pb

Build for Android

  1. make build-android to build the library into dist/android folder
  2. make protos-java to generate java protobuf bindings into dist/android/pb

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

Generate mocks:

make test-deps

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-server - builds proto files for grpc server, builds the binary and runs it
  • make build-server - builds proto files for grpc server and builds the binary into dist/server

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