Coder Social home page Coder Social logo

wasmerio / ate Goto Github PK

View Code? Open in Web Editor NEW
130.0 12.0 11.0 66.2 MB

Distributed immutable data store with strong encryption and authentication

License: Apache License 2.0

Rust 99.49% Shell 0.16% JavaScript 0.22% TypeScript 0.08% HTML 0.04% CSS 0.01%
kafka immutable immutable-objects immutable-store blockchain datastore database materialized-view materialized-views quantum-algorithms

ate's Introduction

ATE

Navigation

What is ATE?

...is it a NoSQL database?
...is it a distributed redo log?
...is it a event BUS?
...is it a API framework?
...is it a distributed queue?
...is it a distributed cache?
...is it a secure encrypted vault?
...is it a quantum resistant communication framework?
...is it a WORM archive solution?

ATE is all these things and none of them; it is unique way to work with distributed data that can easily implement all of the above use cases - take a look at the examples for how you can achieve them.

Why the name?

The origin of the word "mutate" is the latin word '-ate':
https://www.dictionary.com/browse/mutate

Summary

ATE is a distributed immutable data store and built in memory based materialized view with strong encryption and authentication.

What does that mean?

This library is a way of working with data in modern distributed computing.

  • ...data is persisted to a distributed commit log.
  • ...partitions are divided into chains that shard data into physical domains.
  • ...streaming of data to the application occurs on demand as the app needs it.
  • ...each chain is a crypto-graph with unique asymmetric keys at differentiating nodes.
  • ...the root of the chain-of-trust validates the crypto-graph through various plugins.
  • ...strong authentication and authorized is by design built into the data model.
  • ...encryption is highly resistant to quantum attacks and uses fine-grained tenant keys.
  • ...all this is integrated into a shared-nothing highly portable executable.

Examples

Projects

Typical Deployment Pattern

     .-------------.          .- - - - - - -.
     |   Server    |              Server
     |             | .. .. .. |             | .. .. ..
     | >atedb solo |
     '------|----\-'          '- - - - - - -'
            |     \                 
        ws://yourserver.com/db
            |       \
     .------|------. \
     |Native Client|  .-----Browser-----.
     |             |  |.---------------.|
     | >program    |  || >wasm32-wasi  ||
     |  \ate.so    |  ||  \ate.wasm    ||
     '-------------'  |'---------------'|
                      '-----------------'

The easiest way to get up and running is to just build your app and point the
database URL at ws://wasmer.sh/db. You will need to register an account and verify
your identity however after this you can use the free databases and/or paid option.

Alternatively, if you wish to host your own ATE servers in infrastructure that you
manage and run then follow these high-level steps.

1. Server runs the 'atedb' process on some network reachable location
2. Create several records for each IP address under the same A-record in your DNS
3. Either create your own authentication server as well using the auth-server binary
   or just use the authentication servers hosted at Wasmer by pointing to
   ws://wasmer.sh/auth.

Quick Start

Cargo.toml

[dependencies]
tokio = { version = "*", features = ["full", "signal", "process"] }
serde = { version = "*", features = ["derive"] }
ate = { version = "*" }
wasmer-auth = { version = "*" }

main.rs

use serde::{Serialize, Deserialize};
use wasmer_auth::prelude::*;

#[derive(Debug, Serialize, Deserialize, Clone)]
struct MyData
{
    pi: String,
}

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>>
{
    let dio = DioBuilder::default()
        .with_session_prompt().await?
        .build("mychain")
        .await?;

    dio.store(MyData {
        pi: "3.14159265359".to_string(),
    })?;
    dio.commit().await?;

    Ok(())
}

Changelog

1.2.2  -= Code Refactoring =-
        + The crypto library has been split out from the main ATE library to reduce dependencies
          when using just cryptographic routines and to reduce build times.
1.2.1  -= Lazy Loading =-
        + Subscribing to chains can now load the data in the chain on demand as its needed
          which reduces the startup time considerably.
        + Temporal clients will default to lazy loading
        + Data loaded via the lazy loading mechanism will now be cached client side

