Git Product home page Git Product logo

tulsi's Introduction

Tulsi - an Xcode Project Generator For Bazel

Build Status

tulsi - /ˈto͝olsē/ A kind of basil that is venerated by Hindus as a sacred plant.

Building and installing

  1. Check .bazelrc to see if the Xcode version used by Tulsi is installed locally. If it isn't, feel free to remove the --xcode_version flag or modify it as you wish, but note that Tulsi may not build correctly with different versions of Xcode.
  2. Run build_and_run.sh. This will install Tulsi.app inside ~/Applications.

Notes

Tulsi-generated Xcode projects use Bazel to build, not Xcode via xcbuild. This means that many common components of an Xcode project are handled differently than you may be used to. Notable differences:

  • BUILD files are the source of truth; most changes made to your Xcode project won't affect the build.
    • Adding new sources to the Xcode project won't include them in your app; they must be added to BUILD files.
    • Changes made to your BUILD files, such as adding new library dependencies, are incorporated automatically when building your generated project. The only time you need to re-run Tulsi is if you want to add additional build targets or have new source files show up in Xcode for editing.
    • The Info.plist file is governed entirely by BUILD rules in Bazel and is not displayed in the Xcode UI.
    • Changes to compilation flags (i.e. -DHELLO) should be made in the BUILD files in order to affect the build; changes made to compilation settings in the Xcode UI will only affect indexing. You may want to regenerate your project using Tulsi after modifying compilation flags.
  • Tulsi will set some Tulsi-specific flags for bazel invocations, some of which may affect Bazel caching. In order to maximize cache re-use when building from the command line, try using the user_build.py script which is located in the generated xcodeproj at <xcodeproj>/.tulsi/Scripts/user_build.py.

Tulsi project and config settings

Tulsi projects contain a few settings which control various behaviors during project generation and builds.

  • Bazel build flags, customizable per compilation mode (dbg and opt)
  • Bazel build startup flags, also customizable per compilation mode
  • Generation platform configuration: Target platform and arch used during project generation.
    • Can change from targeting iOS sim to iOS device or from iOS to macOS. Setting this improperly shouldn't break your project although it may potentially worsen generation and build performance.
  • Generation compilation mode: Bazel compilation mode (dbg or opt, no fastbuild) used during project generation.
    • Defaults to dbg, swap to opt if you normally build Release builds in Xcode (i.e. profiling your app). Setting this improperly shouldn't break your project although it may potentially worsen generation and build performance.
  • Prioritize Swift: set this to inform Tulsi that it should use Swift-specific flags during project generation.
    • Defaults to No, swap to Yes if your project contains Swift (even in its dependencies). Setting this improperly shouldn't break your project although it may potentially worsen generation and build performance.

tulsi's People

Contributors

andybons avatar davidgoldman avatar davidzchen avatar dflems avatar dierksen avatar dslomov avatar hlopko avatar ivanhernandez13 avatar jdelfino avatar jfaust avatar keith avatar kelvinchan-google avatar nglevin avatar plu avatar ravimandala avatar reinhillmann avatar sergiocampama avatar thii avatar thomasvl avatar vladmos avatar vmsp avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.