Rust TypeScript

Open-source Rust projects categorized as TypeScript | Edit details

Top 13 Rust TypeScript Projects

  • GitHub repo deno

    A modern runtime for JavaScript and TypeScript.

    Project mention: Lets build a web crawler | dev.to | 2021-11-20

    import {DOMParser} from 'https://deno.land/x/deno_dom/deno-dom-wasm.ts'; import {v4} from "https://deno.land/std/uuid/mod.ts"; export async function catalogue_links(origin:string, text:string):Promise{ return new Promise(function(resolve) { try { let link_set = Array(); if(text.length > 1) { const document: any = new DOMParser().parseFromString(text, 'text/html'); if (document === undefined) { let funnel_point = "cataloguer.ts" let funk = "crawl" let error = "unable to interchange gen_object" let id = v4.generate() resolve(link_set) } else { let link_jagged_array = Array>( document.querySelectorAll('a'), document.querySelectorAll('link'), document.querySelectorAll('base'), document.querySelectorAll('area') ) for (let i = 0; i < link_jagged_array.length; i++) { for (let j = 0; j < link_jagged_array[i].length; j++) { if (link_jagged_array[i][j].attributes.href !== undefined && link_jagged_array[i][j].attributes.href.length > 0) { link_set.push(link_jagged_array[i][j].attributes.href) } } } link_set = [...new Set(link_set)] // @ts-ignore let fully_parsed_links = link_parse(origin, link_set) resolve(fully_parsed_links) } }else{ resolve(link_set) } }catch(error){ console.error(error) } }) } export async function catalogue_basic_data(origin:string, text:string):Promise{ return new Promise(function(resolve) { try { let link_set = Array(); if(text.length > 1) { const document: any = new DOMParser().parseFromString(text, 'text/html'); if (document === undefined) { console.error("document not defined") } else { let link_jagged_array = Array>( document.querySelectorAll('a'), document.querySelectorAll('link'), document.querySelectorAll('base'), document.querySelectorAll('area') ) let meta_information = document.querySelectorAll('meta') for (let i = 0; i < link_jagged_array.length; i++) { for (let j = 0; j < link_jagged_array[i].length; j++) { if (link_jagged_array[i][j].attributes.href !== undefined && link_jagged_array[i][j].attributes.href.length > 0) { link_set.push(link_jagged_array[i][j].attributes.href) } } } link_set = [...new Set(link_set)] // @ts-ignore let fully_parsed_links = link_parse(origin, link_set) let parsed_meta_information = meta_parse(meta_information) let archives = { link_data:fully_parsed_links, meta_data:parsed_meta_information } resolve(archives) } }else{ resolve(link_set) } }catch(error){ let funnel_point = "cataloguer.ts" let funk = "crawl" let id = v4.generate() console.error(error) } }) } function meta_parse(a:Array):Array{ try { let out = Array(); for (let i = 0; i < a.length; i++) { if (a[i].attributes.content !== undefined && a[i].attributes.content !== null) { let meta_tag = { name: "", content: Array() } if (a[i].attributes.charset !== undefined) { meta_tag.name = "charset" meta_tag.content.push(a[i].attributes.charset) out.push(meta_tag) continue } else if (a[i].attributes.property !== undefined) { meta_tag.name = a[i].attributes.property meta_tag.content = a[i].attributes.content.split(",") out.push(meta_tag) continue } else if (a[i].attributes["http-equiv"] !== undefined) { meta_tag.name = a[i].attributes["http-equiv"] meta_tag.content = a[i].attributes.content.split(",") out.push(meta_tag) continue } else if (a[i].attributes.name !== undefined) { meta_tag.name = a[i].attributes.name meta_tag.content = a[i].attributes.content.split(",") out.push(meta_tag) continue }else { out.push({ "meta-related":a[i].attributes.content }) } } } return out }catch(error){ console.log("crawler-tools.ts") Deno.exit(2) } } function meta_check(a:string):Boolean{ if ( /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(a) || /(tel:.*)/.test(a) || /(javascript:.*)/.test(a) || /(mailto:.*)/.test(a) ) { return true }else{ return false } } function link_parse(domain:string, lineage_links: Array):any{ try { let c: Array = new Array() if (lineage_links.length > 1) { for (let i = 0; i < lineage_links.length; i++) { if ( !/\s/g.test(lineage_links[i]) && lineage_links[i].length > 0 ) { let test = lineage_links[i].substring(0, 4) if (meta_check(lineage_links[i])) { continue } else if (/[\/]/.test(test.substring(0, 1))) { if (/[\/]/.test(test.substring(1, 2))) { let reparse_backslash = lineage_links[i].slice(1, lineage_links[i].length) lineage_links[i] = reparse_backslash } c.push(new URL(domain + lineage_links[i])) continue } else if ( (/\.|#|\?|[A-Za-z0-9]/.test(test.substring(0, 1)) && !/(http)/.test(test)) ) { try { //weed out potential non http protos let url = new URL(lineage_links[i]) } catch { let url = new URL("/" + lineage_links[i], domain) c.push(url) } continue } else if (/\\\"/.test(test)) { let edge_case_split_tester = lineage_links[i].split(/\\\"/) lineage_links[i] = edge_case_split_tester[0] if (!/http/.test(lineage_links[i].substring(0, 4))) { let url = new URL("/" + lineage_links[i], domain) c.push(url) continue } } else { try { let link_to_test = new URL(lineage_links[i]) let temp_url = new URL(domain) let host_domain = temp_url.host.split(".") let host_tester = host_domain[host_domain.length - 2] + host_domain[host_domain.length - 1] let compare_domain = link_to_test.host.split(".") let compare_tester = compare_domain[compare_domain.length - 2] + compare_domain[compare_domain.length - 1] if (host_tester !== compare_tester) { continue } c.push(link_to_test) } catch (error) { console.error(error) } continue } } } } return c }catch(err){ console.error(err) } }

  • GitHub repo swc

    swc is a super-fast compiler written in rust; producing widely-supported javascript from modern standards and typescript.

    Project mention: Simplicity as a Feature | dev.to | 2021-11-26

    Recently, I switched our dev build compiler of some of our shared packages to SWC from TypeScript (along with removing other abstractions), which, on the one hand, is great! You definitely should explore doing that.

  • Scout APM

    Scout APM: A developer's best friend. Try free for 14-days. Scout APM uses tracing logic that ties bottlenecks to source code so you know the exact line of code causing performance issues and can get back to building a great product faster.

  • GitHub repo tools

    The Rome Toolchain. A linter, compiler, bundler, and more for JavaScript, TypeScript, HTML, Markdown, and CSS.

    Project mention: [AskJS] Why there is so much hatred toward using Javascript on the Backend for C#/Java and others tech stack programmer ? Is it performance alone ? Do you consider yourself a full stack senior JS dev ? | reddit.com/r/javascript | 2021-11-14

    Again, if js is so fast, why rome (https://rome.tools/) is being rewritten to rust?

  • GitHub repo rslint

    A (WIP) Extremely fast JavaScript and TypeScript linter and Rust crate

    Project mention: Rust Is the Future of JavaScript Infrastructure | news.ycombinator.com | 2021-11-11

    Author here. A few other Rust projects to note that I didn't mention in the original post I've since found:

    - Boa (JS engine in Rust) – https://github.com/boa-dev/boa

    - RSLint (JS/TS linter in Rust) – https://github.com/rslint/rslint

    - Node version manager in Rust – https://github.com/Schniz/fnm

    If you know of any other popular ones, let me know. I'm keeping a list :)

  • GitHub repo rustpad

    Efficient and minimal collaborative code editor, self-hosted, no database required

    Project mention: Advise with starting "scratch my own itch" project (screensharing + vscode liveshare clone) | reddit.com/r/rust | 2021-10-14

    Also check out Rustpad (Github) - it has collaborative editing implemented now.

  • GitHub repo deno_lint

    Blazing fast linter for JavaScript and TypeScript written in Rust

    Project mention: Rust Is The Future of JavaScript Infrastructure | reddit.com/r/javascript | 2021-11-11

    I built one of the tools mentioned in the article, Deno's linter. Its binary is over 30 MiB:

  • GitHub repo dprint

    Pluggable and configurable code formatting platform written in Rust.

    Project mention: dprint: A pluggable and configurable code formatting platform written in Rust | news.ycombinator.com | 2021-10-18
  • Nanos

    Run Linux Software Faster and Safer than Linux with Unikernels.

  • GitHub repo dvm

    Deno Version Manager - Easy way to manage multiple active deno versions.

    Project mention: Awesome Rewrite It In Rust - A curated list of replacements for existing software written in Rust | reddit.com/r/rust | 2021-05-27

    dvm - Deno version manager.

  • GitHub repo bast

    :monkey: Web analytics focusing on privacy and simplicity.

    Project mention: Matomo, an open source analytics platform, GDPR and CCPA compliant | news.ycombinator.com | 2021-01-05

    It's pretty easy to make your own analytics. It's not famous, but I open-sourced mine; it's called Bast, written mostly in Rust, and it's easy to deploy it. https://github.com/kooparse/bast

  • GitHub repo alef-component

    Alef Component for Modern Web Apps.

    Project mention: Alef: Kind of Svelte but with JSX | news.ycombinator.com | 2021-01-17
  • GitHub repo deno_sdl2

    SDL2 module for Deno

    Project mention: native web-api graphics (live, not image) | reddit.com/r/Deno | 2021-09-10

    sdl2 gets around the first problem by downloading a CLI service & starting it, that speaks JSON over a TCP socket. It's a limited surface of the API, and missing some pretty basic stuff, but I could see it working ok. It's not canvas, so I'd have to translate those sort of calls to it. I discussed that a bit here and it sounds like I could blit images of the canvas to sdl2 surface, but since it doesn't support in-memory images, I'd have to implement that in sdl2, or save a "frame" image to a file, for every blit. Either way, I have the overhead of redrawing every frame as a complete image. This seems incredibly jenky, and I assume will not perform very well, but I haven't tested.

  • GitHub repo react-wasm-github-api-demo

    A demo application to serve as a template for your Rust & React needs. With a sample GraphQL backend.

    Project mention: DoorDash: Migrating From Python to Kotlin for Our Backend Services | reddit.com/r/programming | 2021-05-05

    I'm not sure what your use case is, and anyway, mine's very different, but I do have a working implementation running in my wasm-template (that's a web client, but the GraphQL stuff is all in Rust. Look into the backend folder.)

  • GitHub repo feather-gb

    Just another GameBoy emulator written in Rust 🦀

    Project mention: Just another GameBoy emulator in Rust with WebAssembly frontend | reddit.com/r/EmuDev | 2021-10-14

    The emulator (GB) core is written in Rust and then exported/compiled to WASM via https://github.com/wasm-tool/wasm-pack-plugin. This basically generates a WASM file with the Typescript definitions as well (*.wasm + *.ts files). The entry file is here https://github.com/vojty/feather-gb/blob/main/gb-web/src/lib.rs.

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2021-11-26.

Rust TypeScript related posts

Index

What are some of the best open-source TypeScript projects in Rust? This list will help you:

Project Stars
1 deno 78,925
2 swc 17,957
3 tools 16,681
4 rslint 2,002
5 rustpad 1,815
6 deno_lint 949
7 dprint 933
8 dvm 332
9 bast 85
10 alef-component 47
11 deno_sdl2 42
12 react-wasm-github-api-demo 13
13 feather-gb 6
Find remote TypeScript jobs at our new job board 99remotejobs.com. There are 10 new remote jobs listed recently.
Are you hiring? Post a new remote job listing for free.
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com