enarx / codex Goto Github PK
View Code? Open in Web Editor NEWCode examples that can be compiled to WebAssembly for use with Enarx
License: Apache License 2.0
Code examples that can be compiled to WebAssembly for use with Enarx
License: Apache License 2.0
C++ chat client can only be killed by ^C
Once the user is done sending messages, ^D
should close the stdin and trigger messages to be read from the socket and printed to the log (just like the Rust client)
irrelevant
No response
The readme should contain a feature matrix giving an overview of webassembly support for each language. A very basic matrix can currently be found at, but we should flesh it out with information like wasi support, I/O support, socket support, etc.
Rust chat client and server were added in #51.
The chat client should be ported to C++.
Existing server can be used to test against.
This project is part of Semester of Code:
https://github.com/jhu-ospo-courses/JHU-EN.601.270/tree/main/Fall_2022#enarx-projects
No response
No response
Microsoft demo should be added to this repo as a submodule
No response
No response
The existing chat client should be extended to provide a web interface to send and receive messages.
This would allow to overcome the inability to use threads to simultaneously receive and send messages.
No response
No response
$ enarx deploy file://$(pwd)/cpp
hello
6
test
5
hy
3
hmm weird output
4
6
7
$ enarx deploy file://$(pwd)/cpp
hello
test
hy
hmm weird output
irrelevant
This is the current structure:
git ls-files examples
examples/README.md
examples/assemblyscript/README.md
examples/c#/README.md
examples/c++/README.md
examples/c/README.md
examples/go/README.md
examples/grain/README.md
examples/javascript/README.md
examples/ruby/README.md
examples/rust/README.md
examples/rust/mio/echo-tcp/Cargo.lock
examples/rust/mio/echo-tcp/Cargo.toml
examples/rust/mio/echo-tcp/Enarx.toml
examples/rust/mio/echo-tcp/LICENSE
examples/rust/mio/echo-tcp/README.md
examples/rust/mio/echo-tcp/src/main.rs
examples/rust/std/tcp-client/Cargo.lock
examples/rust/std/tcp-client/Cargo.toml
examples/rust/std/tcp-client/Enarx.toml
examples/rust/std/tcp-client/LICENSE
examples/rust/std/tcp-client/README.md
examples/rust/std/tcp-client/src/main.rs
examples/rust/tokio/echo-tcp/.cargo/config
examples/rust/tokio/echo-tcp/Cargo.lock
examples/rust/tokio/echo-tcp/Cargo.toml
examples/rust/tokio/echo-tcp/Enarx.toml
examples/rust/tokio/echo-tcp/README.md
examples/rust/tokio/echo-tcp/src/main.rs
examples/rust/tokio/http/.cargo/config
examples/rust/tokio/http/Cargo.lock
examples/rust/tokio/http/Cargo.toml
examples/rust/tokio/http/Enarx.toml
examples/rust/tokio/http/LICENSE
examples/rust/tokio/http/README.md
examples/rust/tokio/http/src/date.rs
examples/rust/tokio/http/src/enarx-white.svg
examples/rust/tokio/http/src/fireworks.gif
examples/rust/tokio/http/src/index.html
examples/rust/tokio/http/src/main.rs
examples/rust/tokio/http/src/protocol.rs
examples/swift/README.md
examples/typescript/README.md
examples/zig/README.md
(introduced in #55 )
I believe a much more useful structure would look like:
...
examples/http-client/c
examples/http-server/c
examples/http-server/rust/std
examples/http-server/rust/tokio
...
This way developers can immediately look for the exact functionality they want to implement, and, if an example for the language of their choice is missing - look for examples in different languages they're familiar with. Currently, developers are presented with an empty directory for the language of their choice and then either assume that the language is not supported or have to search through the repository.
No response
No response
https://github.com/enarx/cryptle should be added to this repo, I'd suggest using a submodule at least to start with.
That'd also be consistent with e.g. #4, where we are going to use submodules anyway
No response
No response
We have server examples, we should also have client examples. Ideally, the client examples would be able to connect to the server examples.
Fibonacci examples should take the number indexes as command-line arguments.
All examples except Zig should be updated.
See #18
Note, that currently Enarx incorrectly handles argv enarx/enarx#2090.
Test this with wasmtime until that's done
No response
No response
Follow instructions here: https://enarx.dev/docs/webassembly/rust
rustup target install wasm32-wasi
Attempt to build https://github.com/enarx/codex/tree/main/Rust/tokio-http
[mike@gelid tokio-http]$ cargo build
Compiling proc-macro2 v1.0.40
Compiling unicode-ident v1.0.1
Compiling autocfg v1.1.0
Compiling quote v1.0.20
Compiling syn v1.0.98
Compiling libc v0.2.126
Compiling futures-core v0.3.21
Compiling pin-project-lite v0.2.9
Compiling cfg-if v1.0.0
Compiling log v0.4.17
Compiling once_cell v1.12.0
Compiling memchr v2.5.0
Compiling futures-sink v0.3.21
Compiling futures-channel v0.3.21
Compiling futures-task v0.3.21
Compiling wasi v0.11.0+wasi-snapshot-preview1
Compiling futures-util v0.3.21
Compiling futures-io v0.3.21
Compiling pin-utils v0.1.0
Compiling httparse v1.7.1
Compiling bytes v1.1.0
Compiling fnv v1.0.7
Compiling itoa v1.0.2
Compiling httpdate v1.0.2
Compiling tracing-core v0.1.27
Compiling slab v0.4.7
Compiling tokio v1.20.0 (https://github.com/tokio-rs/tokio?rev=56be5286ee9548c483b91b7593ededcd34c5da0b#56be5286)
Compiling http v0.2.8
Compiling mio v0.8.4
error[E0658]: use of unstable library feature 'wasi_ext'
--> /home/mike/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.4/src/io_source.rs:5:5
|
5 | use std::os::wasi::io::AsRawFd;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #71213 <https://github.com/rust-lang/rust/issues/71213> for more information
= help: add `#![feature(wasi_ext)]` to the crate attributes to enable
For more information about this error, try `rustc --explain E0658`.
error: could not compile `mio` due to previous error
warning: build failed, waiting for other jobs to finish...
Compile should complete with no errors.
[mike@gelid tokio-http]$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home: /home/mike/.rustup
installed toolchains
--------------------
stable-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu (default)
1.57-x86_64-unknown-linux-gnu
installed targets for active toolchain
--------------------------------------
wasm32-wasi
x86_64-unknown-linux-gnu
x86_64-unknown-linux-musl
active toolchain
----------------
nightly-x86_64-unknown-linux-gnu (default)
rustc 1.64.0-nightly (4d6d601c8 2022-07-26)
See above.
Rust chat client and server were added in #51.
The chat client should be ported to C.
Existing server can be used to test against.
This project is part of Semester of Code:
https://github.com/jhu-ospo-courses/JHU-EN.601.270/tree/main/Fall_2022#enarx-projects
No response
No response
Description: Develop a chat client using a simple custom protocol running in Enarx. The project can be done in a programming language of your choice and a reference implementation in Rust along with a common Web interface will be provided. One of the main case studies for Confidential Computing is the Signal messaging application, which offers end-to-end encryption using Intel SGX. A chat app in Enarx would be cross-platform.
MVP: Terminal chat client
Stretch goal: Connect the client to a provided Web Interface
Language: Rust, C, or C++
Skills/Background: Networking
Mentor: Richard, Roman
Difficulty: Medium/Hard
This project is part of Semester of Code:
https://github.com/jhu-ospo-courses/JHU-EN.601.270/tree/main/Fall_2022#enarx-projects
No response
No response
Description: WebAssembly/WASI support varies widely across different programming languages. The goal is to create a testing framework that will automatically generate a matrix showing information like I/O support, socket support, file size, execution time, etc. This framework will run code samples from our Codex repository (https://github.com/enarx/codex/).
Language: Bash
Skills/Background: GitHub Actions
Mentor: Roman
Difficulty: Medium/Hard
This project is part of Semester of Code:
https://github.com/jhu-ospo-courses/JHU-EN.601.270/tree/main/Fall_2022#enarx-projects
No response
No response
GreenHouse monitor should be re-released as 0.1.0, just like other examples
We should move https://github.com/enarx/enarx/tree/315946be59316c2965219a4e31cd3e2cfea3185f/examples/tcp_server to this repo and probably provide 2 different configs: TLS and TCP
No response
No response
Some work has been done in #40, but it's not complete.
That PR can (or not) be used as a starting point for this issue
No response
No response
This is caused by mio itself failing to compile with recent nightlies. Tracked upstream in rust-lang/rust#99502 .
We should extract the demo applications from this repository to a separate one to make sure this one is just a set of code examples
No response
I think we should rename this repo to demos
, restructure a bit and create proper code examples in a separate repo
For the Semester of Code, we would like to ask the students Kieran and UD to document how to the C, C++, and Rust chat clients and server work.
This documentation would be part of the Codex README for each implementation and also one or more tutorials over at Wasm.Builders.
No response
Description: Develop a web-based in-memory private text sharing application. Once users connect, they are asked for authentication via an OpenID Connect/OAuth2 provider and have access to either create a new note or read an existing one.
MVP: Notes are private and can only be read by the creator.
Stretch Goal: Sharing notes with a list of users (identified via OIDC subject ID)
Language: Any supported language
Skills/Background: Web development/frameworks
Mentor: Richard, Roman
Difficulty: Easy/Medium
Examples: https://www.pastebin.com/, https://etherpad.org/, https://pad.riseup.net/
This project is part of Semester of Code:
https://github.com/jhu-ospo-courses/JHU-EN.601.270/tree/main/Fall_2022#enarx-projects
No response
No response
We should add Go echo server example from enarx/enarx#1639 with set up instructions. We should probably provide 2 examples here TLS and TCP.
No response
No response
FD_COUNT
and FD_NAMES
env variables are provided to e.g. Rust examples, but they completely disregard them and instead use hard-coded values. Often without even checking FD_COUNT
.
Since we want to show the best practices in examples in this repo, the env variables should be respected.
irrelevant
No response
fibonacci of 7 is: 13
Error: Exited with i32 exit status 0
wasm backtrace:
0: 0xd89 - <unknown>!<wasm function 7>
This fails only on Enarx
Enarx tracking issue enarx/enarx#2090 (and another one to be filed)
Success.
enarx 0.6.1
No response
The example on try.enarx.dev for http-rust-tokio is failing with:
Starting workload...
Error: failed to fetch package
Caused by:
0: failed to parse config
1: missing field prot
for key files
at line 12 column 1
It is not failing.
N/A
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.