1.1.1  -= Performance and Bug Fixes =-
        + Fixed an issue with the web sockets that caused sporadic disconnects
        + Improved the performance of web socket messages by reusing IV's
        + Reduced the message overhead with a new message encoding format

1.1.0  -= Comms Upgrade =-
        + Streaming websockets are now more stable as they use length headers to delimit messages.
        + Fixed a bug where disconnecting clients would drop neighbors on the same server.
        + Various changes to the interfaces for stability reasons
        (this upgrade is not backwards compatible with version 1.0.6)

1.0.6  -= Bug Fixes =-
        + Modified the interface slightly but most users should not be impacted
        + Fixed a bug around validators rejecting events during the subscribe
          process that re-reads them from disk - these validators should not be running
        + Added the ability to list all root objects
        + Added the ability to delete all root objects (and hence wipe a chain)
        + Fixed a serious deadlock situation when commiting transactions that was causing timeouts

1.0.2  -= WASM BUS =-
       + Integrated with the WASM bus (wasmer-bus) which allows for ATE to use
         the web sockets while running in a controlled sandbox.

1.0.0  -= Major Release =-
       + See [README.md](https://github.com/wasmerio/ate/blob/e0beedbbbd84f95cd6c7a9a45b8903058f65b6fd/README.md)

<=0.8.0 See commit history

High Level Design

.--[ atedb  ]---. .--[ atedb  ]---.      .-[auth-server]-.
|               | |               |      |               |
|>local redo-log| |>local redo-log|      |>local redo-log|
|.-------------.| |.-------------.|      |.-------------.|
|| Chain     1 || ||             ||      ||    user     ||
||             || || Chain     2 ||      ||   account   ||
|*-------------*| |*------|------*|      |*-----|-------*|
|               |       subscribe             login      
|                \________|_____________________|____
|                         |                     |    
|  >local redo-log                                   
|  >Crypto-Graph Materiaized View< (in memory)       
|  .----------------------------------.      session 
|  |             root(hash)           |   .-----------.
|  |              |                   |   |  -token   |
|  |      dao----dao(aes)             |---|  -claims  |
|  |              \                   |   |  -keys    |
|  |               dao                |   *-----------*
|  |                                  |

Feature Flags

  • 'client' - Client functionality that allows one to connect to ATE datachains and/or host them locally
  • 'server' - Server functionality required to create and run ATE in distributed mode with the data replicated on server nodes.
  • 'client_web' - Client functionality designed for running within a browser sandbox (--target=wasm32-wasi)

WebAssembly

When compiling for WASM use the following command:

cargo build --target wasm32-wasi --no-default-features --features client_web

Lower Level Example

Cargo.toml

[dependencies]
tokio = { version = "*", features = ["full", "signal", "process"] }
serde = { version = "*", features = ["derive"] }
ate = { version = "*" }

main.rs

use serde::{Serialize, Deserialize};
use ate::prelude::*;

#[derive(Clone, Serialize, Deserialize)]
struct World
{
    commandment: String
}

#[tokio::main]
async fn main() -> Result<(), AteError>
{
    // The default configuration will store the redo log locally in the temporary folder
    let conf = AteConfig::default();
    let builder = ChainBuilder::new(&conf).await.build();

    // We create a chain with a specific key (this is used for the file name it creates)
    let chain = builder.open(&ChainKey::from("universe")).await?;
    
    // We interact with the data stored in the chain-of-trust using a DIO
    let session = AteSession::default();
    let mut dio = chain.dio(&session).await;
    
    // In this example we store some data in the "World" object
    let key = dio.store(World {
        commandment: "Hello".to_string(),
    })?.key().clone();
    dio.commit().await?;
    
    // Now we retreive the data and print it to console
    println!("{} world!", dio.load::<World>(&key).await?.commandment);

    // All errors in ATE will convert into the AteError
    Ok(())
}

Contribution

If you would like to help setup a community to continue to develop this project then please contact me at [email protected]

ate's People

Contributors

amv-dev avatar dependabot[bot] avatar john-sharratt avatar syrusakbary avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ate's Issues

Running incompatibility?

After running:

wapm install rustpython/rustpython

The following works:

$ rustpython

But the following doesn't

$ wapm run rustpython

Screen Shot 2022-02-14 at 5 45 13 PM

Crazy idea: full desktop terminal?

Assuming a similar xterm.js package exists in the Rust world, it could be super interesting to run the wasm terminal as a native desktop app so all the processes that it executes are fully sandboxed.

Zig doesn't work with relative paths

This doesn't work

$mkdir /play
$ cd /play
$ wapm install topolarity/zig
$ zig build-exe ./example.zig

But this work:

zig build-exe /play/example.zig

Integration with vscode.dev

Wasmer.sh in vscode integrated terminals will be great experience to WAPM users.
I have concept implementation in the following repository, and the extension is also available in VSCode marketplace.

This VSCode extension works on https://vscode.dev/?vscode-coi.

Repository: https://github.com/nokotan/wasm-playground/tree/main/wasmer-terminal
MarketPlace: https://marketplace.visualstudio.com/items?itemName=KamenokoSoft.wasmer-term

I know that my current implementaion uses older version of wasmerio/ate, I don't know wasmer.sh current status.

Spawn Workers always from root

Safari 15.2 adds support for SharedArrayBuffers, which makes it "kind of" work with an old version of ate.
However, I tried tokera.sh with the new Safari and it breaks because of the usage of nested webworkers.

Screen Shot 2021-12-16 at 5 59 47 PM

WebWorkers are also supported in Safari, but it doesn't support nested WebWorkers (a Worker can't create another Worker. See Webkit issue).

If we are able to create webworkers from the root document instead of the inner workers, it would make Safari happy and 100% compatible with the shell (including having the shell fully working on iOS)

Support bash redirection

Currently, bash redirection (pipe the stdout to a file) doesn't work.

Ideally, something like: echo "a" > /file would create a file with "a" in it :)

Ctrl-C not working as expected

Ctrl-C not working as expected (regression) with wasm-matrix.

To reproduce, run in the shell:

wapm install torch2424/wasm-matrix
wasm-matrix -c 30 -l 10
# try Ctrl-C

I think the root cause was using the onData, as I believe this command was working before.

Probably we might need to use onKey for the Ctrl-C

Please publish a new version of wasm-bus-reqwest and wasm-bus-process

For some reason, if I pull the crates wasm-bus-reqwest and wasm-bus-process from crates.io, I get a ton of errors:

[target.'cfg(target_os = "wasi")'.dependencies]
wasm-bus-reqwest = "1.2.0"
wasm-bus-process = "1.0"
$ cargo build --release --target wasm32-wasi
    Updating crates.io index
   Compiling wasm-bus v1.1.0
   Compiling webc v0.1.0 (/home/fs/Development/pirita/crates/webc)
error[E0659]: `CallError` is ambiguous
  --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/data.rs:1:12
   |
1  | use super::CallError;
   |            ^^^^^^^^^ ambiguous name
   |
   = note: ambiguous because of multiple glob imports of a name in the same module
note: `CallError` could refer to the enum imported here
  --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:37:9
   |
37 | pub use wasm_bus_types::*;
   |         ^^^^^^^^^^^^^^^^^
   = help: consider adding an explicit import of `CallError` to disambiguate
note: `CallError` could also refer to the enum imported here
  --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:27:9
   |
27 | pub use error::*;
   |         ^^^^^^^^
   = help: consider adding an explicit import of `CallError` to disambiguate

error[E0659]: `CallError` is ambiguous
  --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/listen.rs:9:17
   |
9  | use crate::abi::CallError;
   |                 ^^^^^^^^^ ambiguous name
   |
   = note: ambiguous because of multiple glob imports of a name in the same module
note: `CallError` could refer to the enum imported here
  --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:37:9
   |
37 | pub use wasm_bus_types::*;
   |         ^^^^^^^^^^^^^^^^^
   = help: consider adding an explicit import of `CallError` to disambiguate
note: `CallError` could also refer to the enum imported here
  --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:27:9
   |
27 | pub use error::*;
   |         ^^^^^^^^
   = help: consider adding an explicit import of `CallError` to disambiguate

error[E0659]: `CallError` is ambiguous
  --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/respond_to.rs:11:17
   |
11 | use crate::abi::CallError;
   |                 ^^^^^^^^^ ambiguous name
   |
   = note: ambiguous because of multiple glob imports of a name in the same module
note: `CallError` could refer to the enum imported here
  --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:37:9
   |
37 | pub use wasm_bus_types::*;
   |         ^^^^^^^^^^^^^^^^^
   = help: consider adding an explicit import of `CallError` to disambiguate
note: `CallError` could also refer to the enum imported here
  --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:27:9
   |
27 | pub use error::*;
   |         ^^^^^^^^
   = help: consider adding an explicit import of `CallError` to disambiguate

error[E0659]: `CallError` is ambiguous
  --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/prelude.rs:13:21
   |
13 | pub use crate::abi::CallError;
   |                     ^^^^^^^^^ ambiguous name
   |
   = note: ambiguous because of multiple glob imports of a name in the same module
note: `CallError` could refer to the enum imported here
  --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:37:9
   |
37 | pub use wasm_bus_types::*;
   |         ^^^^^^^^^^^^^^^^^
   = help: consider adding an explicit import of `CallError` to disambiguate
note: `CallError` could also refer to the enum imported here
  --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:27:9
   |
27 | pub use error::*;
   |         ^^^^^^^^
   = help: consider adding an explicit import of `CallError` to disambiguate

error[E0659]: `CallError` is ambiguous
  --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/task/helper.rs:8:17
   |
8  | use crate::abi::CallError;
   |                 ^^^^^^^^^ ambiguous name
   |
   = note: ambiguous because of multiple glob imports of a name in the same module
note: `CallError` could refer to the enum imported here
  --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:37:9
   |
37 | pub use wasm_bus_types::*;
   |         ^^^^^^^^^^^^^^^^^
   = help: consider adding an explicit import of `CallError` to disambiguate
note: `CallError` could also refer to the enum imported here
  --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:27:9
   |
27 | pub use error::*;
   |         ^^^^^^^^
   = help: consider adding an explicit import of `CallError` to disambiguate

error[E0659]: `CallError` is ambiguous
  --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:67:38
   |
67 |             Err(_err) => Data::Error(CallError::SerializationFailed),
   |                                      ^^^^^^^^^ ambiguous name
   |
   = note: ambiguous because of multiple glob imports of a name in the same module
note: `CallError` could refer to the enum imported here
  --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:37:9
   |
37 | pub use wasm_bus_types::*;
   |         ^^^^^^^^^^^^^^^^^
   = help: consider adding an explicit import of `CallError` to disambiguate
note: `CallError` could also refer to the enum imported here
  --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:27:9
   |
27 | pub use error::*;
   |         ^^^^^^^^
   = help: consider adding an explicit import of `CallError` to disambiguate

error[E0659]: `CallError` is ambiguous
  --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:71:38
   |
71 |             Err(_err) => Data::Error(CallError::SerializationFailed),
   |                                      ^^^^^^^^^ ambiguous name
   |
   = note: ambiguous because of multiple glob imports of a name in the same module
note: `CallError` could refer to the enum imported here
  --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:37:9
   |
37 | pub use wasm_bus_types::*;
   |         ^^^^^^^^^^^^^^^^^
   = help: consider adding an explicit import of `CallError` to disambiguate
note: `CallError` could also refer to the enum imported here
  --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:27:9
   |
27 | pub use error::*;
   |         ^^^^^^^^
   = help: consider adding an explicit import of `CallError` to disambiguate

error[E0659]: `CallError` is ambiguous
  --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:87:34
   |
87 |     F: FnMut(REQ) -> Result<RES, CallError>,
   |                                  ^^^^^^^^^ ambiguous name
   |
   = note: ambiguous because of multiple glob imports of a name in the same module
note: `CallError` could refer to the enum imported here
  --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:37:9
   |
37 | pub use wasm_bus_types::*;
   |         ^^^^^^^^^^^^^^^^^
   = help: consider adding an explicit import of `CallError` to disambiguate
note: `CallError` could also refer to the enum imported here
  --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:27:9
   |
27 | pub use error::*;
   |         ^^^^^^^^
   = help: consider adding an explicit import of `CallError` to disambiguate

error[E0659]: `CallError` is ambiguous
   --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:124:49
    |
124 |             Err(_err) => syscall::fault(handle, CallError::SerializationFailed as u32),
    |                                                 ^^^^^^^^^ ambiguous name
    |
    = note: ambiguous because of multiple glob imports of a name in the same module
note: `CallError` could refer to the enum imported here
   --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:37:9
    |
37  | pub use wasm_bus_types::*;
    |         ^^^^^^^^^^^^^^^^^
    = help: consider adding an explicit import of `CallError` to disambiguate
note: `CallError` could also refer to the enum imported here
   --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:27:9
    |
27  | pub use error::*;
    |         ^^^^^^^^
    = help: consider adding an explicit import of `CallError` to disambiguate

error[E0659]: `CallError` is ambiguous
   --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:130:49
    |
130 |             Err(_err) => syscall::fault(handle, CallError::SerializationFailed as u32),
    |                                                 ^^^^^^^^^ ambiguous name
    |
    = note: ambiguous because of multiple glob imports of a name in the same module
note: `CallError` could refer to the enum imported here
   --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:37:9
    |
37  | pub use wasm_bus_types::*;
    |         ^^^^^^^^^^^^^^^^^
    = help: consider adding an explicit import of `CallError` to disambiguate
note: `CallError` could also refer to the enum imported here
   --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:27:9
    |
27  | pub use error::*;
    |         ^^^^^^^^
    = help: consider adding an explicit import of `CallError` to disambiguate

error[E0659]: `CallError` is ambiguous
   --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:154:49
    |
154 |             Err(_err) => syscall::fault(handle, CallError::SerializationFailed as u32),
    |                                                 ^^^^^^^^^ ambiguous name
    |
    = note: ambiguous because of multiple glob imports of a name in the same module
note: `CallError` could refer to the enum imported here
   --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:37:9
    |
37  | pub use wasm_bus_types::*;
    |         ^^^^^^^^^^^^^^^^^
    = help: consider adding an explicit import of `CallError` to disambiguate
note: `CallError` could also refer to the enum imported here
   --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:27:9
    |
27  | pub use error::*;
    |         ^^^^^^^^
    = help: consider adding an explicit import of `CallError` to disambiguate

error[E0659]: `CallError` is ambiguous
   --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:160:49
    |
160 |             Err(_err) => syscall::fault(handle, CallError::SerializationFailed as u32),
    |                                                 ^^^^^^^^^ ambiguous name
    |
    = note: ambiguous because of multiple glob imports of a name in the same module
note: `CallError` could refer to the enum imported here
   --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:37:9
    |
37  | pub use wasm_bus_types::*;
    |         ^^^^^^^^^^^^^^^^^
    = help: consider adding an explicit import of `CallError` to disambiguate
note: `CallError` could also refer to the enum imported here
   --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/mod.rs:27:9
    |
27  | pub use error::*;
    |         ^^^^^^^^
    = help: consider adding an explicit import of `CallError` to disambiguate

error[E0277]: the trait bound `u32: From<wasm_bus_types::CallError>` is not satisfied
  --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/listen.rs:57:36
   |
57 |                 let err: u32 = err.into();
   |                                    ^^^^ the trait `From<wasm_bus_types::CallError>` is not implemented for `u32`
   |
   = help: the following implementations were found:
             <u32 as From<Ipv4Addr>>
             <u32 as From<NonZeroU32>>
             <u32 as From<bool>>
             <u32 as From<char>>
           and 71 others
   = note: required because of the requirements on the impl of `Into<u32>` for `wasm_bus_types::CallError`

error[E0277]: the trait bound `u32: From<wasm_bus_types::CallError>` is not satisfied
  --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/respond_to.rs:66:57
   |
66 |                 let err: u32 = CallError::InvalidHandle.into();
   |                                                         ^^^^ the trait `From<wasm_bus_types::CallError>` is not implemented for `u32`
   |
   = help: the following implementations were found:
             <u32 as From<Ipv4Addr>>
             <u32 as From<NonZeroU32>>
             <u32 as From<bool>>
             <u32 as From<char>>
           and 71 others
   = note: required because of the requirements on the impl of `Into<u32>` for `wasm_bus_types::CallError`

error[E0277]: the trait bound `u32: From<wasm_bus_types::CallError>` is not satisfied
  --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/respond_to.rs:79:36
   |
79 |                 let err: u32 = err.into();
   |                                    ^^^^ the trait `From<wasm_bus_types::CallError>` is not implemented for `u32`
   |
   = help: the following implementations were found:
             <u32 as From<Ipv4Addr>>
             <u32 as From<NonZeroU32>>
             <u32 as From<bool>>
             <u32 as From<char>>
           and 71 others
   = note: required because of the requirements on the impl of `Into<u32>` for `wasm_bus_types::CallError`

error[E0277]: the trait bound `wasm_bus_types::CallError: From<u32>` is not satisfied
   --> /home/fs/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bus-1.1.0/src/abi/syscall.rs:106:62
    |
106 |         crate::engine::BusEngine::error(handle.into(), error.into());
    |                                                              ^^^^ the trait `From<u32>` is not implemented for `wasm_bus_types::CallError`
    |
    = note: required because of the requirements on the impl of `Into<wasm_bus_types::CallError>` for `u32`

Some errors have detailed explanations: E0277, E0659.

These errors disappear if I use the crates from GitHub:

[target.'cfg(target_os = "wasi")'.dependencies]
wasm-bus-reqwest = { git = "https://github.com/tokera-com/ate" }
wasm-bus-process = { git = "https://github.com/tokera-com/ate" }

Please publish a new version of this library on crates.io, since the issue is obviously fixed on the master branch already.

Cache compiled Modules

Right now, each time that you execute ls, the coreutils module is being compiled which is not optimal.

Ideally, the compiled modules (wasmer::Module) would be cached so we only create the Module one time, but instantiate multiple

Changing License?

Would you consider changing the license to an MIT-like one? Using a strong copyleft license for a "database"-like software is a bit weird and will probably stop a lot people from using it :-|

Support pwd

I saw that cd was recently implemented, but executing pwd raises an error

Zig not working properly in the browser

The program topolarity/zig will work properly with wapm in the server, but not in the browser

https://wapm.io/topolarity/zig

Steps:

  1. wapm install topolarity/zig
  2. Create file example.zig
const std = @import("std");
pub fn main() void {
    const stdout = std.io.getStdOut();
    stdout.writeAll("Hello world!") catch unreachable;
}
  1. Compile it with Zig zig build-exe example.zig -target wasm32-wasi

Regression: qjs is not working

When running qjs the following error happens:

tokera.sh:/$ qjs
QuickJS - Type "\h" for help
qjs > exec error: RuntimeError: 

I think it may be caused by this commit, but I'm not super sure: bd2bef2

Figlet is no longer working

Figlet is no longer working:

wapm install syrusakbary/figlet
figlet "Hello"

This should return:

 _   _      _ _       _ 
| | | | ___| | | ___ | |
| |_| |/ _ \ | |/ _ \| |
|  _  |  __/ | | (_) |_|
|_| |_|\___|_|_|\___/(_)

But it returns:

figlet: standard: Unable to open font file

(figlet was working before, I believe the clang/zig fixes might have broken it)

! doesn't work

Right now this doesn't work

cowsay hello!

Should output:

 ________
< hello! >
 --------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
               ||----w |
                ||     ||

Can't compile with latest `wasix`

Using latest wasmer wasix branch, the codebase doesn't compile in wasmer-web:

$ cd wasmer-web
$ npm install
$ npm run build
[...]
error[E0107]: missing generics for trait `VirtualBus`
   --> wasmer-os/src/eval/runtime.rs:141:6
    |
141 | impl VirtualBus
    |      ^^^^^^^^^^ expected 1 generic argument
    |
note: trait defined here, with 1 generic parameter: `T`
   --> /Users/syrusakbary/Development/wasmer/lib/vbus/src/lib.rs:28:11
    |
28  | pub trait VirtualBus<T>: fmt::Debug + Send + Sync + 'static
    |           ^^^^^^^^^^ -
help: add missing generic argument
    |
141 | impl VirtualBus<T>
    |      ~~~~~~~~~~~~~

error[E0107]: missing generics for trait `VirtualBusSpawner`
   --> wasmer-os/src/eval/runtime.rs:253:6
    |
253 | impl VirtualBusSpawner
    |      ^^^^^^^^^^^^^^^^^ expected 1 generic argument
    |
note: trait defined here, with 1 generic parameter: `T`
   --> /Users/syrusakbary/Development/wasmer/lib/vbus/src/lib.rs:42:11
    |
42  | pub trait VirtualBusSpawner<T> {
    |           ^^^^^^^^^^^^^^^^^ -
help: add missing generic argument
    |
253 | impl VirtualBusSpawner<T>
    |      ~~~~~~~~~~~~~~~~~~~~

error[E0107]: missing generics for trait `VirtualBus`
  --> wasmer-os/src/eval/runtime.rs:94:38
   |
94 |     fn bus<'a>(&'a self) -> &'a (dyn VirtualBus) {
   |                                      ^^^^^^^^^^ expected 1 generic argument
   |
note: trait defined here, with 1 generic parameter: `T`
  --> /Users/syrusakbary/Development/wasmer/lib/vbus/src/lib.rs:28:11
   |
28 | pub trait VirtualBus<T>: fmt::Debug + Send + Sync + 'static
   |           ^^^^^^^^^^ -
help: add missing generic argument
   |
94 |     fn bus<'a>(&'a self) -> &'a (dyn VirtualBus<T>) {
   |                                      ~~~~~~~~~~~~~

error[E0107]: missing generics for struct `SpawnOptions`
   --> wasmer-os/src/eval/runtime.rs:144:28
    |
144 |     fn new_spawn(&self) -> SpawnOptions {
    |                            ^^^^^^^^^^^^ expected 1 generic argument
    |
note: struct defined here, with 1 generic parameter: `T`
   --> /Users/syrusakbary/Development/wasmer/lib/vbus/src/lib.rs:108:12
    |
108 | pub struct SpawnOptions<T> {
    |            ^^^^^^^^^^^^ -
help: add missing generic argument
    |
144 |     fn new_spawn(&self) -> SpawnOptions<T> {
    |                            ~~~~~~~~~~~~~~~

error[E0107]: missing generics for struct `SpawnOptionsConfig`
   --> wasmer-os/src/eval/runtime.rs:169:50
    |
169 |     pub fn spawn(&mut self, name: &str, config: &SpawnOptionsConfig) -> Result<LaunchResult<EvalResult>, VirtualBusError>
    |                                                  ^^^^^^^^^^^^^^^^^^ expected 1 generic argument
    |
note: struct defined here, with 1 generic parameter: `T`
   --> /Users/syrusakbary/Development/wasmer/lib/vbus/src/lib.rs:48:12
    |
48  | pub struct SpawnOptionsConfig<T> {
    |            ^^^^^^^^^^^^^^^^^^ -
help: add missing generic argument
    |
169 |     pub fn spawn(&mut self, name: &str, config: &SpawnOptionsConfig<T>) -> Result<LaunchResult<EvalResult>, VirtualBusError>
    |                                                  ~~~~~~~~~~~~~~~~~~~~~

error[E0107]: missing generics for struct `SpawnOptionsConfig`
   --> wasmer-os/src/eval/runtime.rs:175:55
    |
175 |     fn spawn_internal(&mut self, name: &str, config: &SpawnOptionsConfig) -> Result<RuntimeProcessSpawned, VirtualBusError>
    |                                                       ^^^^^^^^^^^^^^^^^^ expected 1 generic argument
    |
note: struct defined here, with 1 generic parameter: `T`
   --> /Users/syrusakbary/Development/wasmer/lib/vbus/src/lib.rs:48:12
    |
48  | pub struct SpawnOptionsConfig<T> {
    |            ^^^^^^^^^^^^^^^^^^ -
help: add missing generic argument
    |
175 |     fn spawn_internal(&mut self, name: &str, config: &SpawnOptionsConfig<T>) -> Result<RuntimeProcessSpawned, VirtualBusError>
    |                                                       ~~~~~~~~~~~~~~~~~~~~~

error[E0107]: missing generics for struct `BusSpawnedProcess`
   --> wasmer-os/src/eval/runtime.rs:256:76
    |
256 |     fn spawn(&mut self, name: &str, config: &SpawnOptionsConfig) -> Result<BusSpawnedProcess, VirtualBusError>
    |                                                                            ^^^^^^^^^^^^^^^^^ expected 1 generic argument
    |
note: struct defined here, with 1 generic parameter: `T`
   --> /Users/syrusakbary/Development/wasmer/lib/vbus/src/lib.rs:199:12
    |
199 | pub struct BusSpawnedProcess<T> {
    |            ^^^^^^^^^^^^^^^^^ -
help: add missing generic argument
    |
256 |     fn spawn(&mut self, name: &str, config: &SpawnOptionsConfig) -> Result<BusSpawnedProcess<T>, VirtualBusError>
    |                                                                            ~~~~~~~~~~~~~~~~~~~~

error[E0107]: missing generics for struct `SpawnOptionsConfig`
   --> wasmer-os/src/eval/runtime.rs:256:46
    |
256 |     fn spawn(&mut self, name: &str, config: &SpawnOptionsConfig) -> Result<BusSpawnedProcess, VirtualBusError>
    |                                              ^^^^^^^^^^^^^^^^^^ expected 1 generic argument
    |
note: struct defined here, with 1 generic parameter: `T`
   --> /Users/syrusakbary/Development/wasmer/lib/vbus/src/lib.rs:48:12
    |
48  | pub struct SpawnOptionsConfig<T> {
    |            ^^^^^^^^^^^^^^^^^^ -
help: add missing generic argument
    |
256 |     fn spawn(&mut self, name: &str, config: &SpawnOptionsConfig<T>) -> Result<BusSpawnedProcess, VirtualBusError>

Build fails; error: failed to load manifest for workspace member. missing Cargo.toml file?

Tested on both mac, windows and WSL machines with the same results

I'm trying to build this project to experiment with the wasmer-web browser terminal environment (wanting to host my own wasmer.sh environment) am I missing something or steps I have to run before trying to build the wasmer-web wasm module with npm run build in the wasmer-web directory? Error is shown below:

error: failed to load manifest for workspace member `/Users/x/repos/ate/wasmer-ssh`

Caused by:
  failed to load manifest for dependency `wasmer-term`

Caused by:
  failed to load manifest for dependency `wasmer-os`

Caused by:
  failed to load manifest for dependency `wasmer`

Caused by:
  failed to read `/Users/x/repos/wasmer/lib/api/Cargo.toml`

Caused by:
  No such file or directory (os error 2)

Clang not working properly

This program used to work, now it returns an error:

wapm install syrusakbary/clang

echo 'int printf(const char *, ...); int main(){printf("hello world!\n");}' | clang -cc1 -triple wasm32-unkown-wasi -isysroot /sys -internal-isystem /sys/include -emit-obj -o ./obj.o -

Python stopped working

The following command fails:

wapm install python

And then

wapm run python

Fails with:

exec error: wasi filesystem creation error: `Could not get metadata for file "lib:/wapm_packages/_/[email protected]/lib": fd not a directory`
Error: wapm bus error - there was an error while deserializing the request or response.

This before gracefully failed via a WASI error (but was booting Python successfully)

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.