leveldb

(★ 39,347)

LevelDB는 문자열 키에서 문자열 값으로의 순서화된 매핑을 제공하는, Google에서 작성한 빠른 키-값 저장소 라이브러리입니다.

파일 탐색기

  • .clang-format
  • .gitignore
  • .gitmodules
  • AUTHORS
  • CMakeLists.txt
  • CONTRIBUTING.md
  • LICENSE
  • NEWS
  • README.md
  • TODO

# 설치 가이드

cmake
사전 준비물

설치 및 실행 절차

git clone --recurse-submodules https://github.com/google/leveldb.git

서브모듈을 포함하여 레포지토리를 클론합니다.

mkdir -p build && cd build

빌드 디렉토리를 생성하고 이동합니다.

cmake -DCMAKE_BUILD_TYPE=Release ..

Release 모드로 CMake 프로젝트를 설정합니다.

cmake --build .

프로젝트를 빌드합니다.

핵심 명령어

cmake -DCMAKE_BUILD_TYPE=Release ..

릴리스 빌드를 위해 CMake 구성을 생성합니다.

cmake --build .

설정된 빌드 파일들을 바탕으로 바이너리를 컴파일합니다.

Windows 환경에서는 Visual Studio 2017 이상을 사용하여 CMake 솔루션을 생성하고 빌드할 수 있습니다.

# CDN으로 사용하기

jsDelivr

jsDelivr는 공개 GitHub 리포지토리를 별도 설정 없이 CDN으로 즉시 서빙합니다. 버전과 파일을 고르면 웹페이지에 바로 붙일 수 있는 링크와 예시 코드가 만들어집니다.

명령어 용어집

이 문서에서 사용된 명령어를 모아봤습니다. 낯선 명령어가 있다면 펼쳐서 확인해보세요.

🔍

clang-format

설명 보기 ▼

C/C++/Java/JavaScript/Objective-C/Protobuf/C# 코드 자동 형식화.
더 많은 정보: <https://clang.llvm.org/docs/ClangFormat.html>.

clang-format {{path/to/file}}

파일 형식을 지정하고 결과를 `stdout`으로 출력:

clang-format -i {{path/to/file}}

그 자리에서 파일 형식을 지정:

clang-format --style {{LLVM|GNU|Google|Chromium|Microsoft|Mozilla|WebKit}} {{path/to/file}}

미리 정의된 코딩 스타일을 사용하여 파일 형식을 지정:

🔍

cmake

설명 보기 ▼

네이티브 빌드 시스템을 위한 빌드 설정 파일을 생성하는, 크로스 플랫폼 빌드 자동화 도구.
더 많은 정보: <https://cmake.org/cmake/help/latest/manual/cmake.1.html>.

cmake {{path/to/project_directory}}

프로젝트 디렉터리의 `CMakeLists.txt`를 사용해 현재 디렉터리에 빌드 설정을 생성:

cmake --build {{path/to/build_directory}}

지정한 디렉터리의 빌드 설정을 사용해 빌드 산출물을 생성:

cmake --install {{path/to/build_directory}} --strip

빌드 산출물을 `/usr/local/`에 설치하고 디버그 심볼을 제거:

🔍

devenv

설명 보기 ▼

Nix를 사용하여 빠르고, 선언적이며, 재현 가능하고 구성 가능한 개발자 환경을 의미.
더 많은 정보: <https://devenv.sh/getting-started/#commands>.

devenv init

환경 초기화:

devenv shell --impure

완화된 기밀성 (밀폐된 상태)로 개발 환경에 진입:

devenv info --verbose

현재 환경에 대한 자세한 정보를 얻기:

🔍

git clone

설명 보기 ▼

Clone an existing repository.

git clone {{remote_repository_location}} {{path/to/directory}}

Clone an existing repository into a new directory (the default directory is the repository name):

git clone --recursive {{remote_repository_location}}

Clone an existing repository and its submodules:

git clone {{[-n|--no-checkout]}} {{remote_repository_location}}

Clone only the `.git` directory of an existing repository:

// repository documentation