Skip to content

tableauio/loader

Repository files navigation

Loader

The official config loader for Tableau.

Prerequisites

TODO: devcontainer

  • C++ standard: at least C++17
  • Prepare and init:
    • macOS or Linux: bash init.sh
    • Windows:
      1. Run prepare.bat as Administrator to automatically install all build dependencies (Chocolatey, CMake, Ninja, and MSVC build tools), configure PATH, and initialize the MSVC compiler environment:
        .\prepare.bat

        ⚠️ Admin required: This script uses Chocolatey and MSI installers that write to system-protected directories (C:\ProgramData, C:\Program Files). Right-click Command Prompt → Run as administrator, then execute the script.

        Preview what the script would do without making any changes:

        .\prepare.bat --dry-run
      2. Run init.bat to initialize submodules and build protobuf:
        .\init.bat

      Note: prepare.bat only needs to be run once per machine. It detects already-installed tools and skips them — no manual Visual Studio, CMake, or Ninja installation required.

References

C++

Dev at Linux

  • Change dir: cd test/cpp-tableau-loader
  • Generate protoconf: bash ./gen.sh
  • CMake:
    • C++17: cmake -S . -B build
    • C++20: cmake -S . -B build -DCMAKE_CXX_STANDARD=20
    • clang: cmake -S . -B build -DCMAKE_CXX_COMPILER=clang++
  • Build: cmake --build build --parallel
  • Run: ./bin/loader

Dev at Windows

Important: CMake with Ninja requires MSVC environment variables (cl.exe, INCLUDE, LIB, etc.) to be active. Run .\prepare.bat from the loader root in the same cmd session before switching to the test directory. Opening a new terminal window will lose these variables.

  • Initialize MSVC environment (from loader root): .\prepare.bat
  • Change dir: cd test\cpp-tableau-loader, or change directory with Drive, e.g.: cd /D D:\GitHub\loader\test\cpp-tableau-loader
  • Generate protoconf: .\gen.bat
  • CMake:
    • C++17: cmake -S . -B build -G "Ninja"
    • C++20: cmake -S . -B build -G "Ninja" -DCMAKE_CXX_STANDARD=20
  • Build: cmake --build build --parallel
  • Run: .\bin\loader.exe

References

Go

  • Install: go1.21 or above
  • Install protoc-gen-go: go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
  • Change dir: cd test/go-tableau-loader
  • Generate protoconf: bash ./gen.sh
  • Run: go run .

References

C#

Requirements

  • Unity 2022.3 LTS (C# 9)
  • dotnet-sdk-8.0

Test

  • Install: dotnet-sdk-8.0
  • Change dir: cd test/csharp-tableau-loader
  • Generate protoconf: sh gen.sh
  • Test: dotnet run

TypeScript

Requirements

  • nodejs v16.0.0
  • protobufjs v7.2.3

Test

  • Change dir: cd test/ts-tableau-loader
  • Install depedencies: npm install
  • Generate protoconf: npm run generate
  • Test: npm run test

Problems in protobufjs:

protobufjs: Reflection vs. static code

If using reflection (.proto or JSON) but not static code, and for well-known types support, then proto3-json-serializer is a good option. This library implements proto3 JSON serialization and deserialization for protobuf.js protobuf objects according to the spec.

References:

About

The official config loader for Tableau.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors