Skip to content

Commit

Permalink
enable readline and ncurses
Browse files Browse the repository at this point in the history
  • Loading branch information
maminrayej committed Jul 7, 2024
1 parent 318d29a commit 5dbc450
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/reusable-wasix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
ZLIB_DIR: "/opt/zlib"
LIBLZMA_DIR: "/opt/liblzma"
UTIL_LINUX_DIR: "/opt/util-linux"
NCURSES_DIR: "/opt/ncurses"
READLINE_DIR: "/opt/readline"
CROSS_BUILD_PYTHON: cross-build/build
CROSS_BUILD_WASIX: cross-build/wasix
WASIX_INSTALL: /opt/wasix_install
Expand Down Expand Up @@ -71,6 +73,16 @@ jobs:
cd ${{ env.UTIL_LINUX_DIR }}
./wasix.sh
cp -v .libs/libuuid.a .
- name: "Compile ncurses"
run: |
git clone https://github.com/wasix-org/ncurses -b wasix-support ${{ env.NCURSES_DIR }}
cd ${{ env.NCURSES_DIR }}
./wasix.sh
- name: "Compile readline"
run: |
git clone https://github.com/wasix-org/readline ${{ env.READLINE_DIR }}
cd ${{ env.READLINE_DIR }}
WASIX_NCURSES=${{ env.NCURSES_DIR }} ./wasix.sh
- name: "Install Wasmer"
run: |
mkdir ${{ env.WASMER_DIR }}
Expand All @@ -85,6 +97,8 @@ jobs:
WASIX_LIBLZMA_LIBS="-L${{ env.LIBLZMA_DIR }} -llzma" \
WASIX_LIBUUID_CFLAGS="-I ${{ env.UTIL_LINUX_DIR }}/libuuid/src" \
WASIX_LIBUUID_LIBS="-L ${{ env.UTIL_LINUX_DIR }} -l uuid" \
WASIX_LIBREADLINE_CFLAGS="-I ${{ env.READLINE_DIR }}" \
WASIX_LIBREADLINE_LIBS="-L ${{ env.READLINE_DIR }} -L ${{ env.NCURSES_DIR }}/lib -lreadline -lncurses"
python3 Tools/wasm/wasm_build.py wasix build
- name: "List dirs"
run: |
Expand Down
5 changes: 4 additions & 1 deletion Tools/wasm/wasix-configure-wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ export ZLIB_LIBS=$WASIX_ZLIB_LIBS
export LIBUUID_CFLAGS=$WASIX_LIBUUID_CFLAGS
export LIBUUID_LIBS=$WASIX_LIBUUID_LIBS

export LIBREADLINE_CFLAGS=$WASIX_LIBREADLINE_CFLAGS
export LIBREADLINE_LIBS=$WASIX_LIBREADLINE_LIBS

export RANLIB="$WASI_SDK_PATH/bin/ranlib"
export AR="$WASI_SDK_PATH/bin/ar"
export NM="$WASI_SDK_PATH/bin/nm"
Expand All @@ -74,7 +77,7 @@ export CFLAGS="\
-D_WASI_EMULATED_MMAN \
-D_WASI_EMULATED_SIGNAL \
-D_WASI_EMULATED_PROCESS_CLOCKS \
-Os -g -flto"
-Os -g -flto"

export LIBS="\
-Wl,--shared-memory \
Expand Down
1 change: 0 additions & 1 deletion configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -7530,7 +7530,6 @@ AS_CASE([$ac_sys_system],
[_testcapi],
[_testclinic],
[fcntl],
[readline],
[mmap],
[xxlimited],
[xxlimited_35],
Expand Down

0 comments on commit 5dbc450

Please sign in to comment.