{"id":20848656,"url":"https://github.com/derekwin/lfx_3172","last_synced_at":"2026-02-07T15:02:31.279Z","repository":{"id":220617641,"uuid":"751321266","full_name":"derekwin/LFX_3172","owner":"derekwin","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-07T08:12:02.000Z","size":414,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-13T10:43:51.274Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/derekwin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-02-01T11:27:50.000Z","updated_at":"2024-02-01T11:27:50.000Z","dependencies_parsed_at":"2024-02-03T05:29:13.870Z","dependency_job_id":"c4e23f19-87ab-4ad6-9a47-f5acd7e6e60a","html_url":"https://github.com/derekwin/LFX_3172","commit_stats":null,"previous_names":["derekwin/lfx_3172"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/derekwin/LFX_3172","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derekwin%2FLFX_3172","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derekwin%2FLFX_3172/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derekwin%2FLFX_3172/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derekwin%2FLFX_3172/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/derekwin","download_url":"https://codeload.github.com/derekwin/LFX_3172/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derekwin%2FLFX_3172/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29197646,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T14:35:27.868Z","status":"ssl_error","status_checked_at":"2026-02-07T14:25:51.081Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2024-11-18T02:27:00.997Z","updated_at":"2026-02-07T15:02:29.609Z","avatar_url":"https://github.com/derekwin.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# LFX-Mentorship 2024-01 PreTest\n\n- Env prepare\n- Burn pretest\n- Rustls build and test\n    - Rutls build\n    - Rustls testcases\n- Git branch\n- Analyzing the integration process of the wasmedge_rustls_plugin into WasmEdge\n    - Structures of the plugin code\n    - How the plugin is utilized\n- What does the Burn project need to expose to WasmEdge? [todo]\n- How does WasmEdge integrate and utilize Burn? [todo]\n\n# Env prepare\ninstall rust env\n```\nsudo apt install -y curl wget vim build-essential\n\n# using rustup\ncurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n\n## change sources\nhttps://blog.csdn.net/qq_28550263/article/details/130758057\n```\n\n# Burn pretest | mission 1\n```\ncargo new burn_app\n\ncd burn_app/\n\n// cargo add burn --features wgpu\n// I choose ndarry as backend\ncargo add burn --features ndarray\n```\n![](pics/1.png)\n\n![](pics/2.png)\n\n**write a simple app using burn**\n```\ncargo run\n```\n![](pics/3.png)\n\n# Rustls build and test | mission 3\nBuild success on my local virtualbox ubuntu 22.04\n\n```\n## install cmake \nsudo apt  install cmake\n\n## install wasmedge first to avoid the mistake [issues2303](https://github.com/WasmEdge/WasmEdge/issues/2303)\ncurl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash\nsource $HOME/.wasmedge/env\n\n## clone wasmedge\ngit clone https://github.com/WasmEdge/WasmEdge.git\n\n## navigate to rustls\ncd WasmEdge/plugins/wasmedge_rustls\n\n## build plugin\ncargo build --release\n```\n![](pics/4.png)\n\n```\ncp libwasmedge_rustls.so  ~/.wasmedge/plugin/\n```\n\n#### Rustls test\n```\n# install wasm32-wasi\nrustup target add wasm32-wasi\n```\n\n##### Test 1 : The hyper API https client\n```\ngit clone https://github.com/WasmEdge/wasmedge_hyper_demo\n\n// Build\ncd wasmedge_hyper_demo/client-https\ncargo build --target wasm32-wasi --release\nwasmedge compile target/wasm32-wasi/release/wasmedge_hyper_client_https.wasm wasmedge_hyper_client_https.wasm\n\n// Run\nwasmedge wasmedge_hyper_client_https.wasm\n```\n![](pics/5.png)\n\n\n##### Test 2 : wasmedge_reqwest_demo https client\n```\ngit clone https://github.com/WasmEdge/wasmedge_reqwest_demo\ncd wasmedge_reqwest_demo\n\n# Build the Rust code\ncargo build --target wasm32-wasi --release\n# Use the AoT compiler to get better performance\nwasmedge compile target/wasm32-wasi/release/https.wasm https.wasm\n\n# Run the HTTPS GET and POST examples\nwasmedge https.wasm\n```\n![](pics/6.png)\n![](pics/7.png)\n\n# Branch\nI have fork the branch 'hydai/0.13.5_ggml_lts' to https://github.com/derekwin/WasmEdge\n\n# Analyzing the integration process of the wasmedge_rustls_plugin into WasmEdge.\npull request : [pull/2762](https://github.com/WasmEdge/WasmEdge/pull/2762)\n\nmain change : [commit:163f](https://github.com/WasmEdge/WasmEdge/pull/2762/commits/163f00f7ae9c246e6dee95154f868babc1620e00)\n\n### Structures of the plugin code\n\u003e | -\u003e annotate \n```\n# lib.rs\n\n# error type define\nenum TlsError\nstruct TlsIoState with a From trait | 根据另一种类型生成自己 | from rustls::IoState to TlsIoState\n\nmod tls_client\n    struct Ctx \n        rustls::ClientConfig\n        ClientCodec\n    struct ClientCodec | from rustls:ClientConnection\n\n    mod | test_client_test | test_cts()\n\nmod wasmedge_client_plugin\n    default_config() | default_config\n    new_client_codec() | closure | new_codec\n    is_handshaking() | closure | codec_is_handshaking\n    wants() | closure | codec_wants\n    delete_codec() | closure | delete_codec\n    process_new_packets() | closure | process_new_packets\n    send_close_notify() | closure | send_close_notify\n    write_raw() | closure | write_raw\n    write_tls() | closure | write_tls\n    read_raw() | closure | read_raw\n    read_tls() | closure | read_tls\n    create_module() | pub | PluginModule | add all fn ubove to module by .add_func()\n\nwasaedge_plugin_sdk::plugin::register_plugin!() | register create_module() to .modules\n\n```\n\n### How the plugin is utilized\n\n\n[wasmedge_rustls_api](https://github.com/second-state/wasmedge_rustls_api) is the api for this plugin, so that `hyper_wasi` can use rustls_plugin as tls.\n\n![](./pics/8.png)\n\nThen the wasmedge_rustls_api be used as follows:\n\n![](./pics/9.png)\n\n![](./pics/10.png)\n\nwasmedge_rustls_api/src/stream.c\n\n![](./pics/11.png)\n\nwasmedge_rustls_api/src/ffi.c\n\n![](./pics/12.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderekwin%2Flfx_3172","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderekwin%2Flfx_3172","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderekwin%2Flfx_3172/lists"}