Working F# compilation

This commit is contained in:
Daniel P. Purkhus 2021-04-16 21:18:17 +00:00
parent 3e22e74a13
commit 53472e9fef
15 changed files with 1032 additions and 3 deletions

View File

@ -96,7 +96,7 @@ load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
grpc_deps()
#
# C#
# C#/F#
#
load("//csharp:repositories.bzl", "csharp_repos")
@ -116,9 +116,13 @@ dotnet_register_toolchains()
dotnet_repositories_nugets()
load("@rules_proto_grpc//csharp/nuget:nuget.bzl", "nuget_rules_proto_grpc_packages")
load("@rules_proto_grpc//csharp/nuget:nuget.bzl", nuget_rules_proto_grpc_packages_csharp = "nuget_rules_proto_grpc_packages")
nuget_rules_proto_grpc_packages()
nuget_rules_proto_grpc_packages_csharp()
load("@rules_proto_grpc//fsharp/nuget:nuget.bzl", nuget_rules_proto_grpc_packages_fsharp = "nuget_rules_proto_grpc_packages")
nuget_rules_proto_grpc_packages_fsharp()
#
# D

30
fsharp/BUILD.bazel Normal file
View File

@ -0,0 +1,30 @@
load("//:defs.bzl", "proto_plugin")
proto_plugin(
name = "fsharp_plugin",
options = ["no_server", "no_client"],
outputs = ["{basename|pascal}.fs"],
protoc_plugin_name = "fsharp",
separate_options_flag = True,
tool = ":wrapper",
visibility = ["//visibility:public"],
)
proto_plugin(
name = "grpc_fsharp_plugin",
options = [""],
outputs = ["{basename|pascal}.fs"],
protoc_plugin_name = "fsharp",
separate_options_flag = True,
tool = ":wrapper",
visibility = ["//visibility:public"],
)
sh_binary(
name = "wrapper",
srcs = ["wrapper.sh"],
data = [
"@bazel_tools//tools/bash/runfiles",
"@protoc-gen-fsharp//:bin",
],
)

12
fsharp/defs.bzl Normal file
View File

@ -0,0 +1,12 @@
"""fsharp protobuf and grpc rules."""
load(":fsharp_proto_compile.bzl", _fsharp_proto_compile = "fsharp_proto_compile")
load(":fsharp_grpc_compile.bzl", _fsharp_grpc_compile = "fsharp_grpc_compile")
load(":fsharp_proto_library.bzl", _fsharp_proto_library = "fsharp_proto_library")
load(":fsharp_grpc_library.bzl", _fsharp_grpc_library = "fsharp_grpc_library")
# Export fsharp rules
fsharp_proto_compile = _fsharp_proto_compile
fsharp_grpc_compile = _fsharp_grpc_compile
fsharp_proto_library = _fsharp_proto_library
fsharp_grpc_library = _fsharp_grpc_library

View File

@ -0,0 +1,68 @@
"""Generated definition of fsharp_grpc_compile."""
load("@rules_proto//proto:defs.bzl", "ProtoInfo")
load(
"//:defs.bzl",
"ProtoLibraryAspectNodeInfo",
"ProtoPluginInfo",
"proto_compile_aspect_attrs",
"proto_compile_aspect_impl",
"proto_compile_attrs",
"proto_compile_impl",
)
# Create aspect for fsharp_grpc_compile
fsharp_grpc_compile_aspect = aspect(
implementation = proto_compile_aspect_impl,
provides = [ProtoLibraryAspectNodeInfo],
attr_aspects = ["deps"],
attrs = dict(
proto_compile_aspect_attrs,
_plugins = attr.label_list(
doc = "List of protoc plugins to apply",
providers = [ProtoPluginInfo],
default = [
Label("//fsharp:grpc_fsharp_plugin"),
],
),
_prefix = attr.string(
doc = "String used to disambiguate aspects when generating outputs",
default = "fsharp_grpc_compile_aspect",
),
),
toolchains = [str(Label("//protobuf:toolchain_type"))],
)
# Create compile rule
_rule = rule(
implementation = proto_compile_impl,
attrs = dict(
proto_compile_attrs,
protos = attr.label_list(
mandatory = False, # TODO: set to true in 4.0.0 when deps removed below
providers = [ProtoInfo],
doc = "List of labels that provide the ProtoInfo provider (such as proto_library from rules_proto)",
),
deps = attr.label_list(
mandatory = False,
providers = [ProtoInfo, ProtoLibraryAspectNodeInfo],
aspects = [fsharp_grpc_compile_aspect],
doc = "DEPRECATED: Use protos attr",
),
_plugins = attr.label_list(
providers = [ProtoPluginInfo],
default = [
Label("//fsharp:grpc_fsharp_plugin"),
],
doc = "List of protoc plugins to apply",
),
),
toolchains = [str(Label("//protobuf:toolchain_type"))],
)
# Create macro for converting attrs and passing to compile
def fsharp_grpc_compile(**kwargs):
_rule(
verbose_string = "{}".format(kwargs.get("verbose", 0)),
**kwargs
)

View File

@ -0,0 +1,34 @@
"""Generated definition of fsharp_grpc_library."""
load("//fsharp:fsharp_grpc_compile.bzl", "fsharp_grpc_compile")
load("//internal:compile.bzl", "proto_compile_attrs")
load("@io_bazel_rules_dotnet//dotnet:defs.bzl", "fsharp_library")
def fsharp_grpc_library(name, **kwargs):
# Compile protos
name_pb = name + "_pb"
fsharp_grpc_compile(
name = name_pb,
**{
k: v
for (k, v) in kwargs.items()
if k in ["protos" if "protos" in kwargs else "deps"] + proto_compile_attrs.keys()
} # Forward args
)
# Create fsharp library
fsharp_library(
name = name,
srcs = [name_pb],
deps = GRPC_DEPS + (kwargs.get("deps", []) if "protos" in kwargs else []),
visibility = kwargs.get("visibility"),
tags = kwargs.get("tags"),
)
GRPC_DEPS = [
"@google.protobuf//:lib",
"@grpc.core//:lib",
"@fsharp.core//:lib",
"@protobuf.fsharp//:lib",
"@core_sdk_stdlib//:libraryset",
]

