图特尔的逻辑核心,由Rust所建. 为嵌入到其他平台(桌面,可移动,可能是浏览器 w/ Emscripten)而制作.
(the failing New York Test)
Opening an issue? See the Turtl project tracker
This is the Rust core for Turtl. It houses the logic for Turtl's main client operations and is meant to be embedded as a shared/static library that is standard across all platforms. The idea is, if it can go in the core, it should go in the core. Pretty much everything except UI goes here:
When building a UI (Android/iOS/Desktop/etc etc) you should have to worry about two things: loading/talking to the core and building the interface around the core. All logic (syncing/crypto/storage) lives in the core.
Although the core project is posted, the new server it talks to (NodeJS/Postgres) is not yet public (yes, a fond farewell to Lisp). Stay tuned!
This project is unfinished and alpha status. I won't be responding to issues or bug reports on it yet. Use at your own risk.
Let's go over how to build the Turtl core.
makeThe Makefile includes (optionally) a non-versioned file called vars.mk which
can be used to house any ENV vars specific to your build environment:
# Example vars.mk
export PATH := $(PATH):/your/custom/path
export RUSTFLAGS := -L/opt/lib64 -lmylib
export SODIUM_LIB_DIR := /opt/libsodium/lib
export SODIUM_STATIC := static
export OPENSSL_LIB_DIR=/usr/lib/openssl-1.0
export OPENSSL_INCLUDE_DIR=/usr/include/openssl-1.0NOTE: If your system uses OpenSSL 1.1.0, you need to install OpenSSL 1.0.0 and
tell make to use it with OPENSSL_LIB_DIR=/usr/lib/openssl-1.0 OPENSSL_INCLUDE_DIR=/usr/include/openssl-1.0 make
for example. This would be a good place to use vars.mk.
NOTE 2: If your system has libsodium version different than 1.0.16 and your build fails, do this:
cargo build
wget https://download.libsodium.org/libsodium/releases/old/libsodium-1.0.16.tar.gz
tar xzf libsodium-1.0.16.tar.gz
cd libsodium-1.0.16
./configure
make
cp -r src/libsodium/.libs/* ../target/debug/deps/
cargo buildAfter every cargo clean or make clean you should do the last command
This section is a work in progress. To use the Turtl core embedded library, you'll have to know two things:
This is a haphazard collection of random notes with no real organization. Sorry.
--enable-minimal!! This is worth noting because libsodium/src/dist-build/ios.sh
uses --enable-minimal when building...remove these directives before building
libsodium!暂无开放 Issues,或尚未同步最近议题。