GithubHelp home page GithubHelp logo

jonyfang / bis Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xinzhengzhang/bis

0.0 0.0 0.0 321 KB

Bazel rule for development in the Apple ecosystem through the C family(including swift) language

Python 12.61% TypeScript 70.69% Starlark 16.70%

bis's Introduction

bis

Bazel rules and plugin for developing iOS project on vscode

Bzlmod

# MODULE.bazel
bazel_dep(name = "bis", version = "0.3.4", dev_dependency = True)
archive_override(
    module_name = "bis",
    urls = "https://github.com/xinzhengzhang/bis/archive/refs/tags/0.3.4.tar.gz",
    strip_prefix = "bis-0.3.4"
)

Non-bzlmod

# WORKSPACE
load('@bazel_tools//tools/build_defs/repo:git.bzl', 'git_repository')

git_repository(
    name = "bis",
    remote = "[email protected]:xinzhengzhang/bis.git",
    tag = "0.3.4",
)

load("@bis//:repositories.bzl", "bis_rules_dependencies")

bis_rules_dependencies()

Setup

Install bis plugin

code --install-extension zxz-moe.zxz-moe-bis

How to use

These independent rules are too complicated, it is recommended to use them in combination with plugin.

See README of plugin


If you insist on independent use, the following are simple ways to use it.

cd examples
# Extract for single file
bazel run @bis//:setup -- --target //srcs/ios:App --optionals "--compilation_mode=dbg --cpu="ios_x86_64" --features=oso_prefix_is_pwd" --file_path srcs/ios/app.swift
# Extract for whole target
bazel run @bis//:setup -- --target //srcs/ios:App --optionals "--compilation_mode=dbg --cpu="ios_x86_64" --features=oso_prefix_is_pwd"
# Build sub target
bazel build //srcs/ios:App --compilation_mode=dbg --cpu=ios_x86_64 --features=oso_prefix_is_pwd --aspects=@bis//:bisproject_aspect.bzl%bis_aspect --output_groups="bis artifacts @@//srcs/ios:lib"
# Build app
bazel build //srcs/ios:App --compilation_mode=dbg --cpu=ios_x86_64 --features=oso_prefix_is_pwd --aspects=@bis//:bisproject_aspect.bzl%bis_aspect --output_groups="bis artifacts @@//srcs/ios:App"
# Build index dependents for sub target
bazel  build //srcs/ios:App --compilation_mode=dbg --cpu=ios_x86_64 --features=oso_prefix_is_pwd --aspects=@bis//:bisproject_aspect.bzl%bis_aspect --output_groups="bis all index dependents @@//srcs/ios:lib"
# Build  index dependents for whole target
bazel build //srcs/ios:App --compilation_mode=dbg --cpu=ios_x86_64 --features=oso_prefix_is_pwd --aspects=@bis//:bisproject_aspect.bzl%bis_aspect --output_groups="bis all index dependents @@//srcs/ios:App"

Components

Targets

@bis//:setup


Create .bis/BUILD into WORKSPACE. This step is done automatically by the plugin

* Usage
```
bazel run @bis//:setup -- -h

Arguments:
    -h, --help            show this help message and exit
    --optionals OPTIONALS
                            --compilation_mode=dbg --cpu=ios_x86_64
    --target TARGET       target labels
    --file_path FILE_PATH
                            source code path
    --ignore_parsing_targets IGNORE_PARSING_TARGETS
                            skip searching compile targets
``` 

Rules

refresh_compile_commands


Wrapper of https://github.com/hedronvision/bazel-compile-commands-extractor. We use it for hidding visibility under bzlmod.

refresh_launch_json


Create .vscode/launch.json for vscode plugins

  • target: ios_application
  • pre_launch_task_name: pre_launch_task_name add in .vscode/launch.json

Thanks to

  • zhao han - For his excellent icon design

bis's People

Contributors

xinzhengzhang avatar ilibilib avatar yrom avatar ihomway 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.