mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Remove rocksdb usage from fift (#1064)
* add github action for macOS 14 (arm64, M1) * add github action (portable) for macOS 14 (arm64, M1) * rename macOS arm64 output artifact * Update libsodium on windows * Compile libsodium * Update build-windows.bat * use upgraded libsodium 1.0.20; use compiled static libsodium for Windows instead of precompiled; * revert libsodium 1.0.20; use compiled static libsodium for Windows instead of precompiled; * use upgraded libsodium 1.0.20; use compiled static libsodium for Windows instead of precompiled; * fix libsodium version 1.0.19; use compiled static libsodium for Windows instead of precompiled; * try 1.0.20 libsodium precompiled on github * try 1.0.18 libsodium precompiled on github * try windows build on win server 2019 * and use PlatformToolset=v142 * use cmake -G "Visual Studio 16 2019" * fix path to msvc 2019 on github * separate github windows build on win server 2019 and build on win server 2022 * Update assembly/native/build-windows-2019.bat add retry mechanism Co-authored-by: Dr. Awesome Doge <doge@ton.org> * add test-emulator; disable test groovy pipeline * trigger all gh actions * fix win build * call test-emulator * remove usage of rocksdb in fift-lib * put back some code for test-db * fix test-emulator * remove usage of db-path parameter in fift * some func adjustments * fix checkout of openssl in fift-func-wasm-build-ubuntu.sh * typo * improve wasm build script for quicker turn around * remove sENVIRONMENT=web,worker for funcfiftlib. will be added later. * remove sENVIRONMENT=web,worker for funcfiftlib. will be added later. * remove sENVIRONMENT=web,worker for funcfiftlib. will be added later. * minor adjustments * remove -d option in fift; optimize fift-lib usage * reduce tondb usage --------- Co-authored-by: neodiX <neodix42@ton.org> Co-authored-by: Dr. Awesome Doge <doge@ton.org> Co-authored-by: ms <dungeon666master@protonmail.com>
This commit is contained in:
parent
28f9a9b159
commit
679e6be294
12 changed files with 122 additions and 328 deletions
|
@ -46,8 +46,6 @@
|
|||
#include "SourceLookup.h"
|
||||
#include "words.h"
|
||||
|
||||
#include "vm/db/TonDb.h"
|
||||
|
||||
#include "td/utils/logging.h"
|
||||
#include "td/utils/misc.h"
|
||||
#include "td/utils/Parser.h"
|
||||
|
@ -65,7 +63,6 @@ void usage(const char* progname) {
|
|||
"\t-I<source-search-path>\tSets colon-separated (unix) or at-separated (windows) library source include path. If not indicated, "
|
||||
"$FIFTPATH is used instead.\n"
|
||||
"\t-L<library-fif-file>\tPre-loads a library source file\n"
|
||||
"\t-d<ton-db-path>\tUse a ton database\n"
|
||||
"\t-s\tScript mode: use first argument as a fift source file and import remaining arguments as $n)\n"
|
||||
"\t-v<verbosity-level>\tSet verbosity level\n"
|
||||
"\t-V<version>\tShow fift build information\n";
|
||||
|
@ -94,13 +91,12 @@ int main(int argc, char* const argv[]) {
|
|||
bool script_mode = false;
|
||||
std::vector<std::string> library_source_files, source_list;
|
||||
std::vector<std::string> source_include_path;
|
||||
std::string ton_db_path;
|
||||
|
||||
fift::Fift::Config config;
|
||||
|
||||
int i;
|
||||
int new_verbosity_level = VERBOSITY_NAME(INFO);
|
||||
while (!script_mode && (i = getopt(argc, argv, "hinI:L:d:sv:V")) != -1) {
|
||||
while (!script_mode && (i = getopt(argc, argv, "hinI:L:sv:V")) != -1) {
|
||||
switch (i) {
|
||||
case 'i':
|
||||
interactive = true;
|
||||
|
@ -115,9 +111,6 @@ int main(int argc, char* const argv[]) {
|
|||
case 'L':
|
||||
library_source_files.emplace_back(optarg);
|
||||
break;
|
||||
case 'd':
|
||||
ton_db_path = optarg;
|
||||
break;
|
||||
case 's':
|
||||
script_mode = true;
|
||||
break;
|
||||
|
@ -158,16 +151,6 @@ int main(int argc, char* const argv[]) {
|
|||
config.source_lookup.add_include_path(path);
|
||||
}
|
||||
|
||||
if (!ton_db_path.empty()) {
|
||||
auto r_ton_db = vm::TonDbImpl::open(ton_db_path);
|
||||
if (r_ton_db.is_error()) {
|
||||
LOG(ERROR) << "Error opening ton database: " << r_ton_db.error().to_string();
|
||||
std::exit(2);
|
||||
}
|
||||
config.ton_db = r_ton_db.move_as_ok();
|
||||
// FIXME //std::atexit([&] { config.ton_db.reset(); });
|
||||
}
|
||||
|
||||
fift::init_words_common(config.dictionary);
|
||||
fift::init_words_vm(config.dictionary, true); // enable vm debug
|
||||
fift::init_words_ton(config.dictionary);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue