Code Monkey home page Code Monkey logo

wasify-go's People

Contributors

lukagiorgadze 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

Watchers

 avatar

wasify-go's Issues

Allow `fs` configuration

Allow file system configuration functionality in ModuleConfig

FSConfig: wasify.FSConfig{
	Enabled:  true,
	HostDir:  "./dir",
	GuestDir: "/",
}

Add optional attributes [key:value] pair

Add optional Attributes field for ModuleConfig

type ModuleConfig struct {
	...
	Attributes    map[string]string
	....
}

These attributes will be accessible within the module with the help of Module Development Kit mdk.

val := mdk.Attr("key") // val or nil
//  Or mdk.GetAttr("key") ? 

optionally, good to have built-in converters:

val := mdk.Attr("name").String()
val := mdk.Attr("age").Int()
...

Wrap public errors

Error wrapping is a beneficial practice in Go's public APIs because it enhances clarity and problem-solving for users. By adding context to error messages, developers can quickly understand why an error occurred and trace its origins. This makes troubleshooting and resolution more efficient, shields internal implementation details, and maintains consistency in error handling. Moreover, it aids in versioning and ensures that changes to underlying code don't disrupt users' error-handling strategies.

Built-in host functions feature

In wasm runtimes, basic functions like serving web pages or logging data aren't included by default. For example, if we want to send a request to a website from a part of our wasm program, we first need to set up a special host function for this purpose. Then, we can use that function within the module to get the data we need. It's a good idea to prepare essential functions like these in advance for users.

We should create a feature that makes it easy to generate these built-in functions, which can be used by people who write wasm programs. This way, users can perform tasks like making web requests without the hassle of setting up everything from scratch. The goal is to simplify the process for everyone involved.

Numeric type support: Params and Results

Supported types in Params and Results are only "byte" right now. []byte is simple and useful. However, it would be nice to also have number types like uint32, uint64, float32, and float64.

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.