{"id":31769219,"url":"https://github.com/second-state/wasmedge-tensorflow","last_synced_at":"2025-10-10T02:42:05.989Z","repository":{"id":44779415,"uuid":"309295022","full_name":"second-state/WasmEdge-tensorflow","owner":"second-state","description":null,"archived":false,"fork":false,"pushed_at":"2023-06-27T21:28:02.000Z","size":127,"stargazers_count":12,"open_issues_count":1,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-07T18:57:36.053Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/second-state.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","contributing":null,"funding":null,"license":"LICENSE.spdx","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-02T07:50:25.000Z","updated_at":"2023-11-23T17:53:22.000Z","dependencies_parsed_at":"2023-01-30T19:16:07.617Z","dependency_job_id":null,"html_url":"https://github.com/second-state/WasmEdge-tensorflow","commit_stats":null,"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"purl":"pkg:github/second-state/WasmEdge-tensorflow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/second-state%2FWasmEdge-tensorflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/second-state%2FWasmEdge-tensorflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/second-state%2FWasmEdge-tensorflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/second-state%2FWasmEdge-tensorflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/second-state","download_url":"https://codeload.github.com/second-state/WasmEdge-tensorflow/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/second-state%2FWasmEdge-tensorflow/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002541,"owners_count":26083403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-10T02:42:03.030Z","updated_at":"2025-10-10T02:42:05.982Z","avatar_url":"https://github.com/second-state.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WasmEdge for Tensorflow Extension (WILL BE DEPRECATED SOON)\n\n\u003e The WasmEdge extension will be deprecated soon and be replaced by the [WasmEdge-Tensorflow plug-in](https://wasmedge.org/docs/contribute/source/plugin/tensorflow) and the [WasmEdge-TensorflowLite plug-in](https://wasmedge.org/docs/contribute/source/plugin/tensorflowlite).\n\nThe [WasmEdge](https://github.com/WasmEdge/WasmEdge) is a high performance WebAssembly runtime optimized for server side applications. This project provides support for accessing with [Tensorflow C library](https://www.tensorflow.org/install/lang_c).\n\n## Getting Started\n\n### Requirements\n\nThe WasmEdge Tensorflow shared library `libwasmedge-tensorflow_c.so` and `libwasmedge-tensorflowlite_c.so` are provided for the `WasmEdge-Tensorflow` extension of the WasmEdge shared library.\nThe WasmEdge Tensorflow static library `libwasmedgeHostModuleWasmEdgeTensorflow.a` and `libwasmedgeHostModuleWasmEdgeTensorflowLite.a` are provided for statical linking when building executables with CMake.\nWhen linking with `libwasmedge-tensorflow_c.so` and `libwasmedgeHostModuleWasmEdgeTensorflow.a`, the TensorFlow shared libraries `libtensorflow_cc.so` and `libtensorflow_framework.so` are required.\nWhen linking with `libwasmedge-tensorflowlite_c.so` and `libwasmedgeHostModuleWasmEdgeTensorflowLite.a`, the TensorFlow-Lite shared library `libtensorflowlite_c.so` is required.\n\nThe official TensorFlow release only provide the TensorFlow shared library.\nYou can download and install the pre-built shared libraries:\n\n```bash\nwget https://github.com/second-state/WasmEdge-tensorflow-deps/releases/download/0.12.1/WasmEdge-tensorflow-deps-TF-0.12.1-manylinux2014_x86_64.tar.gz\ntar -zxvf WasmEdge-tensorflow-deps-TF-0.12.1-manylinux2014_x86_64.tar.gz\nrm -f WasmEdge-tensorflow-deps-TF-0.12.1-manylinux2014_x86_64.tar.gz\nln -sf libtensorflow_cc.so.2.6.0 libtensorflow_cc.so.2\nln -sf libtensorflow_cc.so.2 libtensorflow_cc.so\nln -sf libtensorflow_framework.so.2.6.0 libtensorflow_framework.so.2\nln -sf libtensorflow_framework.so.2 libtensorflow_framework.so\nwget https://github.com/second-state/WasmEdge-tensorflow-deps/releases/download/0.12.1/WasmEdge-tensorflow-deps-TFLite-0.12.1-manylinux2014_x86_64.tar.gz\ntar -zxvf WasmEdge-tensorflow-deps-TFLite-0.12.1-manylinux2014_x86_64.tar.gz\nrm -f WasmEdge-tensorflow-deps-TFLite-0.12.1-manylinux2014_x86_64.tar.gz\n```\n\n### Prepare the environment\n\n#### Use our docker image (Recommanded)\n\nOur docker image is based on `ubuntu 20.04`.\n\n```bash\ndocker pull wasmedge/wasmedge\n```\n\n#### Or setup the environment manually\n\nPlease notice that WasmEdge-Tensorflow requires cmake\u003e=3.11 and libboost\u003e=1.68.\n\n```bash\n# Tools and libraries\nsudo apt install -y \\\n    software-properties-common \\\n    cmake \\\n    libboost-all-dev\n\n# WasmEdge supports both clang++ and g++ compilers\n# You can choose one of them for building this project\nsudo apt install -y gcc g++\nsudo apt install -y clang\n```\n\n### Get WasmEdge-Tensorflow Source Code\n\n```bash\ngit clone --recursive https://github.com/second-state/WasmEdge-tensorflow.git\ncd WasmEdge-tensorflow\ngit checkout 0.12.1\n```\n\n### Build WasmEdge-Tensorflow\n\nWasmEdge-Tensorflow depends on WasmEdge-Core, you have to prepare WasmEdge-Core before you build WasmEdge-Tensorflow.\nWe provides two options for setting up the WasmEdge-Core:\n\n#### Create and Enter the Build Folder\n\n```bash\n# After pulling our WasmEdge docker image\ndocker run -it --rm \\\n    -v \u003cpath/to/your/WasmEdge-tensorflow/source/folder\u003e:/root/WasmEdge-tensorflow \\\n    wasmedge/wasmedge:latest\n# In docker\ncd /root/WasmEdge-tensorflow\nmkdir -p build \u0026\u0026 cd build\n```\n\n#### Option 1. Use built-in CMakeLists to get WasmEdge-Core (Recommended)\n\n```bash\n# In docker\ncmake -DCMAKE_BUILD_TYPE=Release .. \u0026\u0026 make\n```\n\n#### Option 2. Use specific version of WasmEdge-Core by giving WASMEDGE_CORE_PATH\n\n```bash\n# In docker\ncmake -DWASMEDGE_CORE_PATH=\u003cpath/to/WasmEdge/source\u003e -DCMAKE_BUILD_TYPE=Release .. \u0026\u0026 make\n```\n\nThe shared library `build/lib/libwasmedge-tensorflow_c.so` is the C API to create the `wasmedge-tensorflow` import object.\nThe header `build/include/wasmedge-tensorflow.h` is the header of the `libwasmedge-tensorflow_c.so` shared library.\nThe shared library `build/lib/libwasmedge-tensorflowlite_c.so` is the C API to create the `wasmedge-tensorflowlite` import object.\nThe header `build/include/wasmedge-tensorflowlite.h` is the header of the `libwasmedge-tensorflowlite_c.so` shared library.\nThe static library `build/lib/libwasmedgeHostModuleWasmEdgeTensorflow.a` is for executables linking in CMake.\nThe static library `build/lib/libwasmedgeHostModuleWasmEdgeTensorflowLite.a` is for executables linking in CMake.\n\n## WasmEdge-Tensorflow Tools\n\nThe tools is moved to the new [repository](https://github.com/second-state/WasmEdge-tensorflow-tools).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecond-state%2Fwasmedge-tensorflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsecond-state%2Fwasmedge-tensorflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecond-state%2Fwasmedge-tensorflow/lists"}