GithubHelp home page GithubHelp logo

misskey-rs's Introduction

misskey.rs

A trial of Misskey port into Rust

WARNING: Since the 'autogen' in misskey.js is generated through OpenAPI
and is depended by backend itself,
non-dynamically porting it should be prohibited.

And it's what I'm doing right now.

Part of work codes could be found at docs/ directory: Still not implemented since of the limitations of Rust.

Issues and PRs are always welcome!

Installation

This project uses standard type Never (!)-
You need to use Nightly build of Rust in order to use this code.

This could change upon this Rust issue being closed.

Or, with closing #2, the never type could be replaced to typescript::void (()).

About

about.md

Milestones

phase.md

Want to discuss?

Rustrize discussion: https://nekoplanet.xyz/notes/9utcdcp2os (Reply here at your language!)

misskey-rs's People

Contributors

hotoras avatar

Stargazers

 avatar taichan avatar Cappy Ishihara avatar syuilo avatar

Watchers

 avatar  avatar

misskey-rs's Issues

Notes of code hard to rustrize (api.ts)

FetchLike: TypeScript.FUNCTION_TEMPLATE

export type FetchLike = (input: string, init?: {
	method?: string;
	body?: string;
	credentials?: RequestCredentials; // autogen/apiClientJSDoc
	cache?: RequestCache; // autogen/apiClientJSDoc
	headers: { [key in string]: string }
}) => Promise<{
	status: number;
	json(): Promise<any>;
}>;

Issues here

  • The type is Function Template
  • Returns Promise including Promise in their structure resolved

APIClient: TypeScript.CLASS

export class APIClient {
  public origin: string;
  public credential?: string | null;
  public fetch: FetchLike;
  
  constructor(opts: {
    origin: APIClient['origin'],
    credential?: APIClient['credential'],
    fetch?: APIClient['fetch'] | null
  }) {
    ...
    this.fetch = opts.fetch ?? ((...args) => fetch(...args));
  }
  ...
}

Issues here

  • Inside constructor it generates function template itself to assign in their child (How in Rust??)

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.