Skip to content

Investigate the use of cesium-native in a WebAssembly build #76

@kring

Description

@kring

One of the potential future uses of cesium-native - though largely unexplored so far - is to compile parts of it to WebAssembly and incorporate it into CesiumJS and potentially other in-browser rendering engines.

Meanwhile, we haven't been bashful about using C++17, STL, and third-party libraries where they are helpful, all of which could potentially bloat a WebAssembly build beyond the point where it is practical to use it in this way. On top of that, some features, such as C++ exceptions, may be problematic in WebAssembly builds.

There is a tradeoff here, between moving quickly now by using the best tools at hand and not worrying excessively about the future impact on a WebAssembly build, and possibly needing to make major changes to cesium-native in the future if and when we do need to build it for WebAssembly.

For now, I don't think we'll do anything drastic, but will:

  • Avoid (but not outright forbid) the use of exceptions.
  • Select third-party libraries carefully. Don't use Boost.
  • Deal with most of the consequences later.
  • Perhaps it'd be worth spending a little time doing a WebAssembly build just to see where we stand?

CC @jtorresfabra @pjcozzi

Metadata

Metadata

Assignees

No one assigned

    Labels

    researchExplore an idea or prototype a concept and share the results

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions