Skip to content

Albacore/bazel_rules_fsharp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

F# Bazel rules

This is forked from https://github.com/bazelbuild/rules_dotnet and quick-patched to work with fsharp.

Tested on linux, maybe it works on OSX, Windows not supported yet.

Usage

WORKSPACE file:

git_repository(
    name = "io_bazel_rules_dotnet_fsharp",
    remote = "https://github.com/jindraivanek/bazel_rules_fsharp.git",
    tag = "0.0.2",
)

load(
    "@io_bazel_rules_dotnet_fsharp//dotnet:fsharp.bzl",
    "fsharp_repositories",
)

fsharp_repositories(use_local_mono = True)

Examples of BUILD files

fsharp_library

load(
    "@io_bazel_rules_dotnet_fsharp//dotnet:fsharp.bzl",
    "fsharp_binary",
)

fsharp_library(
    name = "lib",
    srcs = ["lib.fs"],
    deps = ["//someLib"],
)

fsharp_binary

load(
    "@io_bazel_rules_dotnet_fsharp//dotnet:fsharp.bzl",
    "fsharp_binary",
)

fsharp_binary(
    name = "MyApp",
    srcs = ["MyApp.fs"],
    deps = ["//lib"],
)

Experimental Paket support

Add "paket_dependencies" to load in WORKSPACE and following:

paket_dependencies(
    name = "paket_deps",
    deps = """
source https://nuget.org/api/v2
framework: net46
nuget ExtCore
nuget Argu
    """,
)

where deps is contents of generated paket.dependencies file.

Then you can reference all packages with "@paket_deps//:dylibs" in deps attribute.

Packages

No packages published

Languages

  • Python 98.5%
  • Smarty 1.5%