Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for Languages that create compiled output
Michael Currin
Michael Currin

Posted on

     

Languages that create compiled output

This is context for the previous post in the series, for areas I know of in programming where it makes sense to create an output distribution file.

Compiled languages

For C, C++, Rust and Go, one might want to distribute a pre-built executable binary. I want to get into Go and so want to see a good approach for sharing my projects.

FromHello world example:

$go build hello-world.go$lshello-world    hello-world.go
Enter fullscreen modeExit fullscreen mode

For C:

$cc-O-c main.c
Enter fullscreen modeExit fullscreen mode

Rust:

$cargo build
Enter fullscreen modeExit fullscreen mode

Zip a package

In the case of a VS Code extension (typically made in TypeScript) or a Ruby gem, one creates a zipped archive like.vsix or.gem which contains selected files to be distributed.

Then this file could be uploaded to GitHub or a provider (like VS Code Marketplace or RubyGems), so others can install your project.

For example, I create a local archive of my VS Code extension and add it to a release underAssets.

https://github.com/MichaelCurrin/auto-commit-msg/releases

Dist directory for JS

For JavaScript projects, one might have asrc directory of source code (e.g. TypeScript) and adist directory of compiled JavaScript (vanilla JS, possible minified and bundled as a single JS file or a multiple files). This directory might be versioned or not in the repo. It might be available on the NPM registry or a CDN.

For example, here are some Vue JS files available in adist oncdn.jsdelivr.net.

https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/

That seems to match the versioneddist directory on GitHub.

https://github.com/vuejs/vue/tree/dev/dist

Or you can use a single Production CDN JS file:

https://cdn.jsdelivr.net/npm/vue@2.6.12

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

I'm a self-taught dev focused on websites and Python development.My friends call me the "Data Genie".When I get bored, I find tech to read about, write about and build things with.
  • Location
    Netherlands
  • Education
    Marketing honors + self-taught dev
  • Work
    Senior Software Engineer at ACT Commodities
  • Joined

More fromMichael Currin

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp