-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7cf7fc5
Showing
10 changed files
with
2,158 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Build & Test | ||
|
||
on: | ||
pull_request: | ||
push: | ||
schedule: | ||
# Prime the caches every Monday | ||
- cron: 0 1 * * MON | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- macos-latest | ||
- ubuntu-latest | ||
ocaml-compiler: | ||
- "5.1" | ||
allow-prerelease-opam: | ||
- true | ||
opam-repositories: | ||
- |- | ||
default: https://github.com/ocaml/opam-repository.git | ||
# include: | ||
# - os: windows-latest | ||
# ocaml-compiler: ocaml-variants.5.1.0+options,ocaml-option-mingw | ||
# allow-prerelease-opam: false | ||
# opam-repositories: |- | ||
# windows-5.0: https://github.com/dra27/opam-repository.git#windows-5.0 | ||
# sunset: https://github.com/ocaml-opam/opam-repository-mingw.git#sunset | ||
# default: https://github.com/ocaml/opam-repository.git | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout tree | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set-up OCaml | ||
uses: ocaml/setup-ocaml@v2 | ||
with: | ||
ocaml-compiler: ${{ matrix.ocaml-compiler }} | ||
allow-prerelease-opam: ${{ matrix.allow-prerelease-opam }} | ||
opam-repositories: ${{ matrix.opam-repositories }} | ||
|
||
- run: opam install . --deps-only --with-test | ||
|
||
- run: opam exec -- dune build | ||
|
||
- run: opam exec -- dune test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_build |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# libc - raw definitions and bindings to platforms' system libraries | ||
|
||
`libc` provides definitions (and in the future bindings) to easily interoperate | ||
with C code (or "C-like" code) on several platforms, and it does this with a | ||
target and architecture aware API. | ||
|
||
Platforms included: | ||
|
||
* `aarch64-macos-darwin` | ||
* PRs welcome! | ||
|
||
## Contributing | ||
|
||
Including new platforms, while tedious, is pretty straightforward. We are using Rust's `libc` as a template for what are interesting/useful definitions on each platform. | ||
|
||
That way, the easiest way to get started is to find the right platform version | ||
of `libc` for Rust, and translate the definitions. | ||
|
||
Common types are currently included in the `types.ml` module, so you can `open | ||
Types` at the top of your new module. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
(lang dune 3.12) | ||
|
||
(name libc) | ||
|
||
(generate_opam_files true) | ||
|
||
(source | ||
(github username/reponame)) | ||
|
||
(authors "Author Name") | ||
|
||
(maintainers "Maintainer Name") | ||
|
||
(license LICENSE) | ||
|
||
(documentation https://url/to/documentation) | ||
|
||
(package | ||
(name libc) | ||
(synopsis "A short synopsis") | ||
(description "A longer description") | ||
(depends | ||
(config (>= "0.0.1")) | ||
ocaml | ||
dune | ||
) | ||
(tags | ||
(topics "to describe" your project))) | ||
|
||
; See the complete stanza docs at https://dune.readthedocs.io/en/stable/dune-files.html#dune-project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# This file is generated by dune, edit dune-project instead | ||
opam-version: "2.0" | ||
synopsis: "A short synopsis" | ||
description: "A longer description" | ||
maintainer: ["Maintainer Name"] | ||
authors: ["Author Name"] | ||
license: "LICENSE" | ||
tags: ["topics" "to describe" "your" "project"] | ||
homepage: "https://github.com/username/reponame" | ||
doc: "https://url/to/documentation" | ||
bug-reports: "https://github.com/username/reponame/issues" | ||
depends: [ | ||
"config" {>= "0.0.1"} | ||
"ocaml" | ||
"dune" {>= "3.12"} | ||
"odoc" {with-doc} | ||
] | ||
build: [ | ||
["dune" "subst"] {dev} | ||
[ | ||
"dune" | ||
"build" | ||
"-p" | ||
name | ||
"-j" | ||
jobs | ||
"@install" | ||
"@runtest" {with-test} | ||
"@doc" {with-doc} | ||
] | ||
] | ||
dev-repo: "git+https://github.com/username/reponame.git" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
(library | ||
(public_name libc) | ||
(preprocess | ||
(pps config.ppx))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
include Libc_aarch64_apple_darwin [@@config | ||
all | ||
( target_os = "darwin", | ||
target_arch = "aarch64" )] |
Oops, something went wrong.