Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add install.sh #1

Merged
merged 2 commits into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .github/workflows/build_libnative.mbt.sh

This file was deleted.

5 changes: 1 addition & 4 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ jobs:
run: |
moon update
moon install

- name: Build Deps Static Library
run: |
bash .github/workflows/build_libnative.mbt.sh
bash .mooncakes/illusory0x0/native/install.sh

- name: moon check
run: moon check --deny-warn
Expand Down
25 changes: 5 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,16 @@

## Installation

### Install illusory0x0/native Library

https://github.com/moonbit-community/native

### Install from mooncake

```bash
moon add illusory0x0/posix
```

### Build Static Library
moon add illusory0x0/native
bash .mooncakes/illusory0x0/native/install.sh

```bash
export MOON_HOME="$HOME/.moon"
mkdir build
cd build
cmake ../stub
cmake --build .
cd ..
moon add illusory0x0/posix
bash .mooncakes/illusory0x0/posix/install.sh
```

### Install Static Library

copy `libposix.mbt.a` into /your_project/lib


## Name convention

Expand Down Expand Up @@ -54,4 +39,4 @@ https://web.archive.org/web/20180331065236/http://nadeausoftware.com/articles/20

### Link option

https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html#index-L
https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html#index-L
11 changes: 11 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
set -e
cd .mooncakes/illusory0x0/posix/
export MOON_HOME="$HOME/.moon"
mkdir build || true
cd build
cmake ../stub
cmake --build .
cd ../../../..

mkdir lib || true
cp .mooncakes/illusory0x0/posix/build/libposix.mbt.a ./lib/
2 changes: 1 addition & 1 deletion moon.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "illusory0x0/posix",
"version": "0.1.0",
"deps": {
"illusory0x0/native": "0.1.0"
"illusory0x0/native": "0.1.2"
},
"readme": "README.md",
"repository": "https://github.com/moonbit-community/posix",
Expand Down