Skip to content

WASM: file system support #234

@da-liii

Description

@da-liii

Is your feature request related to a problem? Please describe.

We are using tbox to implement the file system related API in lolly:
https://github.com/XmacsLabs/lolly/blob/main/System/Files/file.cpp

And we find the APIs are not working as expected on WASM.

Describe the solution you'd like

In https://emscripten.org/docs/porting/files/file_systems_overview.html:

Emscripten provides a virtual file system that simulates the local file system, so that native code using synchronous file APIs can be compiled and run with little or no change.

I guess if we implement it in posix api, it should work fine.

The only thing we need to do is to tune the macros in tbox (I guess).

And here is a list of routines we are using and I will try to make it work on wasm:

  • tb_file_info
  • tb_file_access
  • tb_directory_current
  • ...

Describe alternatives you've considered

None

Additional context

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions