GithubHelp home page GithubHelp logo

Comments (3)

LdBeth avatar LdBeth commented on July 1, 2024

I think the idea is to let user build a scheme executable with extra C functions linked to libkernel.a and main.o, without the need to distribute the user extended C functions as a separate dynamic library file.

from chezscheme.

LiberalArtist avatar LiberalArtist commented on July 1, 2024

I think the idea is to let user build a scheme executable with extra C functions linked to libkernel.a and main.o, without the need to distribute the user extended C functions as a separate dynamic library file.

Interesting! I can see how that would work, though I wouldn't have thought of that approach.

Does anyone know of other software that distributes something similar to this main.o file?

from chezscheme.

LdBeth avatar LdBeth commented on July 1, 2024

So (on macOS)

cc libz.a liblz4.a libkernel.a main.o -o foo -liconv -lncurses

would produce an executable works identical to petite or scheme, without need to access the source code. I think this design was settle down long before when Chez was still closed source and the distribution of main.o is only for completeness, and to create binary executable if any of the linked shared libraries, for example ncurses, on the target system changes, without need to request a new binary from software vendor.

Also it is worth mention the version 7 user guide already mentioned the kernel can be a shared library. The program might have been distributed for some now obscure UNIX variants so it is very likely the case why object files are included when sources aren't available since while the object file format can be compatible the system shared libraries might not be the same.

https://www.scheme.com/csug7/use.html#./use:h7

My other conjecture about making additional C code was probably never be applied in reality since it still requires some hack to hook additional code into the main function to register C functions to the runtime to make them available to Scheme.

from chezscheme.

Related Issues (20)

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.