View File

@ -0,0 +1,68 @@
"""Generated definition of fsharp_proto_compile."""
load("@rules_proto//proto:defs.bzl", "ProtoInfo")
load(
"//:defs.bzl",
"ProtoLibraryAspectNodeInfo",
"ProtoPluginInfo",
"proto_compile_aspect_attrs",
"proto_compile_aspect_impl",
"proto_compile_attrs",
"proto_compile_impl",
)
# Create aspect for fsharp_proto_compile
fsharp_proto_compile_aspect = aspect(
implementation = proto_compile_aspect_impl,
provides = [ProtoLibraryAspectNodeInfo],
attr_aspects = ["deps"],
attrs = dict(
proto_compile_aspect_attrs,
_plugins = attr.label_list(
doc = "List of protoc plugins to apply",
providers = [ProtoPluginInfo],
default = [
Label("//fsharp:fsharp_plugin"),
],
),
_prefix = attr.string(
doc = "String used to disambiguate aspects when generating outputs",
default = "fsharp_proto_compile_aspect",
),
),
toolchains = [str(Label("//protobuf:toolchain_type"))],
)
# Create compile rule
_rule = rule(
implementation = proto_compile_impl,
attrs = dict(
proto_compile_attrs,
protos = attr.label_list(
mandatory = False, # TODO: set to true in 4.0.0 when deps removed below
providers = [ProtoInfo],
doc = "List of labels that provide the ProtoInfo provider (such as proto_library from rules_proto)",
),
deps = attr.label_list(
mandatory = False,
providers = [ProtoInfo, ProtoLibraryAspectNodeInfo],
aspects = [fsharp_proto_compile_aspect],
doc = "DEPRECATED: Use protos attr",
),
_plugins = attr.label_list(
providers = [ProtoPluginInfo],
default = [
Label("//fsharp:fsharp_plugin"),
],
doc = "List of protoc plugins to apply",
),
),
toolchains = [str(Label("//protobuf:toolchain_type"))],
)
# Create macro for converting attrs and passing to compile
def fsharp_proto_compile(**kwargs):
_rule(
verbose_string = "{}".format(kwargs.get("verbose", 0)),
**kwargs
)

View File

@ -0,0 +1,33 @@
"""Generated definition of fsharp_proto_library."""
load("//fsharp:fsharp_proto_compile.bzl", "fsharp_proto_compile")
load("//internal:compile.bzl", "proto_compile_attrs")
load("@io_bazel_rules_dotnet//dotnet:defs.bzl", "fsharp_library")
def fsharp_proto_library(name, **kwargs):
# Compile protos
name_pb = name + "_pb"
fsharp_proto_compile(
name = name_pb,
**{
k: v
for (k, v) in kwargs.items()
if k in ["protos" if "protos" in kwargs else "deps"] + proto_compile_attrs.keys()
} # Forward args
)
# Create fsharp library
fsharp_library(
name = name,
srcs = [name_pb],
deps = PROTO_DEPS + (kwargs.get("deps", []) if "protos" in kwargs else []),
visibility = kwargs.get("visibility"),
tags = kwargs.get("tags"),
)
PROTO_DEPS = [
"@google.protobuf//:lib",
"@fsharp.core//:lib",
"@protobuf.fsharp//:lib",
"@core_sdk_stdlib//:libraryset",
]

0
fsharp/nuget/BUILD.bazel Normal file
View File

5
fsharp/nuget/README.md Normal file
View File

@ -0,0 +1,5 @@
This directory contains a script to generate the nuget.bzl file, which declares the nuget protobuf and grpc dependencies.
After running this script one must manually update the grpc.core `nuget_package` rule `core_files` attribute with the runtime libraries.
To inspect these files, `(cd $(bazel info output_base)/external/grpc.core && find runtimes/)` and copy those file paths into the attribute.

614
fsharp/nuget/nuget.bzl Normal file
View File

@ -0,0 +1,614 @@
"""Generated nuget packages"""
load("@io_bazel_rules_dotnet//dotnet:defs.bzl", "nuget_package", "dotnet_nuget_new")
# Backwards compatibility definitions
def nuget_protobuf_packages():
nuget_rules_proto_grpc_packages()
def nuget_grpc_packages():
nuget_rules_proto_grpc_packages()
def no_op():
# Function that does nothing, to be placeholder in below function. This prevents it being a
# syntax error when nuget2bazel is first run
pass
def nuget_rules_proto_grpc_packages():
"""Nuget packages"""
no_op()
### Generated by the tool
nuget_package(
name = "system.buffers",
package = "system.buffers",
version = "4.5.1",
sha256 = "c30b3dd2c7e2f4cee4b823d692fd42118309b42ab1f5007f923d329a5b0d6b12",
)
nuget_package(
name = "system.numerics.vectors",
package = "system.numerics.vectors",
version = "4.5.0",
sha256 = "a9d49320581fda1b4f4be6212c68c01a22cdf228026099c20a8eabefcf90f9cf",
)
nuget_package(
name = "system.runtime.compilerservices.unsafe",
package = "system.runtime.compilerservices.unsafe",
version = "4.7.1",
sha256 = "52fca80d5f0ed286371cf1b519b039e9855dbf04c611f8d8479816d4eec82b85",
core_lib = {
"netcoreapp2.0": "lib/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.dll",
"netcoreapp2.1": "lib/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.dll",
"netcoreapp2.2": "lib/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.dll",
"netcoreapp3.0": "lib/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.dll",
"netcoreapp3.1": "lib/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.dll",
"net5.0": "lib/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.dll",
},
core_ref = {
"netcoreapp2.0": "ref/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll",
"netcoreapp2.1": "ref/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll",
"netcoreapp2.2": "ref/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll",
"netcoreapp3.0": "ref/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll",
"netcoreapp3.1": "ref/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll",
"net5.0": "ref/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll",
},
core_files = {
"netcoreapp2.0": [
"lib/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.dll",
"lib/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.xml",
],
"netcoreapp2.1": [
"lib/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.dll",
"lib/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.xml",
],
"netcoreapp2.2": [
"lib/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.dll",
"lib/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.xml",
],
"netcoreapp3.0": [
"lib/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.dll",
"lib/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.xml",
],
"netcoreapp3.1": [
"lib/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.dll",
"lib/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.xml",
],
"net5.0": [
"lib/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.dll",
"lib/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.xml",
],
},
)
nuget_package(
name = "system.memory",
package = "system.memory",
version = "4.5.4",
sha256 = "dec0847f33b8823e4260672d97d657411461c00ada3107ec7bbcb32a845eeb91",
core_lib = {
"netcoreapp2.0": "lib/netstandard2.0/System.Memory.dll",
},
core_deps = {
"netcoreapp2.0": [
"@system.runtime.compilerservices.unsafe//:netcoreapp2.0_core",
],
},
core_files = {
"netcoreapp2.0": [
"lib/netstandard2.0/System.Memory.dll",
"lib/netstandard2.0/System.Memory.xml",
],
},
)
nuget_package(
name = "google.protobuf",
package = "google.protobuf",
version = "3.15.3",
sha256 = "62caf0a9974f774cf52810aff86758921ec5c7c5edc178bf7671c982f2592471",
core_lib = {
"netcoreapp2.0": "lib/netstandard2.0/Google.Protobuf.dll",
"netcoreapp2.1": "lib/netstandard2.0/Google.Protobuf.dll",
"netcoreapp2.2": "lib/netstandard2.0/Google.Protobuf.dll",
"netcoreapp3.0": "lib/netstandard2.0/Google.Protobuf.dll",
"netcoreapp3.1": "lib/netstandard2.0/Google.Protobuf.dll",
"net5.0": "lib/netstandard2.0/Google.Protobuf.dll",
},
core_deps = {
"netcoreapp2.0": [
"@system.memory//:netcoreapp2.0_core",
"@system.runtime.compilerservices.unsafe//:netcoreapp2.0_core",
],
"netcoreapp2.1": [
"@system.memory//:netcoreapp2.1_core",
"@system.runtime.compilerservices.unsafe//:netcoreapp2.1_core",
],
"netcoreapp2.2": [
"@system.memory//:netcoreapp2.2_core",
"@system.runtime.compilerservices.unsafe//:netcoreapp2.2_core",
],
"netcoreapp3.0": [
"@system.memory//:netcoreapp3.0_core",
"@system.runtime.compilerservices.unsafe//:netcoreapp3.0_core",
],
"netcoreapp3.1": [
"@system.memory//:netcoreapp3.1_core",
"@system.runtime.compilerservices.unsafe//:netcoreapp3.1_core",
],
"net5.0": [
"@system.memory//:net5.0_core",
"@system.runtime.compilerservices.unsafe//:net5.0_core",
],
},
core_files = {
"netcoreapp2.0": [
"lib/netstandard2.0/Google.Protobuf.dll",
"lib/netstandard2.0/Google.Protobuf.pdb",
"lib/netstandard2.0/Google.Protobuf.xml",
],
"netcoreapp2.1": [
"lib/netstandard2.0/Google.Protobuf.dll",
"lib/netstandard2.0/Google.Protobuf.pdb",
"lib/netstandard2.0/Google.Protobuf.xml",
],
"netcoreapp2.2": [
"lib/netstandard2.0/Google.Protobuf.dll",
"lib/netstandard2.0/Google.Protobuf.pdb",
"lib/netstandard2.0/Google.Protobuf.xml",
],
"netcoreapp3.0": [
"lib/netstandard2.0/Google.Protobuf.dll",
"lib/netstandard2.0/Google.Protobuf.pdb",
"lib/netstandard2.0/Google.Protobuf.xml",
],
"netcoreapp3.1": [
"lib/netstandard2.0/Google.Protobuf.dll",
"lib/netstandard2.0/Google.Protobuf.pdb",
"lib/netstandard2.0/Google.Protobuf.xml",
],
"net5.0": [
"lib/netstandard2.0/Google.Protobuf.dll",
"lib/netstandard2.0/Google.Protobuf.pdb",
"lib/netstandard2.0/Google.Protobuf.xml",
],
},
)
nuget_package(
name = "grpc.core.api",
package = "grpc.core.api",
version = "2.37.0",
sha256 = "59a590470d15d88a014c72c0f6fabf198912b1a5795c440893261f2b2785d59d",
core_lib = {
"netcoreapp2.0": "lib/netstandard2.0/Grpc.Core.Api.dll",
"netcoreapp2.1": "lib/netstandard2.0/Grpc.Core.Api.dll",
"netcoreapp2.2": "lib/netstandard2.0/Grpc.Core.Api.dll",
"netcoreapp3.0": "lib/netstandard2.0/Grpc.Core.Api.dll",
"netcoreapp3.1": "lib/netstandard2.0/Grpc.Core.Api.dll",
"net5.0": "lib/netstandard2.0/Grpc.Core.Api.dll",
},
core_deps = {
"netcoreapp2.0": [
"@system.memory//:netcoreapp2.0_core",
],
"netcoreapp2.1": [
"@system.memory//:netcoreapp2.1_core",
],
"netcoreapp2.2": [
"@system.memory//:netcoreapp2.2_core",
],
"netcoreapp3.0": [
"@system.memory//:netcoreapp3.0_core",
],
"netcoreapp3.1": [
"@system.memory//:netcoreapp3.1_core",
],
"net5.0": [
"@system.memory//:net5.0_core",
],
},
core_files = {
"netcoreapp2.0": [
"lib/netstandard2.0/Grpc.Core.Api.dll",
"lib/netstandard2.0/Grpc.Core.Api.pdb",
"lib/netstandard2.0/Grpc.Core.Api.xml",
],
"netcoreapp2.1": [
"lib/netstandard2.0/Grpc.Core.Api.dll",
"lib/netstandard2.0/Grpc.Core.Api.pdb",
"lib/netstandard2.0/Grpc.Core.Api.xml",
],
"netcoreapp2.2": [
"lib/netstandard2.0/Grpc.Core.Api.dll",
"lib/netstandard2.0/Grpc.Core.Api.pdb",
"lib/netstandard2.0/Grpc.Core.Api.xml",
],
"netcoreapp3.0": [
"lib/netstandard2.0/Grpc.Core.Api.dll",
"lib/netstandard2.0/Grpc.Core.Api.pdb",
"lib/netstandard2.0/Grpc.Core.Api.xml",
],
"netcoreapp3.1": [
"lib/netstandard2.0/Grpc.Core.Api.dll",
"lib/netstandard2.0/Grpc.Core.Api.pdb",
"lib/netstandard2.0/Grpc.Core.Api.xml",
],
"net5.0": [
"lib/netstandard2.0/Grpc.Core.Api.dll",
"lib/netstandard2.0/Grpc.Core.Api.pdb",
"lib/netstandard2.0/Grpc.Core.Api.xml",
],
},
)
nuget_package(
name = "grpc.core",
package = "grpc.core",
version = "2.37.0",
sha256 = "aec4e3360bd4808f2262de54af07efb0806de999b8219391fe369e668dc3bd32",
core_lib = {
"netcoreapp2.0": "lib/netstandard2.0/Grpc.Core.dll",
"netcoreapp2.1": "lib/netstandard2.0/Grpc.Core.dll",
"netcoreapp2.2": "lib/netstandard2.0/Grpc.Core.dll",
"netcoreapp3.0": "lib/netstandard2.0/Grpc.Core.dll",
"netcoreapp3.1": "lib/netstandard2.0/Grpc.Core.dll",
"net5.0": "lib/netstandard2.0/Grpc.Core.dll",
},
core_deps = {
"netcoreapp2.0": [
"@grpc.core.api//:netcoreapp2.0_core",
"@system.memory//:netcoreapp2.0_core",
],
"netcoreapp2.1": [
"@grpc.core.api//:netcoreapp2.1_core",
"@system.memory//:netcoreapp2.1_core",
],
"netcoreapp2.2": [
"@grpc.core.api//:netcoreapp2.2_core",
"@system.memory//:netcoreapp2.2_core",
],
"netcoreapp3.0": [
"@grpc.core.api//:netcoreapp3.0_core",
"@system.memory//:netcoreapp3.0_core",
],
"netcoreapp3.1": [
"@grpc.core.api//:netcoreapp3.1_core",
"@system.memory//:netcoreapp3.1_core",
],
"net5.0": [
"@grpc.core.api//:net5.0_core",
"@system.memory//:net5.0_core",
],
},
core_files = {
"netcoreapp2.0": [
"lib/netstandard2.0/Grpc.Core.dll",
"lib/netstandard2.0/Grpc.Core.pdb",
"lib/netstandard2.0/Grpc.Core.xml",
# Patched in by regenerate_packages.sh
# Can't use select() here, so must just specify all
"runtimes/win-x64/native/grpc_csharp_ext.x64.dll",
"runtimes/win-x86/native/grpc_csharp_ext.x86.dll",
"runtimes/linux-arm64/native/libgrpc_csharp_ext.arm64.so",
"runtimes/linux-x64/native/libgrpc_csharp_ext.x64.so",
"runtimes/osx-x64/native/libgrpc_csharp_ext.x64.dylib",
],
"netcoreapp2.1": [
"lib/netstandard2.0/Grpc.Core.dll",
"lib/netstandard2.0/Grpc.Core.pdb",
"lib/netstandard2.0/Grpc.Core.xml",
# Patched in by regenerate_packages.sh
# Can't use select() here, so must just specify all
"runtimes/win-x64/native/grpc_csharp_ext.x64.dll",
"runtimes/win-x86/native/grpc_csharp_ext.x86.dll",
"runtimes/linux-arm64/native/libgrpc_csharp_ext.arm64.so",
"runtimes/linux-x64/native/libgrpc_csharp_ext.x64.so",
"runtimes/osx-x64/native/libgrpc_csharp_ext.x64.dylib",
],
"netcoreapp2.2": [
"lib/netstandard2.0/Grpc.Core.dll",
"lib/netstandard2.0/Grpc.Core.pdb",
"lib/netstandard2.0/Grpc.Core.xml",
# Patched in by regenerate_packages.sh
# Can't use select() here, so must just specify all
"runtimes/win-x64/native/grpc_csharp_ext.x64.dll",
"runtimes/win-x86/native/grpc_csharp_ext.x86.dll",
"runtimes/linux-arm64/native/libgrpc_csharp_ext.arm64.so",
"runtimes/linux-x64/native/libgrpc_csharp_ext.x64.so",
"runtimes/osx-x64/native/libgrpc_csharp_ext.x64.dylib",
],
"netcoreapp3.0": [
"lib/netstandard2.0/Grpc.Core.dll",
"lib/netstandard2.0/Grpc.Core.pdb",
"lib/netstandard2.0/Grpc.Core.xml",
# Patched in by regenerate_packages.sh
# Can't use select() here, so must just specify all
"runtimes/win-x64/native/grpc_csharp_ext.x64.dll",
"runtimes/win-x86/native/grpc_csharp_ext.x86.dll",
"runtimes/linux-arm64/native/libgrpc_csharp_ext.arm64.so",
"runtimes/linux-x64/native/libgrpc_csharp_ext.x64.so",
"runtimes/osx-x64/native/libgrpc_csharp_ext.x64.dylib",
],
"netcoreapp3.1": [
"lib/netstandard2.0/Grpc.Core.dll",
"lib/netstandard2.0/Grpc.Core.pdb",
"lib/netstandard2.0/Grpc.Core.xml",
# Patched in by regenerate_packages.sh
# Can't use select() here, so must just specify all
"runtimes/win-x64/native/grpc_csharp_ext.x64.dll",
"runtimes/win-x86/native/grpc_csharp_ext.x86.dll",
"runtimes/linux-arm64/native/libgrpc_csharp_ext.arm64.so",
"runtimes/linux-x64/native/libgrpc_csharp_ext.x64.so",
"runtimes/osx-x64/native/libgrpc_csharp_ext.x64.dylib",
],
"net5.0": [
"lib/netstandard2.0/Grpc.Core.dll",
"lib/netstandard2.0/Grpc.Core.pdb",
"lib/netstandard2.0/Grpc.Core.xml",
# Patched in by regenerate_packages.sh
# Can't use select() here, so must just specify all
"runtimes/win-x64/native/grpc_csharp_ext.x64.dll",
"runtimes/win-x86/native/grpc_csharp_ext.x86.dll",
"runtimes/linux-arm64/native/libgrpc_csharp_ext.arm64.so",
"runtimes/linux-x64/native/libgrpc_csharp_ext.x64.so",
"runtimes/osx-x64/native/libgrpc_csharp_ext.x64.dylib",
],
},
)
nuget_package(
name = "grpc",
package = "grpc",
version = "2.35.0",
sha256 = "2459c509c1cd301de6be4fca0abedb76786c129c344869c55a355c1fd9b401cd",
core_deps = {
"netcoreapp2.0": [
"@grpc.core//:netcoreapp2.0_core",
],
"netcoreapp2.1": [
"@grpc.core//:netcoreapp2.1_core",
],
"netcoreapp2.2": [
"@grpc.core//:netcoreapp2.2_core",
],
"netcoreapp3.0": [
"@grpc.core//:netcoreapp3.0_core",
],
"netcoreapp3.1": [
"@grpc.core//:netcoreapp3.1_core",
],
"net5.0": [
"@grpc.core//:net5.0_core",
],
},
)
nuget_package(
name = "fsharp.core",
package = "fsharp.core",
version = "5.0.1",
sha256 = "58f932b639c7953871cd894fbe6a4808c7d1fb800d4e258d1a3100e8ba007010",
core_lib = {
"netcoreapp2.0": "lib/netstandard2.0/cs/FSharp.Core.resources.dll",
"netcoreapp2.1": "lib/netstandard2.0/cs/FSharp.Core.resources.dll",
"netcoreapp2.2": "lib/netstandard2.0/cs/FSharp.Core.resources.dll",
"netcoreapp3.0": "lib/netstandard2.0/cs/FSharp.Core.resources.dll",
"netcoreapp3.1": "lib/netstandard2.0/cs/FSharp.Core.resources.dll",
"net5.0": "lib/netstandard2.0/cs/FSharp.Core.resources.dll",
},
core_files = {
"netcoreapp2.0": [
"lib/netstandard2.0/cs/FSharp.Core.resources.dll",
"lib/netstandard2.0/de/FSharp.Core.resources.dll",
"lib/netstandard2.0/es/FSharp.Core.resources.dll",
"lib/netstandard2.0/fr/FSharp.Core.resources.dll",
"lib/netstandard2.0/FSharp.Core.dll",
"lib/netstandard2.0/FSharp.Core.xml",
"lib/netstandard2.0/it/FSharp.Core.resources.dll",
"lib/netstandard2.0/ja/FSharp.Core.resources.dll",
"lib/netstandard2.0/ko/FSharp.Core.resources.dll",
"lib/netstandard2.0/pl/FSharp.Core.resources.dll",
"lib/netstandard2.0/pt-BR/FSharp.Core.resources.dll",
"lib/netstandard2.0/ru/FSharp.Core.resources.dll",
"lib/netstandard2.0/tr/FSharp.Core.resources.dll",
"lib/netstandard2.0/zh-Hans/FSharp.Core.resources.dll",
"lib/netstandard2.0/zh-Hant/FSharp.Core.resources.dll",
],
"netcoreapp2.1": [
"lib/netstandard2.0/cs/FSharp.Core.resources.dll",
"lib/netstandard2.0/de/FSharp.Core.resources.dll",
"lib/netstandard2.0/es/FSharp.Core.resources.dll",
"lib/netstandard2.0/fr/FSharp.Core.resources.dll",
"lib/netstandard2.0/FSharp.Core.dll",
"lib/netstandard2.0/FSharp.Core.xml",
"lib/netstandard2.0/it/FSharp.Core.resources.dll",
"lib/netstandard2.0/ja/FSharp.Core.resources.dll",
"lib/netstandard2.0/ko/FSharp.Core.resources.dll",
"lib/netstandard2.0/pl/FSharp.Core.resources.dll",
"lib/netstandard2.0/pt-BR/FSharp.Core.resources.dll",
"lib/netstandard2.0/ru/FSharp.Core.resources.dll",
"lib/netstandard2.0/tr/FSharp.Core.resources.dll",
"lib/netstandard2.0/zh-Hans/FSharp.Core.resources.dll",
"lib/netstandard2.0/zh-Hant/FSharp.Core.resources.dll",
],
"netcoreapp2.2": [
"lib/netstandard2.0/cs/FSharp.Core.resources.dll",
"lib/netstandard2.0/de/FSharp.Core.resources.dll",
"lib/netstandard2.0/es/FSharp.Core.resources.dll",
"lib/netstandard2.0/fr/FSharp.Core.resources.dll",
"lib/netstandard2.0/FSharp.Core.dll",
"lib/netstandard2.0/FSharp.Core.xml",
"lib/netstandard2.0/it/FSharp.Core.resources.dll",
"lib/netstandard2.0/ja/FSharp.Core.resources.dll",
"lib/netstandard2.0/ko/FSharp.Core.resources.dll",
"lib/netstandard2.0/pl/FSharp.Core.resources.dll",
"lib/netstandard2.0/pt-BR/FSharp.Core.resources.dll",
"lib/netstandard2.0/ru/FSharp.Core.resources.dll",
"lib/netstandard2.0/tr/FSharp.Core.resources.dll",
"lib/netstandard2.0/zh-Hans/FSharp.Core.resources.dll",
"lib/netstandard2.0/zh-Hant/FSharp.Core.resources.dll",
],
"netcoreapp3.0": [
"lib/netstandard2.0/cs/FSharp.Core.resources.dll",
"lib/netstandard2.0/de/FSharp.Core.resources.dll",
"lib/netstandard2.0/es/FSharp.Core.resources.dll",
"lib/netstandard2.0/fr/FSharp.Core.resources.dll",
"lib/netstandard2.0/FSharp.Core.dll",
"lib/netstandard2.0/FSharp.Core.xml",
"lib/netstandard2.0/it/FSharp.Core.resources.dll",
"lib/netstandard2.0/ja/FSharp.Core.resources.dll",
"lib/netstandard2.0/ko/FSharp.Core.resources.dll",
"lib/netstandard2.0/pl/FSharp.Core.resources.dll",
"lib/netstandard2.0/pt-BR/FSharp.Core.resources.dll",
"lib/netstandard2.0/ru/FSharp.Core.resources.dll",
"lib/netstandard2.0/tr/FSharp.Core.resources.dll",
"lib/netstandard2.0/zh-Hans/FSharp.Core.resources.dll",
"lib/netstandard2.0/zh-Hant/FSharp.Core.resources.dll",
],
"netcoreapp3.1": [
"lib/netstandard2.0/cs/FSharp.Core.resources.dll",
"lib/netstandard2.0/de/FSharp.Core.resources.dll",
"lib/netstandard2.0/es/FSharp.Core.resources.dll",
"lib/netstandard2.0/fr/FSharp.Core.resources.dll",
"lib/netstandard2.0/FSharp.Core.dll",
"lib/netstandard2.0/FSharp.Core.xml",
"lib/netstandard2.0/it/FSharp.Core.resources.dll",
"lib/netstandard2.0/ja/FSharp.Core.resources.dll",
"lib/netstandard2.0/ko/FSharp.Core.resources.dll",
"lib/netstandard2.0/pl/FSharp.Core.resources.dll",
"lib/netstandard2.0/pt-BR/FSharp.Core.resources.dll",
"lib/netstandard2.0/ru/FSharp.Core.resources.dll",
"lib/netstandard2.0/tr/FSharp.Core.resources.dll",
"lib/netstandard2.0/zh-Hans/FSharp.Core.resources.dll",
"lib/netstandard2.0/zh-Hant/FSharp.Core.resources.dll",
],
"net5.0": [
"lib/netstandard2.0/cs/FSharp.Core.resources.dll",
"lib/netstandard2.0/de/FSharp.Core.resources.dll",
"lib/netstandard2.0/es/FSharp.Core.resources.dll",
"lib/netstandard2.0/fr/FSharp.Core.resources.dll",
"lib/netstandard2.0/FSharp.Core.dll",
"lib/netstandard2.0/FSharp.Core.xml",
"lib/netstandard2.0/it/FSharp.Core.resources.dll",
"lib/netstandard2.0/ja/FSharp.Core.resources.dll",
"lib/netstandard2.0/ko/FSharp.Core.resources.dll",
"lib/netstandard2.0/pl/FSharp.Core.resources.dll",
"lib/netstandard2.0/pt-BR/FSharp.Core.resources.dll",
"lib/netstandard2.0/ru/FSharp.Core.resources.dll",
"lib/netstandard2.0/tr/FSharp.Core.resources.dll",
"lib/netstandard2.0/zh-Hans/FSharp.Core.resources.dll",
"lib/netstandard2.0/zh-Hant/FSharp.Core.resources.dll",
],
},
)
nuget_package(
name = "protobuf.fsharp",
package = "protobuf.fsharp",
version = "0.1.1",
sha256 = "cdb3f01a7ab2de3c2012b355a4f89ebdd8a9b4a8bf58eed23e3d2e80d95d8829",
core_lib = {
"netcoreapp2.0": "lib/netstandard2.0/Protobuf.FSharp.dll",
"netcoreapp2.1": "lib/netstandard2.0/Protobuf.FSharp.dll",
"netcoreapp2.2": "lib/netstandard2.0/Protobuf.FSharp.dll",
"netcoreapp3.0": "lib/netstandard2.0/Protobuf.FSharp.dll",
"netcoreapp3.1": "lib/netstandard2.0/Protobuf.FSharp.dll",
"net5.0": "lib/netstandard2.0/Protobuf.FSharp.dll",
},
core_deps = {
"netcoreapp2.0": [
"@fsharp.core//:netcoreapp2.0_core",
"@google.protobuf//:netcoreapp2.0_core",
],
"netcoreapp2.1": [
"@fsharp.core//:netcoreapp2.1_core",
"@google.protobuf//:netcoreapp2.1_core",
],
"netcoreapp2.2": [
"@fsharp.core//:netcoreapp2.2_core",
"@google.protobuf//:netcoreapp2.2_core",
],
"netcoreapp3.0": [
"@fsharp.core//:netcoreapp3.0_core",
"@google.protobuf//:netcoreapp3.0_core",
],
"netcoreapp3.1": [
"@fsharp.core//:netcoreapp3.1_core",
"@google.protobuf//:netcoreapp3.1_core",
],
"net5.0": [
"@fsharp.core//:net5.0_core",
"@google.protobuf//:net5.0_core",
],
},
core_files = {
"netcoreapp2.0": [
"lib/netstandard2.0/Protobuf.FSharp.dll",
],
"netcoreapp2.1": [
"lib/netstandard2.0/Protobuf.FSharp.dll",
],
"netcoreapp2.2": [
"lib/netstandard2.0/Protobuf.FSharp.dll",
],
"netcoreapp3.0": [
"lib/netstandard2.0/Protobuf.FSharp.dll",
],
"netcoreapp3.1": [
"lib/netstandard2.0/Protobuf.FSharp.dll",
],
"net5.0": [
"lib/netstandard2.0/Protobuf.FSharp.dll",
],
},
)
### End of generated by the tool
dotnet_nuget_new(
name = "protoc-gen-fsharp",
build_file_content = """
load("@io_bazel_rules_dotnet//dotnet:defs.bzl", "core_import_binary", "core_import_library")
core_import_library(
name = "Protobuf.FSharp.dll",
src = select(
{
"@io_bazel_rules_dotnet//dotnet/toolchain:2.1.200_config": "tools/netcoreapp2.1/any/Protobuf.FSharp.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:2.1.502_config": "tools/netcoreapp2.1/any/Protobuf.FSharp.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:2.1.503_config": "tools/netcoreapp2.1/any/Protobuf.FSharp.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:2.2.101_config": "tools/netcoreapp2.1/any/Protobuf.FSharp.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:2.2.402_config": "tools/netcoreapp2.1/any/Protobuf.FSharp.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:3.0.100_config": "tools/netcoreapp2.1/any/Protobuf.FSharp.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:3.1.100_config": "tools/netcoreapp3.1/any/Protobuf.FSharp.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:3.1.407_config": "tools/netcoreapp3.1/any/Protobuf.FSharp.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:5.0.201_config": "tools/net5.0/any/Protobuf.FSharp.dll",
},
),
version = "0.1.1",
deps = [
"@fsharp.core//:lib",
"@google.protobuf//:lib",
],
)
core_import_binary(
name = "bin",
src = select(
{
"@io_bazel_rules_dotnet//dotnet/toolchain:2.1.200_config": "tools/netcoreapp2.1/any/FSharp.GrpcCodeGenerator.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:2.1.502_config": "tools/netcoreapp2.1/any/FSharp.GrpcCodeGenerator.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:2.1.503_config": "tools/netcoreapp2.1/any/FSharp.GrpcCodeGenerator.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:2.2.101_config": "tools/netcoreapp2.1/any/FSharp.GrpcCodeGenerator.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:2.2.402_config": "tools/netcoreapp2.1/any/FSharp.GrpcCodeGenerator.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:3.0.100_config": "tools/netcoreapp2.1/any/FSharp.GrpcCodeGenerator.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:3.1.100_config": "tools/netcoreapp3.1/any/FSharp.GrpcCodeGenerator.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:3.1.407_config": "tools/netcoreapp3.1/any/FSharp.GrpcCodeGenerator.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:5.0.201_config": "tools/net5.0/any/FSharp.GrpcCodeGenerator.dll",
},
),
deps = [":Protobuf.FSharp.dll"],
version = "0.1.3",
visibility = ["//visibility:public"],
)
""",
package = "grpc-fsharp",
version = "0.1.3",
sha256 = "f1612d2d3ca0715087a87050cb7a3ebb98ff7c9294bb65afab19f7c648d1bed1",
)

View File

@ -0,0 +1,6 @@
# Patched in by regenerate_packages.sh
# Can't use select() here, so must just specify all
"runtimes/win-x64/native/grpc_csharp_ext.x64.dll",
"runtimes/win-x86/native/grpc_csharp_ext.x86.dll",

View File

@ -0,0 +1,15 @@
{
"externals": {},
"dependencies": {
"System.Buffers": "4.5.1",
"System.Numerics.Vectors": "4.5.0",
"System.Runtime.CompilerServices.Unsafe": "4.7.1",
"System.Memory": "4.5.4",
"Google.Protobuf": "3.15.3",
"Grpc.Core.Api": "2.37.0",
"Grpc.Core": "2.37.0",
"Grpc": "2.35.0",
"FSharp.Core": "5.0.1",
"Protobuf.FSharp": "0.1.1"
}
}

View File

@ -0,0 +1,115 @@
#!/bin/bash
#
# Script is written to be run from the WORKSPACE root
#
set -eu
set -o pipefail
set -x
PROTOBUF_VERSION="3.15.3"
GRPC_VERSION="2.35.0"
PROTOBUF_FSHARP_VERSION="0.1.1"
FSHARP_CORE_VERSION="5.0.1"
OUTPUT_DIR="$(pwd)/fsharp/nuget"
FILE_NAME="nuget.bzl"
TOOL="bazel run --host_platform=@io_bazel_rules_dotnet//dotnet/toolchain:linux_amd64_3.1.100 --platforms=@io_bazel_rules_dotnet//dotnet/toolchain:linux_amd64_3.1.100 @io_bazel_rules_dotnet//tools/nuget2bazel:nuget2bazel.exe --"
# Clear output files
if [ -f "${OUTPUT_DIR}/${FILE_NAME}" ]; then
rm "${OUTPUT_DIR}/${FILE_NAME}"
fi
if [ -f "${OUTPUT_DIR}/nuget2config.json" ]; then
rm "${OUTPUT_DIR}/nuget2config.json"
fi
# Build template
cat <<EOF > "${OUTPUT_DIR}/${FILE_NAME}"
load("@io_bazel_rules_dotnet//dotnet:defs.bzl", "nuget_package", "dotnet_nuget_new")
# Backwards compatibility definitions
def nuget_protobuf_packages():
nuget_rules_proto_grpc_packages()
def nuget_grpc_packages():
nuget_rules_proto_grpc_packages()
def no_op():
# Function that does nothing, to be placeholder in below function. This prevents it being a
# syntax error when nuget2bazel is first run
pass
def nuget_rules_proto_grpc_packages():
no_op()
### Generated by the tool
### End of generated by the tool
dotnet_nuget_new(
name = "protoc-gen-fsharp",
build_file_content = """
load("@io_bazel_rules_dotnet//dotnet:defs.bzl", "core_import_binary", "core_import_library")
core_import_library(
name = "Protobuf.FSharp.dll",
src = select(
{
"@io_bazel_rules_dotnet//dotnet/toolchain:2.1.200_config": "tools/netcoreapp2.1/any/Protobuf.FSharp.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:2.1.502_config": "tools/netcoreapp2.1/any/Protobuf.FSharp.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:2.1.503_config": "tools/netcoreapp2.1/any/Protobuf.FSharp.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:2.2.101_config": "tools/netcoreapp2.1/any/Protobuf.FSharp.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:2.2.402_config": "tools/netcoreapp2.1/any/Protobuf.FSharp.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:3.0.100_config": "tools/netcoreapp2.1/any/Protobuf.FSharp.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:3.1.100_config": "tools/netcoreapp3.1/any/Protobuf.FSharp.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:3.1.407_config": "tools/netcoreapp3.1/any/Protobuf.FSharp.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:5.0.201_config": "tools/net5.0/any/Protobuf.FSharp.dll",
},
),
version = "0.1.1",
deps = [
"@fsharp.core//:lib",
"@google.protobuf//:lib",
],
)
core_import_binary(
name = "bin",
src = select(
{
"@io_bazel_rules_dotnet//dotnet/toolchain:2.1.200_config": "tools/netcoreapp2.1/any/FSharp.GrpcCodeGenerator.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:2.1.502_config": "tools/netcoreapp2.1/any/FSharp.GrpcCodeGenerator.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:2.1.503_config": "tools/netcoreapp2.1/any/FSharp.GrpcCodeGenerator.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:2.2.101_config": "tools/netcoreapp2.1/any/FSharp.GrpcCodeGenerator.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:2.2.402_config": "tools/netcoreapp2.1/any/FSharp.GrpcCodeGenerator.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:3.0.100_config": "tools/netcoreapp2.1/any/FSharp.GrpcCodeGenerator.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:3.1.100_config": "tools/netcoreapp3.1/any/FSharp.GrpcCodeGenerator.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:3.1.407_config": "tools/netcoreapp3.1/any/FSharp.GrpcCodeGenerator.dll",
"@io_bazel_rules_dotnet//dotnet/toolchain:5.0.201_config": "tools/net5.0/any/FSharp.GrpcCodeGenerator.dll",
},
),
deps = [":Protobuf.FSharp.dll"],
version = "0.1.3",
visibility = ["//visibility:public"],
)
""",
package = "grpc-fsharp",
version = "0.1.3",
sha256 = "f1612d2d3ca0715087a87050cb7a3ebb98ff7c9294bb65afab19f7c648d1bed1",
)
EOF
# Add deps
${TOOL} add --path "${OUTPUT_DIR}" --indent --bazelfile "${FILE_NAME}" Google.Protobuf "${PROTOBUF_VERSION}"
${TOOL} add --path "${OUTPUT_DIR}" --indent --bazelfile "${FILE_NAME}" Grpc "${GRPC_VERSION}"
${TOOL} add --path "${OUTPUT_DIR}" --indent --bazelfile "${FILE_NAME}" FSharp.Core "${FSHARP_CORE_VERSION}"
${TOOL} add --path "${OUTPUT_DIR}" --indent --bazelfile "${FILE_NAME}" Protobuf.FSharp "${PROTOBUF_FSHARP_VERSION}"
# Clear packages directory
if [ -d "${OUTPUT_DIR}/packages" ]; then
rm -r "${OUTPUT_DIR}/packages"
fi
# Patch missing Grpc.Core runtimes into nuget_package
cat "${OUTPUT_DIR}/${FILE_NAME}" | python3 -c "import sys; patch = open('${OUTPUT_DIR}/${FILE_NAME}.patch').read(); sys.stdout.write(sys.stdin.read().replace('Grpc.Core.xml\",', 'Grpc.Core.xml\",' + patch))" | sponge "${OUTPUT_DIR}/${FILE_NAME}"
# Patch in buildifier fixes
cat "${OUTPUT_DIR}/${FILE_NAME}" | python3 -c "import sys; sys.stdout.write('\"\"\"Generated nuget packages\"\"\"\n\n' + sys.stdin.read().replace('def nuget_rules_proto_grpc_packages():', 'def nuget_rules_proto_grpc_packages():\n \"\"\"Nuget packages\"\"\"'))" | sponge "${OUTPUT_DIR}/${FILE_NAME}"

