Skip to content

jindraivanek/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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published