Giter VIP home page Giter VIP logo

component-linking-demo's Introduction

component-linking-demo

This is an experiment in implementing shared-everything linking using the WebAssembly component model proposal. It uses a modified version of wasi-sdk and wasm-tools.

Building

Prerequisites:

  • A UNIX-style OS, e.g. Linux, WSL2 or MacOS
  • Rust (including the wasm32-unknown-unknown target)
  • CMake
  • Clang
  • Ninja
  • CPython build dependencies

Note that the make step will take quite a while the first time you run it since it needs to build LLVM, wasi-libc, CPython, Wasmtime, wit-bindgen, and wasm-tools. Subsequent builds should be quite fast, though.

git submodule update --init --recursive
make

component-linking-demo's People

Contributors

dicej avatar yamt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

yamt

component-linking-demo's Issues

wasi-libc upstreaming?

i think it makes sense to have a minimum version in wasi-libc as an experimental target.
how do you think?

unexpected imports in libc.so's import section

When reproducing โ€œcomponent-linking-demoโ€œ project under a virtual machine running Ubuntu 20.04 on x86 architecture, I noticed that the resulting libc.so seems to import some functions and globals that i did't expected to see. I used WABT to translate libc.so and observed the following partial output in import section:

(import "env" "getentropy" (func $getentropy (type 4)))
(import "env" "isatty" (func $isatty (type 0)))
(import "env" "reallocarray" (func $reallocarray (type 6)))
(import "env" "crypt_r" (func $crypt_r (type 6)))
(import "GOT.mem" "errno" (global $errno (mut i32)))
(import "GOT.mem" "_CLOCK_REALTIME" (global $_CLOCK_REALTIME (mut i32)))
(import "GOT.mem" "__wasilibc_environ" (global $__wasilibc_environ (mut i32)))

In addition to these imports, there are numerous similar imports. In my understanding, it seems that libc.so should implement and export these functions rather than importing them. Is this because there is a problem with my reproduction of the project or these imports in libc.so are normal?At last,English is not my native language; please excuse typing errors.

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.