11
fsharp/repositories.bzl Normal file
View File

@ -0,0 +1,11 @@
"""Common dependencies for rules_proto_grpc F# rules."""
load(
"//:repositories.bzl",
"io_bazel_rules_dotnet",
"rules_proto_grpc_repos",
)
def fsharp_repos(**kwargs): # buildifier: disable=function-docstring
rules_proto_grpc_repos(**kwargs)
io_bazel_rules_dotnet(**kwargs)

14
fsharp/wrapper.sh Executable file
View File

@ -0,0 +1,14 @@
#! /usr/bin/env bash
# --- begin runfiles.bash initialization v2 ---
# Copy-pasted from the Bazel Bash runfiles library v2.
set -uo pipefail; f=bazel_tools/tools/bash/runfiles/runfiles.bash
source "${RUNFILES_DIR:-/dev/null}/$f" 2>/dev/null || \
source "$(grep -sm1 "^$f " "${RUNFILES_MANIFEST_FILE:-/dev/null}" | cut -f2- -d' ')" 2>/dev/null || \
source "$0.runfiles/$f" 2>/dev/null || \
source "$(grep -sm1 "^$f " "$0.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \
source "$(grep -sm1 "^$f " "$0.exe.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \
{ echo>&2 "ERROR: cannot find $f"; exit 1; }; f=; set -e
# --- end runfiles.bash initialization v2 ---
GENERATOR="$(rlocation protoc-gen-fsharp/bin/FSharp.GrpcCodeGenerator.dll_0.exe)"
$GENERATOR $@