Giter Site home page Giter Site logo

WASM: file system support about tbox HOT 8 OPEN

darcy-shen avatar darcy-shen commented on May 23, 2024
WASM: file system support

from tbox.

Comments (8)

darcy-shen avatar darcy-shen commented on May 23, 2024

I guess it is related to xmake-io/xmake#4173, if I set the emcc toolchain proper, it should work!

from tbox.

darcy-shen avatar darcy-shen commented on May 23, 2024

If I run xmake config -p wasm without setting the PATH for emcc, TB_CONFIG_POSIX_HAVE_OPEN will not be defined.

/* #undef TB_CONFIG_POSIX_HAVE_OPEN */

Using an elvish script like below:

#!/usr/bin/env elvish

xrepo install -y "emscripten 3.1.42"

var pkg_info = (xrepo fetch --json emscripten | from-json)
var emsdk_path = $pkg_info[0][artifacts][installdir]
set-env EMSDK $emsdk_path

xmake config --yes -p wasm -vD

If we set the EMSDK environment variable, TB_CONFIG_POSIX_HAVE_OPEN will be defined.

And the behavior of the related API still need to be checked!

from tbox.

darcy-shen avatar darcy-shen commented on May 23, 2024

And checked the tbox.config.h in xrepo, TB_CONFIG_POSIX_HAVE_OPEN is not defined.

from tbox.

waruqi avatar waruqi commented on May 23, 2024

这是因为 tbox 默认用的也是全局的 configvar_check_cfuncs,而 wasm 新加的 target 粒度 toolchain 绑定,暂时我也没空改成 target 粒度 check 。。

你可以走 xmake f -p wasm --sdk=/wasm/sdk 全局切 emcc sdk,走全局检测去编译 tbox ,就行了

from tbox.

Issues-translate-bot avatar Issues-translate-bot commented on May 23, 2024

Bot detected the issue body's language is not English, translate it automatically.


This is because tbox also uses the global configvar_check_cfuncs by default, and wasm’s newly added target granularity toolchain binding, I have no time to change to target granularity check for the time being. .

You can run xmake f -p wasm --sdk=/wasm/sdk to globally switch to emcc sdk, and run global detection to compile tbox, and that's it.

from tbox.

waruqi avatar waruqi commented on May 23, 2024

等这个 patch #235

from tbox.

waruqi avatar waruqi commented on May 23, 2024

初步可以了,先试试 check 分支

from tbox.

Issues-translate-bot avatar Issues-translate-bot commented on May 23, 2024

Bot detected the issue body's language is not English, translate it automatically.


It's okay initially, try the check branch first

from tbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.