Coder Social home page Coder Social logo

zsh-module-poc's Introduction

zsh-module-poc

Can you make a module for zsh written in Rust? Yes, yes you can and this is a proof of concept. It's a start but I have no idea how to use Module, things are definitely safe to use probably, I wouldn't be surprised if there's some memory leaks here cause of the ManuallyDrops, but that's fine, this is just to show it is possible. It'd be nice if zsh had good docs, but it doesn't so this is just what I pieced together after a few hours of work.

Safety: Eh technically Leaky: Probably Does it work? Yes.

Want to try it yourself? Make sure you have zsh running.

  1. Create a directory
  2. `export MODULE_PATH=$MODULE_PATH:/path/to/directory
  3. cargo build --release
  4. cp target/release/libtest.so /path/to/directory/test.so
  5. zmodload test.so
  6. You should see "Hello from Rust!" printed to the terminal

Licensing is MIT, it's a PoC I don't really care that much.

zsh-module-poc's People

Contributors

mgattozzi avatar

Watchers

 avatar

Forkers

4thel00z

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.