Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iocat/rules_rescript
Bazel Rules for Rescript
https://github.com/iocat/rules_rescript
Last synced: 4 months ago
JSON representation
Bazel Rules for Rescript
- Host: GitHub
- URL: https://github.com/iocat/rules_rescript
- Owner: iocat
- License: mit
- Created: 2021-05-17T10:11:16.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-19T11:12:00.000Z (almost 4 years ago)
- Last Synced: 2024-08-01T19:57:38.529Z (7 months ago)
- Language: Starlark
- Size: 25.4 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rules_rescript
Bazel Rules for Rescript### 🚧 🚧 Project is under construction. PRs are welcomed. 🚧 🚧
## How to turn your repository into a rescript repo:
In your WORKSPACE file, add the following snippet and run rescript_repository to load the neccessary rescript rules:
```bazel
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "iocat_rules_rescript",
sha256 = "52e24089222482f9b1646079fa375d9c8662aa104597470b6ff5fd9ebeb78ac8",
strip_prefix = "rules_rescript-452c9d0d49ce13e8a40be8f31cc1929078b7f16c",
urls = ["https://github.com/iocat/rules_rescript/archive/452c9d0d49ce13e8a40be8f31cc1929078b7f16c.tar.gz"],
)load("@iocat_rules_rescript//:repositories.bzl", "rescript_repository")
rescript_repository(
name = "rescript_rules", # Note the name "rescript_rules", as what you name here will be used everywhere in your workspace.
)
```# Turn your module(s) into Bazel build targets
Say, you have the following Rescript code:```rescript
// example/Example.reslet map = (stream, functor) =>
Stream.from(_ =>
try Some(stream->Stream.next->functor) catch {
| Stream.Failure => None
}
)
// ...```
```rescript
// example/Example.resilet map: (Stream.t<'a>, 'a => 'b) => Stream.t<'b>
// ...```
Then, your BUILD file is:
```bazel
# example/BUILD
load("@rescript_rules//:rules.bzl", "rescript_module")rescript_module (
name = "example",
src = "Example.res",
interface = "Example.resi",
deps = [],
)
```